php forum
php mysql forum
php mysql smarty
 
Page 1 of 3 1 2 3 >
Topic Options
#229761 - 12/26/02 01:50 AM [6.2] User Group Status Flag v1.1
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC

   [6.2] User Group Status Flag v1.1 to Del.icio.us Add to del.icio.us
  Digg [6.2] User Group Status Flag v1.1 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)

_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#229762 - 12/30/02 02:26 AM Re: [6.2] User Group Status Flag 1.1 [Re: Daine]
sportbikes Offline
Member

Registered: 10/29/02
Posts: 167
Loc: So Cal USA
Josh,<br /><br />If I wanted to have 3 levels of supporters (that will later provide access to 3 level of information), I would have three more groups (5,6,7).<br /><br />Would I just duplicate the "Add Special flag" section changing the group number as necessary in the 6 sections that require it?
_________________________
mike
www.esportbike.com

Top
#229763 - 12/30/02 02:59 AM Re: [6.2] User Group Status Flag 1.1 [Re: alsalmicom]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
If you want them all to have different images, yes.... duplicate this section:<br /><br />// ------------------<br />// Add the special flag if they are part of the special group - hack by JoshPet<br /> elseif (preg_match("/-5-/",$postergroup)) { // adjust this group number if needed <br /> $UserStatus = "<img src=\"{$config['images']}/specialflagA.gif\" alt=\"SPECIAL\" border=\"0\" />";<br /> elseif (preg_match("/-6-/",$postergroup)) { // adjust this group number if needed <br /> $UserStatus = "<img src=\"{$config['images']}/specialflagB.gif\" alt=\"SPECIAL\" border=\"0\" />";<br />etc....<br /><br />Be sure to change the group number and image name each time. <img src="/forum/images/graemlins/wink.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#229764 - 12/30/02 04:27 AM Re: [6.2] User Group Status Flag 1.1 [Re: Daine]
sportbikes Offline
Member

Registered: 10/29/02
Posts: 167
Loc: So Cal USA
Josh,<br /><br />The first group works fine, as it did before, but the mutliples didn't work. It broke where I added the additional groups. As I commented them out, the process went further and broke at the next occurance, until the additional groups were all commented out.<br /><br />I have attached the BAD file, just so that you can see that I increased my groups and used seperate images.<br /><br />FYI, groups were established and images were in place.<br />


Attachments
62958-BADpostlist.txt (76 downloads)



Edited by sportbikes (12/30/02 04:32 AM)
_________________________
mike
www.esportbike.com

Top
#229765 - 12/30/02 12:28 PM Re: [6.2] User Group Status Flag 1.1 [Re: alsalmicom]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Ack - I'm sorry, I forgot the closing }<br /><br /><br />So after each elseif statement you need a }<br /><br />Like this:<br /><br /><br />// Add the special flag if they are part of the special group - hack by JoshPet<br />elseif (preg_match("/-5-/",$postergroup)) { // adjust this group number if needed<br />$UserStatus = "<img src=\"{$config['images']}/specialflagA.gif\" alt=\"SPECIAL\" border=\"0\" />";<br />}<br />elseif (preg_match("/-6-/",$postergroup)) { // adjust this group number if needed<br />$UserStatus = "<img src=\"{$config['images']}/specialflagB.gif\" alt=\"SPECIAL\" border=\"0\" />";<br />}<br />etc....<br /><br />That should do it. <img src="/forum/images/graemlins/wink.gif" alt="" /><br /><br />Sorry. <img src="/forum/images/graemlins/tongue.gif" alt="" /><br /><br />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#229766 - 12/31/02 01:11 AM Re: [6.2] User Group Status Flag 1.1 [Re: Daine]
sportbikes Offline
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 />
_________________________
mike
www.esportbike.com

Top
#229767 - 12/31/02 01:21 AM Re: [6.2] User Group Status Flag 1.1 [Re: alsalmicom]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
So you are trying to get the flags to display in showprofile?<br /><br />This looks good... what kind of error are you getting?
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#229768 - 12/31/02 01:30 AM Re: [6.2] User Group Status Flag 1.1 [Re: Daine]
sportbikes Offline
Member

Registered: 10/29/02
Posts: 167
Loc: So Cal USA
yes, trying to show the specialflag in Showprofile next to name. You made the hack up as an in post addition to it in 6.1 HERE<br /><br />It broke in line 108 of showprofile.php.<br />
_________________________
mike
www.esportbike.com

Top
#229769 - 12/31/02 01:39 AM Re: [6.2] User Group Status Flag 1.1 [Re: alsalmicom]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Think I found it<br /><br />In the second and third<br /><br /> elseif(preg_match("/-6-/",$Groups)) {<br /><br /><br />You are missing the { at the end.<br /><br />Any time you do any kind of an "if, else, or elseif" statement, the whatever happens if it's true needs to be between { and }<br /><br />Maybe I left em out somewhere.<br /><br />I sometimes forget them here and there. Pain to track down sometimes.<br /><br />I think the file I've attached to THIS post should do it for you. <img src="/forum/images/graemlins/wink.gif" alt="" /><br /><br />Let me know. <img src="/forum/images/graemlins/smile.gif" alt="" /><br /><br />I've accounted for the Birthday mod as well. <img src="/forum/images/graemlins/wink.gif" alt="" /><br />


Attachments
63045-profile.txt (57 downloads)

