Welcome, Guest. Please Login or Register.
April 16, 2024, 02:50:34 PM
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  |  Completed mods  |  [Done 1.5.1] Global Moderator center. « previous next »
Pages: 1 2 3 [4] 5 6 ... 24 Reply Ignore Print
Author Topic: [Done 1.5.1] Global Moderator center.  (Read 142886 times)
Chris Cromer
The Strange One
Mod Team
YaBB God
*****
Posts: 3152


I am just a figment of your imagination.

WWW
Re:[Done] Global Moderator center.
« Reply #45 on: May 04, 2002, 11:46:37 PM »
Reply with quote

Alright now open ModSettings.php and look for this:

   $gmodcensorChecked = ($modSettings['gmodcensor'] == '1')?' checked':'';
And add this after it:

   $gmodtemplateChecked = ($modSettings['gmodtemplate'] == '1')?' checked':'';
Then search for:

   <td class="windowbg2" bgcolor="$color[windowbg2]"><input type=checkbox name="gmodnewsChecked" $gmodnewsChecked></td>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color[windowbg2]"><font size="2">$txt[gmod6]</font></td>
    <td class="windowbg2" bgcolor="$color[windowbg2]"><input type=checkbox name="gmodbanChecked" $gmodbanChecked></td>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color[windowbg2]"><font size="2">$txt[gmod7]</font></td>
    <td class="windowbg2" bgcolor="$color[windowbg2]"><input type=checkbox name="gmodreserveChecked" $gmodreserveChecked></td>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color[windowbg2]"><font size="2">$txt[gmod8]</font></td>
    <td class="windowbg2" bgcolor="$color[windowbg2]"><input type=checkbox name="gmodcensorChecked" $gmodcensorChecked></td>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color[windowbg2]" colspan="2" align="center" valign="middle">
    <HR size="1" width="100%" class="windowbg3"><input type="submit" value="$txt[10]">
    </td>
  </tr>[code]

and replace it with:

[code]<tr>
    <td class="windowbg2" bgcolor="$color[windowbg2]"><font size="2">$txt[gmod5]</font></td>
    <td class="windowbg2" bgcolor="$color[windowbg2]"><input type=checkbox name="gmodnewsChecked" $gmodnewsChecked></td>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color[windowbg2]"><font size="2">$txt[gmod6]</font></td>
    <td class="windowbg2" bgcolor="$color[windowbg2]"><input type=checkbox name="gmodbanChecked" $gmodbanChecked></td>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color[windowbg2]"><font size="2">$txt[gmod7]</font></td>
    <td class="windowbg2" bgcolor="$color[windowbg2]"><input type=checkbox name="gmodreserveChecked" $gmodreserveChecked></td>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color[windowbg2]"><font size="2">$txt[gmod8]</font></td>
    <td class="windowbg2" bgcolor="$color[windowbg2]"><input type=checkbox name="gmodcensorChecked" $gmodcensorChecked></td>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color[windowbg2]"><font size="2">Moderator can edit template</font></td>
    <td class="windowbg2" bgcolor="$color[windowbg2]"><input type=checkbox name="gmodtemplateChecked" $gmodtemplateChecked></td>
  </tr><tr>
    <td class="windowbg2" bgcolor="$color[windowbg2]" colspan="2" align="center" valign="middle">
    <HR size="1" width="100%" class="windowbg3"><input type="submit" value="$txt[10]">
    </td>
  </tr>

Then look for:

   $onoffArray = array('stickyTopicsChecked'=>'enableStickyTopics', 'titlesEnableChecked'=>'titlesEnable', 'onlineEnableChecked'=>'onlineEnable', 'todayModChecked'=>'todayMod', 'previousNextModChecked'=>'enablePreviousNext', 'enableVBStyleLoginChecked'=>'enableVBStyleLogin', 'enableCompressedOutputChecked'=>'enableCompressedOutput', 'karmaTRAChecked'=>'karmaTimeRestrictAdmins', 'disableCachingChecked'=>'disableCaching', 'enableInlineLinksChecked'=>'enableInlineLinks', 'attachCheckExten'=>'attachmentCheckExtensions', 'attachGuest'=>'attachmentEnableGuest', 'attachShow'=>'attachmentShowImages', 'enableSP1Info'=>'enableSP1Info', 'enableUserTopicLockingChecked'=>'enableUserTopicLocking', 'enableReportToModChecked'=>'enableReportToMod', 'enableErrorLoggingChecked'=>'enableErrorLogging', 'viewNewestFirstChecked'=>'viewNewestFirst',  'userLanguageChecked'=>'userLanguage', 'trackStatsChecked'=>'trackStats', 'hitStatsChecked'=>'hitStats', 'notifyAnncmnts_UserDisable'=>'notifyAnncmnts_UserDisable', 'censorWholeWordChecked'=>'censorWholeWord', 'compactTopicPagesChecked'=>'compactTopicPagesEnable','gmodnewsChecked'=>'gmodnews','gmodbanChecked'=>'gmodban','gmodreserveChecked'=>'gmodreserve','gmodcensorChecked'=>'gmodcensor');
