UBB.Dev
Posted By: JoshPet Beta-[6.4] Group Name Display 2.0 - 01/11/2004 10:18 AM
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.


Attached File
104685-GroupNameDisplay2.0.txt  (137 downloads)
Posted By: ksanuk Re: Beta-[6.4] Group Name Display 2.0 - 01/11/2004 12:12 PM
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!
Posted By: Pasqualist Re: Beta-[6.4] Group Name Display 2.0 - 01/11/2004 1:06 PM
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 ?
Posted By: JoshPet Re: Beta-[6.4] Group Name Display 2.0 - 01/11/2004 9:43 PM
Yeah, just instead of

"Bronze Member"

you could put

"<img src="http://whatever.com/what/whatever.gif" border="0" alt="Bronze Member" />"
Posted By: Pasqualist Re: Beta-[6.4] Group Name Display 2.0 - 01/11/2004 10:30 PM
great!
Thanks
Posted By: Storm_dup1 Re: Beta-[6.4] Group Name Display 2.0 - 01/13/2004 6:08 AM
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" />" [/]
Posted By: JoshPet Re: Beta-[6.4] Group Name Display 2.0 - 01/13/2004 7:04 AM
"<a href="http://www.whatever.com\what\donation.html"><img src="http://whatever.com/what/whatever.gif" border="0" alt="Bronze Member" /></a>"
Posted By: Storm_dup1 Re: Beta-[6.4] Group Name Display 2.0 - 01/13/2004 7:20 AM
ThankYou Soooooo much Josh!
Posted By: Pasqualist Re: Beta-[6.4] Group Name Display 2.0 - 01/13/2004 9:34 AM
Even better!
Posted By: tenshu Re: Beta-[6.4] Group Name Display 2.0 - 02/06/2004 11:53 PM
Great works well 6.4.1
Posted By: ericgtr Re: Beta-[6.4] Group Name Display 2.0 - 03/02/2004 9:29 PM
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)
Posted By: smilesforu Re: Beta-[6.4] Group Name Display 2.0 - 03/03/2004 11:30 AM
Thanks.. I will have to see If I can get this to work.
Posted By: flint testing with 6.5.1 beta4 - 01/05/2005 8:43 PM
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!
Posted By: Pasqualist Re: testing with 6.5.1 beta4 *DELETED* - 01/19/2005 2:10 AM
Post deleted by Pasqualist
Posted By: Slawek_L Re: testing with 6.5.1 beta4 - 01/19/2005 2:20 AM
So I still wait fo official version
Posted By: Pasqualist Re: testing with 6.5.1 beta4 - 02/15/2005 8:53 PM
Works as well in 6.5.1b5
© UBB.Developers