Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Mod Name / Version: Group Name Display 2.0

Description: This allows you to display a name (like Bronze Member, Silver Member etc.) next to users posts, based on what usergroup they are in. It's perfect for paid member sites.


Working Under: UBB.Threads 6.4

Mod Status: Beta

Any pre-requisites: Tested under 6.4.1

Author(s): JoshPet

Date: 01/11/04

Credits: Jeremy for requesting original mod, smilesforu for requesting the update

Files Altered: showflat.php, showthreaded.php, showflat.tmpl, showthreaded.tmpl

New Files: none

Database Altered: none

Info/Instructions: You will need to find the NUMBER of the groups you are using.
You can do this with this SQL Query:

SELECT *
FROM w3t_Groups


Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.
Attachments
104685-GroupNameDisplay2.0.txt (0 Bytes, 137 downloads)

Sponsored Links
Joined: Feb 2002
Posts: 295
Member
Member
Offline
Joined: Feb 2002
Posts: 295
Hi,

Thanks, Josh. These member specific hacks come in quite handy at the moment as we are about to launch some paid memberships on the board.

Sanuk!

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Thanks Josh!

I'm planning to use this for users that made a donation to the site. I already tried Beta-[6.4] Admin Selectable Ratings 2.0, but that one isn't working yet for 6.4

Would it be possible to use an .gif image for the group instead of a title ?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yeah, just instead of

"Bronze Member"

you could put

"<img src="http://whatever.com/what/whatever.gif" border="0" alt="Bronze Member" />"

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
great!
Thanks

Sponsored Links
Joined: Aug 2002
Posts: 239
Member
Member
Joined: Aug 2002
Posts: 239
How would we go about adding a link to this also so when clicking on the image it goes to a donation page or whatever?

[]JoshPet said:
Yeah, just instead of

"Bronze Member"

you could put

"<img src="http://whatever.com/what/whatever.gif" border="0" alt="Bronze Member" />" [/]


Some people read their stars..... I choose to write my own
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
"<a href="http://www.whatever.com\what\donation.html"><img src="http://whatever.com/what/whatever.gif" border="0" alt="Bronze Member" /></a>"

Joined: Aug 2002
Posts: 239
Member
Member
Joined: Aug 2002
Posts: 239
ThankYou Soooooo much Josh!


Some people read their stars..... I choose to write my own
Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Even better!

Joined: May 2003
Posts: 115
Journeyman
Journeyman
Offline
Joined: May 2003
Posts: 115
Great works well 6.4.1

Sponsored Links
Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
For those using MyPaymentPal
I updated this so that it will display an image as well as a link to mypaymentpal.

This is setup for my personal stuff but you can change it to suite your needs.

Here is the orignial code for showflat.php
Code
<br />	// Figure out what to display based on their groups<br />	if (preg_match("/-5-/",$postergroup))  { // adjust this group number if needed<br />   			$postrow[$i]['GroupName'] = "Bronze Level";<br />    }<br />	if (preg_match("/-6-/",$postergroup))  { // adjust this group number if needed<br />   			$postrow[$i]['GroupName'] = "Silver Level";<br />    }<br />	if (preg_match("/-7-/",$postergroup))  { // adjust this group number if needed<br />   			$postrow[$i]['GroupName'] = "Gold Level";<br />    }<br />


Here is what I changed it to.
Code
<br />	// Figure out what to display based on their groups<br />	if (preg_match("/-16-/",$postergroup))  { // adjust this group number if needed<br />   			$postrow[$i]['GroupName'] = "<a href=\"{$config['phpurl']}/mypaymentpal/mypaymentpal.php\">Platinum Member<img src=\"{$config['images']}/platinum.gif\" border=\"0\" alt=\"Platinum Membership Info\" /></a>";<br />    }<br />	if (preg_match("/-14-/",$postergroup))  { // adjust this group number if needed<br />   			$postrow[$i]['GroupName'] = "<a href=\"{$config['phpurl']}/mypaymentpal/mypaymentpal.php\">Gold Member<img src=\"{$config['images']}/gold.gif\" border=\"0\" alt=\"Gold Membership Info\" /></a>";<br />    }<br />	if (preg_match("/-11-/",$postergroup))  { // adjust this group number if needed<br />   			$postrow[$i]['GroupName'] = "<a href=\"{$config['phpurl']}/mypaymentpal/mypaymentpal.php\">Silver Member<img src=\"{$config['images']}/silver.gif\" border=\"0\" alt=\"Silver Membership Info\" /></a>";<br />    }<br />


Same code applies to showthreaded.php as well.

Now just change the images to whatever you want and place it your threadsdir/images directory (also don't forget your own group numbers)

Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Thanks.. I will have to see If I can get this to work.

Joined: Dec 1999
Posts: 158
Enthusiast
Enthusiast
Offline
Joined: Dec 1999
Posts: 158
I applied the hack, first it didn´t work at all, then I figured out that "t1.B_Sticky" has to be removed in order to get this working.

Only problem now is, in threaded mode, the date and time of the first posting are displayed in the unix time format, every post after that is converted correctly.
example

can you give me a hint what is causing this?

thx!

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Post deleted by Pasqualist

Joined: Jan 2003
Posts: 338
Enthusiast
Enthusiast
Offline
Joined: Jan 2003
Posts: 338
So I still wait fo official version

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Works as well in 6.5.1b5


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)