 |
 |
 |
 |
#229761 - 12/26/02 01:50 AM
[6.2] User Group Status Flag v1.1
|
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Add to del.icio.us
Digg it
|
Mod Name / Version: UserGroupStatusFlag1.1.txt <br /> ver 1.1 - Updated instructions to work with 6.2 <br /> <br /> Description: This hack will add an image that you supply next to a user's name based on their usergroup (like the mod and admin flag) <br /> <br /> Working under: UBB.threads 6.2 <br /> <br /> Any pre-requisites: none <br /> <br /> Author(s): JoshPet www.joshuapettit.com <br /> for discussions and bugs go to www.threadsdev.com <br /> <br /> Date: 12/26/02 <br /> <br /> Credits: kaspar for suggesting it <br /> <br /> Files Altered: postlist.php, showflat.php, showthreaded.php <br /> <br /> Database Altered: No. <br /> <br /> New Files: You supply whatever custom graphic you want. <br /> <br /> Screenshot: <br />[]http://www.pettitfamily.net/josh/groupflagscreen.gif[/]
Attachments
62515-UserGroupStatusFlag1.1.txt (185 downloads)
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#229766 - 12/31/02 01:11 AM
Re: [6.2] User Group Status Flag 1.1
[Re: Daine]
|
Member
Registered: 10/29/02
Posts: 167
Loc: So Cal USA
|
Josh, <br /> <br />I took the Showprofile.php and Showprofile.tmpl hack for this from 6.1 and tried it as was and with some estimated changes, none of which worked for me <img src="/forum/images/graemlins/confused.gif" alt="" /> <br /> <br />If you get time it would be nice to tie the loose end on this hack. <br /> <br />Here is what I last tried in showprofile.php which is breaking somewhere in here. Could it be the (elsif) statement (I'm doing 3 levels of support)? <br /> <br />// ------------------------------ <br />// Grab the profile for this user <br /> $User = addslashes($User); <br /> <br /> $query = " <br /> SELECT U_Username,U_Fakeemail,U_Name,U_Totalposts,U_Homepage,U_Occupation, <br />U_Hobbies,U_Location,U_Bio,U_Extra1,U_Extra2,U_Extra3,U_Extra4,U_Extra5, <br />U_Registered,U_Picture,U_Title,U_Status,U_Number,U_Rating,U_Rates, <br />U_Picwidth,U_Picheight,U_Groups,U_BirthMonth,U_BirthDay,U_BirthYear <br /> FROM {$config['tbprefix']}Users <br /> WHERE U_Number = '$User' <br /> "; <br /> $sth = $dbh -> do_query($query); <br /> <br />// ---------------- <br />// Assign the stuff <br /> list ($CheckUser,$Fakeemail,$Name,$Totalposts,$Homepage,$Occupation, <br />$Hobbies,$Location,$Bio,$ICQ,$Extra2,$Extra3,$Extra4,$Extra5, <br />$Registered,$Picture,$Title,$Userstatus,$UNumber,$Rating,$Rates, <br />$width,$height,$Groups,$BirthMonth,$BirthDay,$BirthYear) = $dbh -> fetch_array($sth); <br /> $dbh -> finish_sth($sth); <br /> <br />//----------------- <br />//See if they get a status flag - by JoshPet <br />if(preg_match("/-5-/",$Groups)) { <br />$UserGroup = "<img src=\"{$config['images']}/specialflag5.gif\" alt=\"SuperSport Supporter\" border=\"0\" />"; <br /> } <br />elseif(preg_match("/-6-/",$Groups)) <br />$UserGroup = "<img src=\"{$config['images']}/specialflag6.gif\" alt=\"Superbike Supporter\" border=\"0\" />"; <br /> } <br />elseif(preg_match("/-7-/",$Groups)) <br />$UserGroup = "<img src=\"{$config['images']}/specialflag7.gif\" alt=\"GP Supporter\" border=\"0\" />"; <br /> } <br /> else { <br /> $UserGroup = ""; <br /> } <br />
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#229774 - 02/12/03 05:26 PM
Add on for Group Status: Stealth Mode
[Re: Daine]
|
Journeyman
Registered: 01/26/03
Posts: 127
Loc: bend, OR USA
|
ok this was a very odd request from one of my users, but nonetheless, i'm sure someone out there might have a use for this as well (especially if they are ashamed of the ammount of time the spend on your message board) <br /> <br />this add-on to Josh's modification makes it so users in a specific group don't have any details show up in showflat or threaded or showprofile.php... by details i mean, registered date, # of posts, it just has their name... stealth mode! <br /> <br />to prepare, you will need to create a group that is a Private Group, and get that group number, in my example, that group number is -5- you will have to replace with your number in order for this to work. <br /> <br />As always, backup your files kids! <br /> <br /> <br /> <br />//showflat.php// <br />around line 794 find: <br /> <br />elseif (preg_match("/-6-/",$postergroup)) { <br /> $postrow[$i]['UserStatus'] = "<img src=\"{$config['images']}/specialflag.gif\" alt=\"SPECIAL\" border=\"0\" />"; <br /> } <br />replace with: <br /> <br />elseif (preg_match("/-6-/",$postergroup)) { <br /> $postrow[$i]['UserStatus'] = "<img src=\"{$config['images']}/specialflag.gif\" alt=\"SPECIAL\" border=\"0\" />"; <br /> } <br /> elseif (preg_match("/-5-/",$postergroup)) { <br /> $postrow[$i]['TotalPosts'] = ""; <br /> $postrow[$i]['Location'] = ""; <br /> $postrow[$i]['Registered'] = ""; <br /> } <br /> <br />**where "/-5-/" is a new group for "stealth members" change to your group number <br />close and save, open <br /> <br /> <br />showthreaded.php <br />around line 744 find: <br /> <br />$Registered = "{$ubbt_lang['REGED_ON']} $Registered"; <br /> <br />replace with: <br /> <br />$Registered = "{$ubbt_lang['REGED_ON']} $Registered"; <br /> //stealth mode <br /> if (preg_match("/-5-/",$postergroup)) { <br /> $Registered = ""; <br /> } <br /> <br />and below that find: <br /> <br />$TotalPosts = "{$ubbt_lang['POSTS_TEXT']}: $TotalPosts"; <br /> <br /> <br />replace with <br /> <br />$TotalPosts = "{$ubbt_lang['POSTS_TEXT']}: $TotalPosts"; <br /> //stealth mode <br /> if (preg_match("/-5-/",$postergroup)) { <br /> $TotalPosts = ""; <br /> } <br /> <br />showprofile.php <br />first off you need to add in some variables for user groups: <br />around line 90 find: <br /> <br />SELECT U_Username,U_Fakeemail,U_Name,U_Totalposts,U_Homepage,U_Occupation, <br />U_Hobbies,U_Location,U_Bio,U_Extra1,U_Extra2,U_Extra3,U_Extra4,U_Extra5, <br />U_Registered,U_Picture,U_Title,U_Status,U_Number,U_Rating,U_Rates,U_Picwidth,U_Picheight <br /> <br />change to: <br /> <br />SELECT U_Username,U_Fakeemail,U_Name,U_Totalposts,U_Homepage,U_Occupation, <br />U_Hobbies,U_Location,U_Bio,U_Extra1,U_Extra2,U_Extra3,U_Extra4,U_Extra5, <br />U_Registered,U_Picture,U_Title,U_Status,U_Number,U_Rating,U_Rates,U_Picwidth,U_Picheight,U_Groups <br /> <br />and find: <br /> <br />list ($CheckUser,$Fakeemail,$Name,$Totalposts,$Homepage,$Occupation, <br />$Hobbies,$Location,$Bio,$ICQ,$Extra2,$Extra3,$Extra4,$Extra5, <br />$Registered,$Picture,$Title,$Userstatus,$UNumber,$Rating,$Rates, <br />$width,$height) = $dbh -> fetch_array($sth); <br /> <br />and change to: <br /> <br />list ($CheckUser,$Fakeemail,$Name,$Totalposts,$Homepage,$Occupation, <br />$Hobbies,$Location,$Bio,$ICQ,$Extra2,$Extra3,$Extra4,$Extra5, <br />$Registered,$Picture,$Title,$Userstatus,$UNumber,$Rating,$Rates, <br />$width,$height,$postergroup) = $dbh -> fetch_array($sth); <br /> <br />and find: <br /> <br />if ($thisuser['U_Status'] == "Moderator") { <br /> if ( ($config['modedit']) && ($Userstatus == "User") ) { <br /> $useredit = "<img src=\"{$config['images']}/editicon.gif\" align=\"top\" alt=\"\" /> "; <br /> $useredit .= "<a href=\"{$config['phpurl']}/admin/login.php?Cat=$Cat&User=$User&option=oneuser\">{$ubbt_lang['EDIT_T_U']}</a> | "; <br /> } <br /> } <br /> <br />and replace with <br /> <br />if ($thisuser['U_Status'] == "Moderator") { <br /> if ( ($config['modedit']) && ($Userstatus == "User") ) { <br /> $useredit = "<img src=\"{$config['images']}/editicon.gif\" align=\"top\" alt=\"\" /> "; <br /> $useredit .= "<a href=\"{$config['phpurl']}/admin/login.php?Cat=$Cat&User=$User&option=oneuser\">{$ubbt_lang['EDIT_T_U']}</a> | "; <br /> } <br /> } <br /> if (preg_match("/-5-/",$postergroup)) { <br /> $Totalposts = ''; <br /> $Registered = ''; <br /> $date = ''; <br /> } <br /> <br />and your done, you now have STEALTH MODE
|
|
Top
|
|
|
|
 |
 |
 |
 |
|
|