_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#229770 - 12/31/02 01:57 AM Re: [6.2] User Group Status Flag 1.1 [Re: Daine]
sportbikes Offline
Member

Registered: 10/29/02
Posts: 167
Loc: So Cal USA
That was it!<br /><br />As always, thanks for the help and the quick response!!
_________________________
mike
www.esportbike.com

Top
#229771 - 01/06/03 12:25 AM Re: [6.2] User Group Status Flag 1.1 [Re: Daine]
sportbikes Offline
Member

Registered: 10/29/02
Posts: 167
Loc: So Cal USA
Josh, <br /> <br />I just noticed this and remembered there was no adjustment to the Threaded view? <br /> <br />In threaded view the first and only the first poster is reflected with the supporter icon if any posters are supporters, even if the first is NOT. <br /> <br />I have added an attachement showing the first poster with the icon, when he is not a supporter... only NJSII is. <br /> <br />I also noticed this same thing on your board, Josh. <br /> <br />Not all that worried about it since most of my members use Flat mode, bu thtought I would mention it. <br /> <br />


Attachments
63816-Snap2.jpg (72 downloads)



Edited by sportbikes (01/06/03 12:32 AM)
_________________________
mike
www.esportbike.com

Top
#229772 - 01/06/03 09:15 AM Re: [6.2] User Group Status Flag 1.1 [Re: alsalmicom]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Thanks. I'll look at it. Threaded view has always been buggy with admin/mod flags. I think *if* that is fixed, then we should be able to get this to work there too. <img src="/forum/images/graemlins/wink.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#229773 - 01/06/03 10:46 AM Re: [6.2] User Group Status Flag 1.1 [Re: Daine]
caymuc Offline
Enthusiast

Registered: 01/17/01
Posts: 449
Thanks Josh,<br />I think this hack is something I can really use! - Now I can flag my artistson the board as "officially approved", so people know those users are no fakers but the real artists.. Very cool!!!! Thank you!!!!
_________________________
Carl
Colour-Ize-Forums (test entry: user: 'test' pw: 'test2')

Top
#229774 - 02/12/03 05:26 PM Add on for Group Status: Stealth Mode [Re: Daine]
chillin Offline
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&amp;User=$User&amp;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&amp;User=$User&amp;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
_________________________
i see threads people
http://www.chinooktc.com

Top
#229775 - 02/12/03 06:03 PM Re: Add on for Group Status: Stealth Mode [Re: kwalenta]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
LOL<br /><br />Good idea. Thanks for posting it. <br />Some users are funny about what gets displayed. <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#229776 - 02/12/03 10:04 PM Re: Add on for Group Status: Stealth Mode [Re: Daine]
chillin Offline
Journeyman

Registered: 01/26/03
Posts: 127
Loc: bend, OR USA
forgot to add in that i modded user list as well so heaven forbid his register date and post count wouldn't show up there either.<br /><br />he offered me $ to do it as well!
_________________________
i see threads people
http://www.chinooktc.com

Top
#229777 - 02/13/03 12:38 AM Re: [6.2] User Group Status Flag 1.1 [Re: Daine]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Moved to Finished Mods forum.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#229778 - 03/20/03 12:50 PM Re: [6.2] User Group Status Flag 1.1 [Re: Daine]
MattUK Offline
Journeyman

Registered: 11/23/01
Posts: 137
I cannot get this working under 6.2.3<br /><br />If I set the group to 3, then everyone gets the moderator flag regardless, but any other group, and nothing happens.<br /><br />Any ideas?

Top
#229779 - 03/20/03 01:35 PM Re: [6.2] User Group Status Flag 1.1 [Re: statusblue]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
3 would be the "User" group, which everyone belongs to.<br /><br />I think it would have to be a user group 5 or higher. <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#229780 - 03/20/03 03:45 PM Re: [6.2] User Group Status Flag 1.1 [Re: Daine]
MattUK Offline
Journeyman

Registered: 11/23/01
Posts: 137
Yeah I get that part, but any other number doesn't work.. I've created loads of new groups (which it seems I now cant delete) and it doesnt work with any of them.

Top
Page 1 of 3 1 2 3 >


Top Posters Last 30 Days
AllenAyres 13
Gizmo 10
willing 2
S7ARBVCK 2
MattUK 1
Kevin H 1
tackaberry 1
Who's Online
0 Registered (), 21 Guests and 6 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Noob - need help, or a reality check!
by Gizmo
Yesterday at 03:21 AM
Here I am! Rock me like a Hurricane!
by AllenAyres
09/02/08 03:05 PM
[7.x] Generic Page Outside of forum directory
by Gizmo
08/30/08 05:43 PM
Team UBBDev Rides Again!
by Gizmo
08/28/08 11:45 PM
Multiple Identity Detector
by MattUK
08/28/08 04:10 PM
[7.3.x] ubb.links
by AllenAyres
08/26/08 09:57 AM
Installing FlashChat with 7.3
by Gizmo
08/23/08 05:36 AM
New Mods
Installing FlashChat with 7.3
by Paug
08/23/08 12:14 AM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
[7.2.1] - Naked shoutbox
by sirdude
08/17/07 10:36 PM
[7.x] Generic Page Outside of forum directory
by
01/14/07 10:58 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
Newest Members
veedubb8, twentyseven, Claus1, welcomeback1, Paug
13327 Registered Users