And replace it with:

   $onoffArray = array('stickyTopicsChecked'=>'enableStickyTopics', 'titlesEnableChecked'=>'titlesEnable', 'onlineEnableChecked'=>'onlineEnable', 'todayModChecked'=>'todayMod', 'previousNextModChecked'=>'enablePreviousNext', 'enableVBStyleLoginChecked'=>'enableVBStyleLogin', 'enableCompressedOutputChecked'=>'enableCompressedOutput', 'karmaTRAChecked'=>'karmaTimeRestrictAdmins', 'disableCachingChecked'=>'disableCaching', 'enableInlineLinksChecked'=>'enableInlineLinks', 'attachCheckExten'=>'attachmentCheckExtensions', 'attachGuest'=>'attachmentEnableGuest', 'attachShow'=>'attachmentShowImages', 'enableSP1Info'=>'enableSP1Info', 'enableUserTopicLockingChecked'=>'enableUserTopicLocking', 'enableReportToModChecked'=>'enableReportToMod', 'enableErrorLoggingChecked'=>'enableErrorLogging', 'viewNewestFirstChecked'=>'viewNewestFirst',  'userLanguageChecked'=>'userLanguage', 'trackStatsChecked'=>'trackStats', 'hitStatsChecked'=>'hitStats', 'notifyAnncmnts_UserDisable'=>'notifyAnncmnts_UserDisable', 'censorWholeWordChecked'=>'censorWholeWord', 'compactTopicPagesChecked'=>'compactTopicPagesEnable','gmodnewsChecked'=>'gmodnews','gmodbanChecked'=>'gmodban','gmodreserveChecked'=>'gmodreserve','gmodcensorChecked'=>'gmodcensor','gmodtemplateChecked'=>'gmodtemplate');
After you are through with this let me know[/code][/code]
« Last Edit: May 04, 2002, 11:50:14 PM by AGISCI » Logged

Chris Cromer

I am not suffering from insanity, I am enjoying every minute of it.
Ironman
Guest
Re:[Done] Global Moderator center.
« Reply #46 on: May 05, 2002, 12:09:43 AM »
Reply with quote

Done again.
Logged
Chris Cromer
The Strange One
Mod Team
YaBB God
*****
Posts: 3152


I am just a figment of your imagination.

WWW
Re:[Done] Global Moderator center.
« Reply #47 on: May 05, 2002, 12:16:49 AM »
Reply with quote

Alright last step, open Subs.php and look for:

   if($modSettings['gmodban']==1 || $modSettings['gmodreserve']==1 || $modSettings['gmodcensor']==1 || $modSettings['gmodnews']==1) {
      if($settings[7] == 'Global Moderator') { $yymenu = $yymenu.$menusep."<a href=\"$cgi;action=gmod\">$img[global]</a>"; }
   }

And replace it with:

   if($modSettings['gmodban']==1 || $modSettings['gmodreserve']==1 || $modSettings['gmodcensor']==1 || $modSettings['gmodnews']==1 || $modSettings['gmodtemplate']==1) {
      if($settings[7] == 'Global Moderator') { $yymenu = $yymenu.$menusep."<a href=\"$cgi;action=gmod\">$img[global]</a>"; }
   }

Then it should work, tell me if you get any bugs or errors.
Logged

Chris Cromer

I am not suffering from insanity, I am enjoying every minute of it.
Chris Cromer
The Strange One
Mod Team
YaBB God
*****
Posts: 3152


I am just a figment of your imagination.

WWW
Re:[Done] Global Moderator center.
« Reply #48 on: May 05, 2002, 12:25:14 AM »
Reply with quote

