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
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.
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 ?
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)
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
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.