NukeResources :: View topic - Invisible Modules
Invisible Modules
Posted: Thu May 18, 2006 2:40 pm
Noto
Resource Seeker
Joined: May 18, 2006
Posts: 5
Hello all is there anyway of disabling /getting rid off the Invisible Modules
(Active but invisible link) part in the main modules block ?
Last edited by Noto on Sat May 20, 2006 7:49 am; edited 1 time in total _________________
Posted: Thu May 18, 2006 3:40 pm
darklord
Resourceful
Joined: Feb 25, 2006
Posts: 210
well if u just tryin to make it so its not invisible...change the attributes from modules option in the admin panel.
_________________
for those who STAND shall NEVER fall and those who fall shall rise once more...never give up the end is just another beginning.
Posted: Fri May 19, 2006 9:30 pm
Noto
Resource Seeker
Joined: May 18, 2006
Posts: 5
Thanks for your reply, but im trying to find away of disabling /getting rid off the Invisible Modules (Active but invisible link) part in the main modules block.
heres an example. the red part of the block i dont want to see when i and logged in as admin.
Last edited by Noto on Sat May 20, 2006 7:48 am; edited 1 time in total _________________
Posted: Sat May 20, 2006 12:25 am
darklord
Resourceful
Joined: Feb 25, 2006
Posts: 210
get rid of the code in ur modules block
Code: /* 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 .= "<br><center><b>"._INVISIBLEMODULES."</b><br>";
$content .= "<font class=\"tiny\">"._ACTIVEBUTNOTSEE."</font></center><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 = filter($row5['title'], "nohtml");
$custom_title = filter($row5['custom_title'], "nohtml");
$mn_title2 = ereg_replace("_", " ", $mn_title);
if ($custom_title != "") {
$mn_title2 = $custom_title;
}
if ($mn_title2 != "") {
$content .= "<strong><big>·</big></strong> <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>·</big></strong> <i>"._NONE."</i><br>\n";
}
$content .= "<br><center><b>"._NOACTIVEMODULES."</b><br>";
$content .= "<font class=\"tiny\">"._FORADMINTESTS."</font></center><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 = filter($row6['title'], "nohtml");
$custom_title = filter($row6['custom_title'], "nohtml");
$mn_title2 = ereg_replace("_", " ", $mn_title);
if (!empty($custom_title)) {
$mn_title2 = $custom_title;
}
if (!empty($mn_title2)) {
$content .= "<strong><big>·</big></strong> <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>·</big></strong> <i>"._NONE."</i><br>\n";
}
}
this code will be in ur block-modules.php
just remove it
make a backup of the original
_________________
for those who STAND shall NEVER fall and those who fall shall rise once more...never give up the end is just another beginning.
Posted: Sat May 20, 2006 7:26 am
Noto
Resource Seeker
Joined: May 18, 2006
Posts: 5
Thanks for the fast reply ill try it now.
Last edited by Noto on Sat May 20, 2006 7:48 am; edited 1 time in total _________________
Posted: Sat May 20, 2006 7:46 am
Noto
Resource Seeker
Joined: May 18, 2006
Posts: 5
thanks m8 works a treat n1 anything i can help u with ?
_________________
NukeResources Forum Index -> Random Thoughts
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
All times are GMT - 4 Hours
Page 1 of 1