Whoops nevermind what I said about that being the last step, I forgot to tell you what to modify in Index.php... tell me when your ready to modify it.
« Last Edit: May 05, 2002, 12:26:09 AM by AGISCI » Logged

Chris Cromer

I am not suffering from insanity, I am enjoying every minute of it.
Ironman
Guest
Re:[Done] Global Moderator center.
« Reply #49 on: May 05, 2002, 12:38:55 AM »
Reply with quote

Seems to work, but i still can't switch it off... I think in the index.php and/or in the admin.php is something missing...
« Last Edit: May 05, 2002, 12:41:13 AM by Ironman » Logged
Chris Cromer
The Strange One
Mod Team
YaBB God
*****
Posts: 3152


I am just a figment of your imagination.

WWW
Re:[Done] Global Moderator center.
« Reply #50 on: May 05, 2002, 12:43:10 AM »
Reply with quote

I told you there is still one more file to edit... index.php

Look for:

else if ($action == 'modtemp') {
global $settings,$txt,$gmodnews,$gmodcensor,$gmodreserve,$gmodban;
  if($settings[7] == 'Global Moderator') {
    include_once "$sourcedir/Gmod.php";
  }
  if($settings[7] == 'Administrator') {  
    include_once "$sourcedir/Admin.php";
  }
  ModifyTemplate();
}
else if ($action == 'modtemp2') {
global $settings,$txt,$gmodnews,$gmodcensor,$gmodreserve,$gmodban;
  if($settings[7] == 'Global Moderator') {
    include_once "$sourcedir/Gmod.php";
  }
  if($settings[7] == 'Administrator') {  
    include_once "$sourcedir/Admin.php";
  }
  ModifyTemplate2();
}

And replace it with:

else if ($action == 'modtemp') {
global $settings,$txt,$gmodnews,$gmodcensor,$gmodreserve,$gmodban;
  if($settings[7] == 'Global Moderator') {
    if ($modSettings['gmodtemplate']=='1'){
      include_once "$sourcedir/Gmod.php";
    }
  }
  if($settings[7] == 'Administrator') {  
    include_once "$sourcedir/Admin.php";
  }
  ModifyTemplate();
}
else if ($action == 'modtemp2') {
global $settings,$txt,$gmodnews,$gmodcensor,$gmodreserve,$gmodban;
  if($settings[7] == 'Global Moderator') {
    if ($modSettings['gmodtemplate']=='1'){
      include_once "$sourcedir/Gmod.php";
    }
  }
  if($settings[7] == 'Administrator') {  
    include_once "$sourcedir/Admin.php";
  }
  ModifyTemplate2();
}
Logged

Chris Cromer

I am not suffering from insanity, I am enjoying every minute of it.
Ironman
Guest
Re:[Done] Global Moderator center.
« Reply #51 on: May 05, 2002, 12:46:29 AM »
Reply with quote

Quote from: AGISCI on May 05, 2002, 12:25:14 AMWhoops nevermind what I said about that being the last step, I forgot to tell you what to modify in Index.php... tell me when your ready to modify it.

Sorry, I've completely overseen this, sorry...  8)
I'll tell you when ready...
Logged
Ironman
Guest
Re:[Done] Global Moderator center.
« Reply #52 on: May 05, 2002, 12:59:21 AM »
Reply with quote

If I do so, I get this if it is disallowed:
Fatal error: Call to undefined function: modifytemplate() in /www/htdocs/myserver/mario/tb/index.php on line 150

Line 150 of index.php:
ModifyTemplate();

If the Admin has allowed it, everything is okay.

Logged
Chris Cromer
The Strange One
Mod Team
YaBB God
*****
Posts: 3152


I am just a figment of your imagination.

WWW
Re:[Done] Global Moderator center.
« Reply #53 on: May 05, 2002, 01:03:05 AM »
Reply with quote

Sorry about that replace:

else if ($action == 'modtemp') {
global $settings,$txt,$gmodnews,$gmodcensor,$gmodreserve,$gmodban;
  if($settings[7] == 'Global Moderator') {
    include_once "$sourcedir/Gmod.php";
  }
  if($settings[7] == 'Administrator') {  
    include_once "$sourcedir/Admin.php";
  }
  ModifyTemplate();
}
else if ($action == 'modtemp2') {
global $settings,$txt,$gmodnews,$gmodcensor,$gmodreserve,$gmodban;
  if($settings[7] == 'Global Moderator') {
    include_once "$sourcedir/Gmod.php";
  }
  if($settings[7] == 'Administrator') {  
    include_once "$sourcedir/Admin.php";
  }
  ModifyTemplate2();
}

