If you want them all to have different images, yes.... duplicate this section:
// ------------------ // Add the special flag if they are part of the special group - hack by JoshPet elseif (preg_match("/-5-/",$postergroup)) { // adjust this group number if needed $UserStatus = "<img src="{$config['images']}/specialflagA.gif" alt="SPECIAL" border="0" />"; elseif (preg_match("/-6-/",$postergroup)) { // adjust this group number if needed $UserStatus = "<img src="{$config['images']}/specialflagB.gif" alt="SPECIAL" border="0" />"; etc....
Be sure to change the group number and image name each time.
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.
I have attached the BAD file, just so that you can see that I increased my groups and used seperate images.
FYI, groups were established and images were in place.
// Add the special flag if they are part of the special group - hack by JoshPet elseif (preg_match("/-5-/",$postergroup)) { // adjust this group number if needed $UserStatus = "<img src="{$config['images']}/specialflagA.gif" alt="SPECIAL" border="0" />"; } elseif (preg_match("/-6-/",$postergroup)) { // adjust this group number if needed $UserStatus = "<img src="{$config['images']}/specialflagB.gif" alt="SPECIAL" border="0" />"; } etc....
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
If you get time it would be nice to tie the loose end on this hack.
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)?
// ------------------------------ // Grab the profile for this user $User = addslashes($User);
$query = " SELECT U_Username,U_Fakeemail,U_Name,U_Totalposts,U_Homepage,U_Occupation, U_Hobbies,U_Location,U_Bio,U_Extra1,U_Extra2,U_Extra3,U_Extra4,U_Extra5, U_Registered,U_Picture,U_Title,U_Status,U_Number,U_Rating,U_Rates, U_Picwidth,U_Picheight,U_Groups,U_BirthMonth,U_BirthDay,U_BirthYear FROM {$config['tbprefix']}Users WHERE U_Number = '$User' "; $sth = $dbh -> do_query($query);
// ---------------- // Assign the stuff list ($CheckUser,$Fakeemail,$Name,$Totalposts,$Homepage,$Occupation, $Hobbies,$Location,$Bio,$ICQ,$Extra2,$Extra3,$Extra4,$Extra5, $Registered,$Picture,$Title,$Userstatus,$UNumber,$Rating,$Rates, $width,$height,$Groups,$BirthMonth,$BirthDay,$BirthYear) = $dbh -> fetch_array($sth); $dbh -> finish_sth($sth);
//----------------- //See if they get a status flag - by JoshPet if(preg_match("/-5-/",$Groups)) { $UserGroup = "<img src="{$config['images']}/specialflag5.gif" alt="SuperSport Supporter" border="0" />"; } elseif(preg_match("/-6-/",$Groups)) $UserGroup = "<img src="{$config['images']}/specialflag6.gif" alt="Superbike Supporter" border="0" />"; } elseif(preg_match("/-7-/",$Groups)) $UserGroup = "<img src="{$config['images']}/specialflag7.gif" alt="GP Supporter" border="0" />"; } else { $UserGroup = ""; }
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.
Thanks Josh, 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!!!!
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)
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!
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.
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.
I installed this hack on 6.2.3 this evening, but I'm having problems with the threaded view. The icons won't show up on the reply list.
I'm assuming this is handled by the code changes around line 150 in showthreaded.php. My hacked area looks like this:
elseif (preg_match("/-5-/",$postergroup)) { // adjust the group number if needed $UserStatus = "<img src="{$config['images']}/industry.gif" alt="Industry Rep" border="0" />"; } elseif (preg_match("/-6-/",$postergroup)) { // adjust the group number if needed $UserStatus = "<img src="{$config['images']}/aodstaff.gif" alt="AoD Staff" border="0" />"; } elseif (preg_match("/-7-/",$postergroup)) { // adjust the group number if needed $UserStatus = "<img src="{$config['images']}/va.gif" alt="Voice Actor" border="0" />"; } elseif (preg_match("/-8-/",$postergroup)) { // adjust the group number if needed $UserStatus = "<img src="{$config['images']}/retailer.gif" alt="Retailer" border="0" />"; }
It's never worked right in the replies of threaded view. It's tacked onto the admin /mod flag thing... and I don't believe that the admin /mod flags have ever worked right in threaded view on replies. I think that's always been a bug.
I always assumed that when the Admin/Mod flag issue gets resolved in threads, this would function properly in that area as well.
Well... it appears the admin/mod flags are working properly in the latest version of threads.
I'll have to look at this bit again.... it should work the same as admin/mod flags. It probably wont' be until I get back from vacation until I can look at it though.
No I use this myself on several production sites, probably for almost a year. No problems. You've never posted any details of what "doesn't work"... so without more details, I don't really have any answers other than start again with a clean copy of the scripts and make sure you got all the steps.
95% of the problems with hacks, (and this happens when I install them as well) are problems with doing all the steps. When I have trouble.... first I backup and try again and make sure I did't miss a step.
Then if that still doesn't work, then I suspect a conflict with another hack... so then I try with a clean "out of the box" copy of the scripts. That usually helps me narrow it down.
I have entered the code as requested. However, no users are getting the new little flag.
If I change the setting to group 2 or 3 which would be for Moderators, or Users, then the flags are applied as I would expect.. but using any group that has been created, it ignores it, and you do not see the flag.
I have tried all the steps multiple times, and the same thing happens time and time again.
I have no other hacks installed on version 6.2.3.
It is now set to "5" which is for the group I have created, I have added some users to this group, and there are no flags.
Thanks Josh, forcing the membership works.. so I guess the hack IS working, but the group membership side of UBB isnt working Ill have to raise that with Infopop then, could also explain why I have never been able to demote moderators!
UPDATE w3t_Users SET U_Groups = '-3-5-' WHERE U_Number = 'xxx'
Have you done much hacking? If you haven't done much to the admin section, I would try uploading a clean copy of the /admin directory... then see if the group problem is fixed. It would seem to me that an old script, without the get_input function of 6.2 might be kicking around.
I've been looking at this a little more, and I think that my group 5, or at least the group I thought was 5, isnt in fact 5.. I've listed (using the above commands) other users that ive added to groups, and they are not listed as being in -5- but numbers up as high as -23- .. seeing as I only have 7 groups, how the hell did they get that high?
How do I find out what numbers my groups are?!
Threads is nice, but the user managment side of it is crap!
What I did was do a join with the Users table to get the correct group value for each post, and had this added to the $tree-array. The way it works now it only checks on $postergroup which is the group for the post you are looking at, which is not the same as what should be shown in the list. Also, inside the show_replies() function it won't even apply as that value is set outside the function.
In 6.2+ the join is already there, so it's mostly a matter of adding U_Groups to the query in all places in both postlist and showthreaded. And passing it along in the $tree array along with all the other values of course.
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.