Removing A Main Menu Section

456

Mon Sep 11, 2017 8:09 pm
Blabbing Noob
64 Posts
Hiyah CoRpSe Dude!

I forgot how to remove/disable the section right under the last menu item.

There's a section that show Modules Invisible, Invisible Modules and Inactive Modules showing within the Main Menu.  Is there anyway to remove all of that information?  I couldn't find it anywhere in the Sommaire menu admin panel

Thanks for your help   hrm
Mon Sep 11, 2017 8:29 pm
Clan Leader
Top Dog
2630 Posts
coRpSE
Currently Offline
Offline

Most Played:
This week: 94.4hrs.
Total Played: 140hrs.
  
There is life outside of the game.
That is only show to those that are logged in as Admin, nobody else. So if you're afraid of others seeing it, well, if they are not admin, they wont/can't.

As for removing it, well if you really want it gone, then you need to edit the file:

block-Sommaire.php

Find: (Around line 808):

PHP:  [ Select all ]

    if ($som_groupmenu == 99 && $is_admin==1) { // si on est à la catégorie 99, on affiche tous les modules installés/activés/visibles qui n'ont pas été affichés dans les catégories.
 
       $content.="<tr><td>";
 
       for ($z=0;$z<count($module);$z++) {
 
           $customtitle2 str_replace ("_"," "$module[$z]);
 
           if (!empty($customtitle[$z])) {
 
               $customtitle2 $customtitle[$z];
 
           }
 
           if ($module[$z] != $main_module) {
 
                if (($is_admin===AND $view[$z] == 2) OR $view[$z] != 2) {

 
                   $incategories=0;
 
                   for ($i=0;$i<count($totalcategorymodules);$i++) {
 
                       if ($module[$z]==$totalcategorymodules[$i]) {
 
                           $incategories=1;
 
                       }
 
                   }
 
                   if ($incategories==0) {
 
                       $flagmenu $flagmenu+1;
 
                       if ($flagmenu==1) {
 
                           $content .="<hr><div align=\"center\">"._SOMMAIREADMINVIEWALLMODULES."</div>"  // si il y a des modules affichés en rubrique 99, on affiche avant une ligne horizontale
 
       $content.="<form action=\"modules.php\" method=\"get\" name=\"sommaireformlistboxvisibles\">"
 
                       ."<select width=\"100%\" name=\"somlistboxvisibles\" onchange=\"sommaire_envoielistbox(this.options[this.selectedIndex].value)\">"
 
                       ."<option value=\"select\">"._SOMSELECTALINK."";
 
                       }
 
                           $content .= "<option value=\"modules.php?name=$module[$z]\">$customtitle2</option>
"
;
 
                   }
 
               }
 
           }
 
       }//end for groupmenu=99
 
       $content.="</select></form>";
 
       $content.="</td></tr>";
 
   }//end if groupmenu=99 

 

Replace with:

PHP:  [ Select all ]

   /* if ($som_groupmenu == 99 && $is_admin==1) { // si on est à la catégorie 99, on affiche tous les modules installés/activés/visibles qui n'ont pas été affichés dans les catégories.
        $content.="<tr><td>";
        for ($z=0;$z<count($module);$z++) {
            $customtitle2 = str_replace ("_"," ", $module[$z]);
            if (!empty($customtitle[$z])) {
                $customtitle2 = $customtitle[$z];
            }
            if ($module[$z] != $main_module) {
                 if (($is_admin===1 AND $view[$z] == 2) OR $view[$z] != 2) {

                    $incategories=0;
                    for ($i=0;$i<count($totalcategorymodules);$i++) {
                        if ($module[$z]==$totalcategorymodules[$i]) {
                            $incategories=1;
                        }
                    }
                    if ($incategories==0) {
                        $flagmenu = $flagmenu+1;
                        if ($flagmenu==1) {
                            $content .="<hr><div align=\"center\">"._SOMMAIREADMINVIEWALLMODULES."</div>";   // si il y a des modules affichés en rubrique 99, on affiche avant une ligne horizontale
        $content.="<form action=\"modules.php\" method=\"get\" name=\"sommaireformlistboxvisibles\">"
                        ."<select width=\"100%\" name=\"somlistboxvisibles\" onchange=\"sommaire_envoielistbox(this.options[this.selectedIndex].value)\">"
                        ."<option value=\"select\">"._SOMSELECTALINK."";
                        }
                            $content .= "<option value=\"modules.php?name=$module[$z]\">$customtitle2</option>
";
                    }
                }
            }
        }//end for groupmenu=99
        $content.="</select></form>";
        $content.="</td></tr>";
    }//end if groupmenu=99 */ 

 

Find:

PHP:  [ Select all ]

