Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
blith
Client



Joined: Jul 18, 2003
Posts: 977

PostPosted: Thu Jan 08, 2004 2:29 pm Reply with quote

I recently went back to the default navigation block and I was wondering is there a way so that the inactive module list does not show up for admins? thanks.
 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Thu Jan 08, 2004 5:44 pm Reply with quote

Only by altering the code.
 
View user's profile Send private message
blith







PostPosted: Fri Jan 09, 2004 9:22 am Reply with quote

thank you. Is this one of those teach the man to fish things? Wink
 
blith







PostPosted: Fri Jan 09, 2004 9:42 am Reply with quote

Okay, I went and I learned how to fish... here is the code to take out of the Modules block if you do not want admin to see inactive modules.
Code:
$content .= "<br><center><b>"._NOACTIVEMODULES."</b><br>";

   $content .= "<font class=\"tiny\">"._FORADMINTESTS."</font></center><br>";
   $sql = "SELECT title, custom_title FROM ".$prefix."_modules WHERE active='0' ORDER BY title ASC";
   $result = $db->sql_query($sql);
   while ($row = $db->sql_fetchrow($result)) {
       $mn_title = $row[title];
       $custom_title = $row[custom_title];
       $mn_title2 = ereg_replace("_", " ", $mn_title);
       if ($custom_title != "") {
      $mn_title2 = $custom_title;
       }
       if ($mn_title2 != "") {
      $content .= "<strong><big>&middot;</big></strong>&nbsp;<a href=\"modules.php?name=$mn_title\">$mn_title2</a><br>\n";
      $dummy = 1;
       } else {
      $a = 1;
       }
   }
   if ($a == 1 AND $dummy != 1) {
           $content .= "<strong><big>&middot;</big></strong>&nbsp;<i>"._NONE."</i><br>\n";
 
Raven







PostPosted: Fri Jan 09, 2004 10:41 am Reply with quote

blith wrote:
thank you. Is this one of those teach the man to fish things? Wink
Yep Laughing. You only asked if there was a way - not what is the way.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©