UBB.Dev
Posted By: l0cke Modification to the Custom Status Rank? - 05/19/2002 6:20 PM
I believe I use Lord Dexter's Stars/Status Rank.. if he even made one.. It has been so long that I have a difficult time remembering..

I was just wondering if there was a way to stop the "Moderator" and stars from showing up if they weren't a Moderator in that specific forum..

Like.. Say "Leo" is the General Gaming Moderator, he would be seen as a Moderator in his own forum, whereas if he was in General Chat, then the General Chat Moderator, say Cactuar, would be seen as the Moderator, and Leo would not. But if Cactuar were to go to General Gaming, then Leo would be seen as the Moderator, and not Cactuar.

Am I being clear? It's hard to explain. lol
Umm, I never made any hacks for v5 besides one which was not that.
I don't believe that is possible frown
Posted By: Lord Dexter Re: Modification to the Custom Status Rank? - 05/21/2002 11:08 AM
Actually it is possible. All you need to do is remove the bit of code that changes the title. Somewhere in ubb_libary2.pl I believe.
Posted By: p2kewl Re: Modification to the Custom Status Rank? - 05/29/2002 11:43 PM
Yo dawg p2kewl here for ya! P2king back to help those in need. Been awhile since I posted so I might be a little rusty but I think I understand what you want to do.

You'll need to modify postings.cgi and ubb_library2.pl for what you want to accomplish.

I'm not sure what the variable is in the Stars Hack for the amount of stars based on your post count so for code sake, I'm going to use the $starnum variable. You'll want to change this to reflect what it is in your code. A simple grep replace should do the trick yo sup dawg! Here we goski alamodeski!

### Open POSTINGS.CGI ###

Find:

Code
[/code]After the last line add the following:

Code
</pre></div></div>First off, what we are doing is giving each forum you have on your message board a variable.  You'll want to change "General Discussions", "Latest Movies", and "Monthly Schedules" to the names of your specific forums.  Continue to add elsif for more forums if you want to add more than three.  The spacing and spelling MUST BE EXACT.  p2kewl4u.  Let's continue!<br><br>### Open UBB_LIBRARY2.PL ###<br><br>Now we're going to check for each variable set in postings.cgi and tell it what to do based on your mod and the forum you want/do not want them to have stars displayed.  p2kewl4u isn't it!  Who-ha!<br><br>You want to add this code at the very end of your stars hack code so whatever the last line for you looks like.  Example:<br><br><div class="ubbcode-block"><div class="ubbcode-header">Code</div><div class="ubbcode-body ubbcode-pre" ><pre>
It can go anywhere after that.

This is what you want to add:

[code]
You have to set a line of code for EACH MOD you WANT them to have stars displayed for and for each FORUM.

The $special_forum eq "GD" line is for the General Discussion forum variable we set in postings.cgi Change that to reflect the variables you set in postings.cgi. Also, you need to change the $thisline[2] eq "Name_of_Moderator" to the name of your moderator. So with the code provided, the star image should only show up when your Mod posts in the General Discussion forum and no where else...hopefully smile

I don't have the stars hack so I can't comment but the $starnum variable I used should be the same variable the stars hack uses.

This code is not tested but it should work. Fingers crossed. Hope that pointed you in the right direction.

p2kewl4u out!
© UBB.Developers