CZMV4-75 Seperate Invisible Modules & add links??

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   CZMV4-75 Seperate Invisible Modules & add links??
Goldberg
CZ Newbie
Goldberg has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Feb 09, 2004
0.00 posts per day
Posts: 6
Points: 1,620
   


This is how mu modules block looks like. Its the CZMV4-75 version. I've got thye Invisible and Inactive modules out of the dropbox (this is a combination of CZMV4-75 and CZModules71)

I would like to add the Troggle function to the Invisible and Inactive but don't know where to start. It has to be beneath the dropbox.

This is the code I use for the Only Admin function:
/* If you're Admin you and only you can see Inactive modules and test it */
/* If you copied a new module is the /modules/ directory, it will be added to the database */
   if (is_admin($admin)) {
   $handle=opendir('modules');
   while ($file = readdir($handle)) {
       if ( (!ereg("[.]",$file)) ) {
      $modlist .= "$file ";
       }
   }
   closedir($handle);
   $modlist = explode(" ", $modlist);
   sort($modlist);
   for ($i=0; $i < sizeof($modlist); $i++) {
       if($modlist[$i] != "") {
      $row4 = $db->sql_fetchrow($db->sql_query("SELECT mid FROM ".$prefix."_modules WHERE title='$modlist[$i]'"));
      $mid = intval($row4['mid']);
      $mod_uname = ereg_replace("_", " ", $modlist[$i]);
      if ($mid == "") {
          $db->sql_query("INSERT INTO ".$prefix."_modules VALUES (NULL, '$modlist[$i]', '$mod_uname', '0', '0', '1', '0')");
      }
       }
   }

        $content .= "<table border=0 cellpadding='1' cellspacing=1><tr><td width='16'><img src=\"$closedimg\" align=\"absmiddle\" border=\"0\"></td><td><b>"._INVISIBLEMODULES."</b></a></td></tr></table>\n";
   $content .= " ;; ;; ;; ;; ;; ;; ;;<font class=\"tiny\">"._ACTIVEBUTNOTSEE."</font><br>";
   $result5 = $db->sql_query("SELECT title, custom_title FROM ".$prefix."_modules WHERE active='1' AND inmenu='0' ORDER BY title ASC");
   while ($row5 = $db->sql_fetchrow($result5)) {
       $mn_title = stripslashes($row5['title']);
       $custom_title = $row5['custom_title'];
       $mn_title2 = ereg_replace("_", " ", $mn_title);
       if ($custom_title != "") {
      $mn_title2 = $custom_title;
       }
       if ($mn_title2 != "") {
      $content .= " ;; ;; ;; ;; ;;<img src=\"images/arrow.gif\" border=\"0\"> ;; ;;<a href=\"modules.php?name=$mn_title\">$mn_title2</a><br>\n";
      $dummy = 1;
       } else {
      $a = 1;
       }
   }
   if ($a == 1 AND $dummy != 1) {
           $content .= " ;; ;; ;; ;; ;;<img src=\"images/arrow.gif\" border=\"0\"> ;; ;;<i>"._NONE."</i><br><br>\n";

   }
        $content .= "<table border=0 cellpadding='1' cellspacing=1><tr><td width='16'><img src=\"$closedimg\" align=\"absmiddle\" border=\"0\"></td><td><b>"._NOACTIVEMODULES."</b></a></td></tr></table>\n";
   $content .= " ;; ;; ;; ;; ;; ;; ;;<font class=\"tiny\">"._FORADMINTESTS."</font><br>";
   $result6 = $db->sql_query("SELECT title, custom_title FROM ".$prefix."_modules WHERE active='0' ORDER BY title ASC");
   while ($row6 = $db->sql_fetchrow($result6)) {
       $mn_title = stripslashes($row6['title']);
       $custom_title = $row6['custom_title'];
       $mn_title2 = ereg_replace("_", " ", $mn_title);
       if ($custom_title != "") {
      $mn_title2 = $custom_title;
       }
       if ($mn_title2 != "") {
      $content .= " ;; ;; ;; ;; ;;<img src=\"images/arrow.gif\" border=\"0\"> ;; ;;<a href=\"modules.php?name=$mn_title\">$mn_title2</a><br>\n";
      $dummy = 1;
       } else {
      $a = 1;
       }
   }
   if ($a == 1 AND $dummy != 1) {
           $content .= " ;; ;; ;; ;; ;;<img src=\"images/arrow.gif\" border=\"0\"> ;; ;;<i>"._NONE."</i><br>\n";
   }
    }


Can anybody help me to get this done?


Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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 cannot attach files in this forum
You cannot download files in this forum