Welcome, Guest. Please Login or Register.
May 02, 2025, 02:36:43 AM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  How can I make the Info Center display only for Admin, GMods?? « previous next »
Pages: [1] Reply Ignore Print
Author Topic: How can I make the Info Center display only for Admin, GMods??  (Read 759 times)
tykatt
Noobie
*
Posts: 22


How can I make the Info Center display only for Admin, GMods??
« on: April 24, 2002, 10:33:46 PM »
Reply with quote

My board has various usergroups, with corresponding categories that only they can access... Gmods and Admins have access to everything.  Some user groups access more than one category...... thus its like several boards within one board.  

The thing is that I need to keep the groups somewhat private.  I'd like the Info Center to display only for GMods and Admins.  I did poke around in Boardindex.php, and finally decided I don't have the knowhow to write this mod *lol*.... any one out there that could help me?

tykatt~
Logged

When you least expect it..... expect it.
John R
PHP Challenged
Global Moderator
Sr. Member
*****
Posts: 387


Click, Click, Click, Bang!

ICQ - 3166233codehammer@thevortex.com
Re:How can I make the Info Center display only for Admin, GMods??
« Reply #1 on: April 25, 2002, 02:17:50 AM »
Reply with quote

I think that you need to look in boardindex.php for the following
 <tr>
    <td class="catbg" bgcolor="$color[catbg]" colspan="2"><font size="2" class="catbg"> <b>$txt[645]</b></font></td>
  </tr><tr>
    <td class="windowbg" bgcolor="$color[windowbg]" width="20" valign="middle" align="center"><img src="$imagesdir/info.gif" border="0" alt=""></td>
    <td class="windowbg2" bgcolor="$color[windowbg2]" width="100%">
   <table border="0" width="80%"><tr>
   <td><font size=1>$txt[94] $txt[64] <b>$totalt</b> &nbsp;&nbsp;&nbsp;&nbsp; $txt[94] $txt[95] <b>$totalm</b><br>
   $txt[659]
EOT;
include_once("$sourcedir/Recent.php");
$recentsender = "admin";
LastPost();
print <<<EOT
   <br><a href="$scripturl?action=recent">$txt[234]</a></font></td>
   <td><font size=1>
$txt[94] $txt[19] <b><a href="$scripturl?action=mlall">$memcount</a></b><br>
$thelatestmember2<br>
EOT;
if( $username != 'Guest' )
   print "$txt[yse199]: <b><a href=\"$scripturl?board=;action=im\">$messnum</a></b>";
print <<<EOT
</font></td>
   </tr></table>
</td>
 </tr>
EOT;
   }
   print <<<EOT
  <tr>
    <td class="catbg" bgcolor="$color[catbg]" colspan="2"><font size="2" class="catbg"> <b>$txt[158]</b></font></td>
  </tr><tr>
    <td class="windowbg" bgcolor="$color[windowbg]" width="20" valign="middle" align="center"><img src="$imagesdir/online.gif" border="0" alt=""></td>
    <td class="windowbg2" bgcolor="$color[windowbg2]" width="100%"><font size="2">$guests $txt[141], $numusersonline $txt[142]<br>$users</font></td>
  </tr>
EOT;
   if( $username != 'Guest' && $modSettings['enableSP1Info'] != 1) {
      print <<<EOT
  <tr>
    <td class="catbg" bgcolor="$color[catbg]" colspan="2"><font size="2" class="catbg"> <b>$txt[159]</b></font></td>
  </tr><tr>
    <td class="windowbg" bgcolor="$color[windowbg]" width="20" valign="middle" align="center"><img src="$imagesdir/message_sm.gif" border="0" alt=""></td>
    <td class="windowbg2" bgcolor="$color[windowbg2]" valign="top"><font size="2"><b><a href="$scripturl?board=;action=im">$txt[159]</a></b></font><br><font size="1">$txt[660] $messnum
EOT;
      if($messnum == 1) { print $txt[471]; }
      else { print $txt[153]; }
      print <<<EOT
    .... $txt[661] <a href="$scripturl?board=;action=im">$txt[662]</a> $txt[663]</font></td>
  </tr>
EOT;
}



and remove it and then the infocenter will not show.  Make a backup of the file first so you can restore it if my suggestion does not work or causes an error.

cheers...........
Logged

Be careful what you wish for, it might come true!

Note: I do not acknowledge support requests via PM, MSN or ICQ, please use the support boards.
tykatt
Noobie
*
Posts: 22


Re:How can I make the Info Center display only for Admin, GMods??
« Reply #2 on: April 25, 2002, 07:48:31 AM »
Reply with quote

thanks, but I need it to show for admins and gmods still.... if I blow away the code, I'm toast.....

I need some kind of if statement that checks who is loading the page, and if your admin/gmod, you see the info center.... if not, you don't see it.....

tykatt~
(who has been looking at the code so long now, she's going cross-eyed!)
Logged

When you least expect it..... expect it.
John R
PHP Challenged
Global Moderator
Sr. Member
*****
Posts: 387


Click, Click, Click, Bang!

ICQ - 3166233codehammer@thevortex.com
Re:How can I make the Info Center display only for Admin, GMods??
« Reply #3 on: April 25, 2002, 01:45:08 PM »
Reply with quote

Sorry, I missed that part.  Right at the beginning of the code that deals with the info center you need to enter this
if($settings[7]=='Administrator' || $settings[7]==' Moderator' || $settings[7]=='Global Moderator') {
print <<<EOT

That should make the info center invisable to all but admins, mods and gmods.

make a backup just in case it doesn't work.

cheers.........
Logged

Be careful what you wish for, it might come true!

Note: I do not acknowledge support requests via PM, MSN or ICQ, please use the support boards.
Delinquently insane
Foolish One
YaBB God
*****
Posts: 529


The One Surpassed By God!!!!

Re:How can I make the Info Center display only for Admin, GMods??
« Reply #4 on: April 25, 2002, 06:35:46 PM »
Reply with quote

Quoteif($settings[7]=='Administrator' || $settings[7]==' Moderator' || $settings[7]=='Global Moderator') {
print <<<EOT

You Have To Ad This At The Beginninf Of The If Statement You Want To Start From

Then Add a } at the end of which blocks you want to not show ive tested this and it works with no errors
dont forget to add } or it wont work  :)

example click on my home page all you can see is whos online  :)
Logged

ALL MODS Cancelled projected terminated
tykatt
Noobie
*
Posts: 22


Re:How can I make the Info Center display only for Admin, GMods??
« Reply #5 on: April 27, 2002, 08:30:37 AM »
Reply with quote

thanks guys :)

It took me a little time to figure out exactly where I wanted to start and end the if statement, but it's all good now.  Appreciate the help :)

ty~
Logged

When you least expect it..... expect it.
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  How can I make the Info Center display only for Admin, GMods?? « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.207 seconds with 20 queries.