if ($is_admin===1) {

 
   $key=count($module); // $key va permettre de se positionner dans $module[] pour rajouter des modules à la fin

 
   $content .= "<br /><center><strong>"._INVISIBLEMODULES."</strong><br />";
 
   $content .= "<span class=\"tiny\">"._ACTIVEBUTNOTSEE."</span></center>";
 
   if (!($a == AND $dummy != 1)) {
 
       $content.="<form action=\"modules.php\" method=\"get\" name=\"sommaireformlistboxinvisibles\">"
 
                       ."<select name=\"somlistboxinvisibles\" onchange=\"sommaire_envoielistbox(this.options[this.selectedIndex].value)\">"
 
                       ."<option value=\"select\">"._SOMSELECTALINK."";
 
       $sql "SELECT title, custom_title FROM ".$prefix."_modules WHERE active='1' AND inmenu='0' AND `title` NOT LIKE '~l~%' ORDER BY title ASC";
 
       $result $db->sql_query($sql);
 
       while ($row $db->sql_fetchrow($result)) {
 
           $module[$key]=$row['title'];
 
           $key++;
 
           $mn_title $row['title'];
 
           $custom_title $row['custom_title'];
 
           $mn_title2 str_replace("_"" "$mn_title);
 
           if (!empty($custom_title)) {
 
               $mn_title2 $custom_title;
 
           }
 
           if (!empty($mn_title2)) {
 
               $content .= "<option value=\"modules.php?name=".$mn_title."\">".$mn_title2."";
 
               $dummy 1;
 
           } else {
 
               $a 1;
 
           }
 
       }
 
       $content.= "</select></form>
"
;
 
   }
 
   else {
 
       $content .= "<br /><strong><big>·</big></strong> <i>"._NONE."</i><br />
"
;
 
   }

 
   $content .= "<br /><center><strong>"._NOACTIVEMODULES."</strong><br />";
 
   $content .= "<span class=\"tiny\">"._FORADMINTESTS."</span></center>";
 
   if (!($a == AND $dummy != 1)) {
 
       $content.="<form action=\"modules.php\" method=\"get\" name=\"sommaireformlistboxinactifs\">"
 
               ."<select name=\"somlistboxinactifs\" onchange=\"sommaire_envoielistbox(this.options[this.selectedIndex].value)\">"
 
               ."<option value=\"select\">"._SOMSELECTALINK."";
/*****[BEGIN]******************************************
 [ Base:    Caching System                     v3.0.0 ]
 ******************************************************/
if (!($row4 $cache->load('sommaire_row4''block'))) {
/*****[END]********************************************
 [ Base:    Caching System                     v3.0.0 ]
 ******************************************************/
 
       $sql "SELECT title, custom_title FROM ".$prefix."_modules WHERE active='0' AND `title` NOT LIKE '~l~%' ORDER BY title ASC";
 
       $result $db->sql_query($sql);
 
       while ($row $db->sql_fetchrow($result)) {
 
           $row4[] = $row;
 
       }
/*****[BEGIN]******************************************
 [ Base:    Caching System                     v3.0.0 ]
 ******************************************************/
$cache->save('sommaire_row4''block'$row4);
}
/*****[END]********************************************
 [ Base:    Caching System                     v3.0.0 ]
 ******************************************************/
 
       if (is_array($row4)) {
 
       foreach($row4 as $row) {
 
           $module[$key]=$row['title'];
 
           $key++;
 
           $mn_title $row['title'];
 
           $custom_title $row['custom_title'];
 
           $mn_title2 str_replace("_"" "$mn_title);
 
           if (!empty($custom_title)) {
 
           $mn_title2 $custom_title;
 
           }
 
           if (!empty($mn_title2)) {
 
               $content .= "<option value=\"modules.php?name=".$mn_title."\">".$mn_title2."";
 
           $dummy 1;
 
           } else {
 
               $a 1;
 
               }
 
       }
 
       }
 
       $content.= "</select></form>
"
;
 
   }
 
   else {
 
           $content .= "<br /><strong><big>·</big></strong> <i>"._NONE."</i><br />
"
;
 
   }

/*****[BEGIN]******************************************
 [ Base:    Module Simplifications             v1.0.0 ]
 ******************************************************/
 
   update_modules();
/*****[END]********************************************
 [ Base:    Module Simplifications             v1.0.0 ]
 ******************************************************/
}//end if admin 

 
And delete, or cancel it all out using with // or going through and putting in /* and */. To the canceling out requires you to use a program like dreamweaver/sublime text, and maybe notepad++ to know if there are any errors. This also require a little thought, but that's only if you want to save the code for later.


Expand
Tue Sep 12, 2017 9:09 am
Original Poster
Blabbing Noob
64 Posts
I was in the wrong place.  Thanks a bunch for your help.


 
Tue Sep 12, 2017 2:46 pm
Clan Leader
Top Dog
2630 Posts
coRpSE
Currently Offline
Offline

Most Played:
This week: 94.4hrs.
Total Played: 140hrs.
  
There is life outside of the game.
n/p


 
Forums ©