with:

else if ($action == 'modtemp') {
global $settings,$txt,$gmodnews,$gmodcensor,$gmodreserve,$gmodban;
  if($settings[7] == 'Global Moderator') {
    if ($modSettings['gmodtemplate']=='1'){
      include_once "$sourcedir/Gmod.php";
    }
    else {
      fatal_error('Sorry but the admin has not given you permission to edit the template.');
    }
  }
  if($settings[7] == 'Administrator') {  
    include_once "$sourcedir/Admin.php";
  }
  ModifyTemplate();
}
else if ($action == 'modtemp2') {
global $settings,$txt,$gmodnews,$gmodcensor,$gmodreserve,$gmodban;
  if($settings[7] == 'Global Moderator') {
    if ($modSettings['gmodtemplate']=='1'){
      include_once "$sourcedir/Gmod.php";
    }
    else {
      fatal_error('Sorry but the admin has not given you permission to edit the template.');
    }
  }
  if($settings[7] == 'Administrator') {  
    include_once "$sourcedir/Admin.php";
  }
  ModifyTemplate2();
}


The reason it was giving off that error was because there wasn't any error message in place telling the user that he can't edit it.
« Last Edit: May 05, 2002, 01:10:05 AM by AGISCI » Logged

Chris Cromer

I am not suffering from insanity, I am enjoying every minute of it.
Chris Cromer
The Strange One
Mod Team
YaBB God
*****
Posts: 3152


I am just a figment of your imagination.

WWW
Re:[Done] Global Moderator center.
« Reply #54 on: May 05, 2002, 01:13:22 AM »
Reply with quote

Just to let you know, I noticed I accidentally left the $txt[] in my post above so I edited my post above to fix the weird looking text saying that the admin hasn't given you permission.
« Last Edit: May 05, 2002, 01:14:07 AM by AGISCI » Logged

Chris Cromer

I am not suffering from insanity, I am enjoying every minute of it.
Ironman
Guest
Re:[Done] Global Moderator center.
« Reply #55 on: May 05, 2002, 01:14:10 AM »
Reply with quote

Hmm, that sounds logical.

But now, after I've taken $txt[] away from the two Error Messages, it's

PERFECT, Thank you!
Logged
Chris Cromer
The Strange One
Mod Team
YaBB God
*****
Posts: 3152


I am just a figment of your imagination.

WWW
Re:[Done] Global Moderator center.
« Reply #56 on: May 05, 2002, 01:18:51 AM »
Reply with quote

Glad I could help. I still have more plans and changes for this mod though, I want to make it so the Global Moderator can't see the admin's IP address, this would prevent the Global Moderator from banning the admins.
Logged

Chris Cromer

I am not suffering from insanity, I am enjoying every minute of it.
Ironman
Guest
Re:[Done] Global Moderator center.
« Reply #57 on: May 05, 2002, 01:20:26 AM »
Reply with quote

I'll wait for any Updates of this awesome Mod and use them all!  8)
So as it is at the moment, I cann good work with it.  ;D
Logged
fratze
Jr. Member
**
Posts: 91


I'm a llama!

Re:[Done] Global Moderator center.
« Reply #58 on: May 05, 2002, 02:07:42 AM »
Reply with quote

Thanks for this,but ....

BoardMod says NO Errors but after installation is no Button "Global Moderator" appears.

In Mod Settings is also everything correct but my Global Moderators have no way to go to the Global Moderator Center,I've uploaded the image in the imagesdir,is that right ?

What went wrong,what can i do ??

Fratze
Logged
Chris Cromer
The Strange One
Mod Team
YaBB God
*****
Posts: 3152


I am just a figment of your imagination.

WWW
Re:[Done] Global Moderator center.
« Reply #59 on: May 05, 2002, 04:48:07 AM »
Reply with quote

You have to upload dbmod.php and run it before it will work. dbmod.php will install all the needed database tables.
Logged

Chris Cromer

I am not suffering from insanity, I am enjoying every minute of it.
Pages: 1 2 3 [4] 5 6 ... 24 Reply Ignore Print 
YaBB SE Community  |  Development  |  Completed mods  |  [Done 1.5.1] Global Moderator center. « 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.026 seconds with 19 queries.