Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
bornsexy2100
Client


Joined: Oct 21, 2005
Posts: 31
Location: UK

PostPosted: Tue Feb 14, 2006 7:56 pm Reply with quote

Hi ther, I just need to find a custom modules block,

Thanks,
 
View user's profile Send private message Send e-mail Visit poster's website
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6383

PostPosted: Tue Feb 14, 2006 8:08 pm Reply with quote

Search for Nuke navigation and nuke menu - there are several available. Many use one called Sommaire Paramétrable.

_________________
I google, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
bornsexy2100
PostPosted: Tue Feb 14, 2006 8:44 pm Reply with quote

Ok I found it but I was hoping for something more just one file that gos into the blocks folder and I can just edit a little code to add links.
 
kguske
PostPosted: Tue Feb 14, 2006 9:21 pm Reply with quote

A little confused... it sounds like you could use a regular HTML block where you add your own links?
 
bornsexy2100
PostPosted: Tue Feb 14, 2006 9:25 pm Reply with quote

Basicaly I used to have a PHPnuke site running 7.6 and before I had a file I dropped in the blocks folder, It was quite short code in the file and is was simply just a file I could add lines to it to add any kind of link to it.

Check out the modules block on this site because this is how it looks
Only registered users can see links on this board! Get registered or login!
 
Steptoe
Involved
Involved


Joined: Oct 09, 2004
Posts: 293

PostPosted: Tue Feb 14, 2006 11:04 pm Reply with quote

I GTed our site and then wanted to add a few things like lastest post link to and stuff some that would only appear when logged in
This is part of the module code I messed around with At Only registered users can see links on this board! Get registered or login!
You may like to try a little of your own customising??
Code:
   }

///Added last forum posts link when logged in next 4 lines
    {
      if (is_user($user))
  //  $content .= "<img src=\"images/blocks/book.gif\" height=\"9\" width=\"14\" align=\"absmiddle\"> <a href=\"fsearch-newposts.html\">View Forum Posts <br></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Since Last Visit\n";
    $content .= "<strong><big>&middot;</big></strong><b><a href=\"fsearch-newposts.html\">&nbsp;View Forum Posts <br></a>&nbsp;Since Last Visit</b><br></center>";
///   Below line has book icon
    ///     $content .= "<strong><big>&middot;</big></strong><b><a href=\"fsearch-newposts.html\">&nbsp;View Forum Posts <br><img src=\"images/blocks/lastespost.gif\" border=0></a>&nbsp;Since Last Visit</b><br></center>";

     }
    {
        // Email to webmaster
$content .= "<strong><big>&middot;</big></strong><b><a href=\"mailto:kaka.riki@xtra.co.nz?subject=Site Enquires\">&nbsp;Email Webmaster</b><center><img src=\"images/blocks/pm.gif\" border=\"0\" alt=\"Email Webmaster for any problems with Registering, the site and General Enquires\"></a></center>";
        //Link to Us
$content .= "<strong><big>&middot;</big></strong><b>Link to Us, Details</b><br><center><textarea rows=2 name=x cols=16 ><a href=\"http://www.kakariki.net\" target=\"_blank\"><img border=0 src=\"http://www.kakariki.net/files/kikelogosm.gif\" alt=\"Link to Only registered users can see links on this board! Get registered or login! logo\" width=135 height=25></a></textarea></center>";

_________________
My Spelling is NOT incorrect, it's Creative 
View user's profile Send private message
Taz
Worker
Worker


Joined: Dec 22, 2005
Posts: 158

PostPosted: Wed Feb 15, 2006 9:52 am Reply with quote

bornsexy2100 wrote:
Basicaly I used to have a PHPnuke site running 7.6 and before I had a file I dropped in the blocks folder, It was quite short code in the file and is was simply just a file I could add lines to it to add any kind of link to it.

Check out the modules block on this site because this is how it looks
Only registered users can see links on this board! Get registered or login!


Golly! That looks familiar. lol Only registered users can see links on this board! Get registered or login!

Smile
 
View user's profile Send private message
bornsexy2100
PostPosted: Wed Feb 15, 2006 12:06 pm Reply with quote

Am not so good with coding but I am really looking for a premade file where and can just edit a few things, I have found one but it seems to mess up my layout, Maybe you could help me fix it please.

Here is the code for the Modules Block:

<?php

/************************************************************************/
/* DALME block-Modules */
/* =========================== */
/* */
/* Copyright (c) 2002 by Avery Hise Only registered users can see links on this board! Get registered or login! */
/* Only registered users can see links on this board! Get registered or login! */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/* */
/* DALME block-Modules v1.6a provided by Only registered users can see links on this board! Get registered or login! */
/* Updated and cleaned up 01-02-2004 Telli telli -at- Codezwiz.com */
/************************************************************************/

if (eregi("block-Modules.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}

global $prefix, $dbi, $admin;

//-------------MODIFY HERE TO CUSTOMIZE THE MENU------>
$mouseOver = "#cccc99"; /* Sets mouseover color */
$mouseOut = ""; /* Sets mouseout color - leave blank for background*/
$image1 = "images/arrow.gif"; /* image path relative to public root*/
$image2 = "images/icon_select.gif"; /* image path relative to public root*/
$image3 = "images/oarrow.gif"; /* image path relative to public root*/

$viewSearch = "0"; /* "0" = no search -- "1" = yes search */
$dropDown = "1"; /* "0" = dropdown style -- "1" = block style */
$row2show = "3"; /* "NUMBER YOU SELECT (default is 5)" = numbers of rows visible when block style */

define ("mSECTION1","General"); /* title Menu Section 1 */
define ("mSECTION2","Community"); /* title Menu Section 2 */
define ("mSECTION3","Admin"); /* title Menu Section 3 */

//--------END-----------END----------END------------>

$actionMenu = "onMouseOver=\"this.style.background='$mouseOver'\" onMouseOut=\"this.style.background='$mouseOut'\" style=\"cursor:pointer;cursor:hand\" onclick=\"window.location.href=";

$result = sql_query("select main_module from ".$prefix."_main", $dbi);
list($main_module) = sql_fetch_row($result, $dbi);
/* If the module doesn't exist, it will be removed from the database automaticaly */
$result = sql_query("select title from ".$prefix."_modules", $dbi);
while (list($title) = sql_fetch_row($result, $dbi)) {
$a = 0;
$handle=opendir('modules');
while ($file = readdir($handle)) {
if ($file == $title) {
$a = 1;
}
}
closedir($handle);
if ($a == 0) {
sql_query("delete from ".$prefix."_modules where title='$title'", $dbi);
}
}

/* Now we make the Modules block with the correspondent links */
/* Menu Section 1 */
$content .= "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=\"100%\"><tr><TD class=\"info1\"><img src=$image2 BORDER=0><b>" .mSECTION1."</b></td></tr></table>\n";
$content .= "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=\"100%\">\n";
$content .= "<TR $actionMenu''\"><TD class=\"row1\"><a href=\"/index.php\">Home</a></TD></TR>\n";
$content .= "<TR $actionMenu''\"><TD class=\"row1\"><a href=\"/modules.php?name=Forums\">Forums</a></TD></TR>\n";
$content .= "</TABLE>\n";
//$content .= "<HR noShade SIZE=1>\n"; /* <hr> to separate menu */

/* Menu Section 2 */
$content .= "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=\"100%\"><tr><TD class=\"info1\"><img src=$image2 BORDER=0><b>".mSECTION2."</b></td></tr></table>\n";
$content .= "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=\"100%\">\n";
$content .= "<TR $actionMenu''\"><TD class=\"row1\"><a href=\"/index.php\">Coming Soon</a></TD></TR>\n";
$content .= "</TABLE>\n";
//$content .= "<HR noShade SIZE=1>\n"; /* <hr> to separate menu */

/* Menu Section 3 */
$content .= "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=\"100%\"><tr><TD class=\"info1\"><img src=$image2 BORDER=0><b>".mSECTION3."</b></td></tr></table>\n";
$content .= "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=\"100%\">\n";
$content .= "<TR $actionMenu''\"><TD class=\"row1\"><a href=\"/modules.php?name=Members_List\">Members List</a></TD></TR>\n";
$content .= "<TR $actionMenu''\"><TD class=\"row1\"><a href=\"/modules.php?name=Your_Account\">Your Account</a></TD></TR>\n";
$content .= "<TR$actionMenu''\"><TD class=\"row1\"><a href=\"mailto:bornsexy2100@hotmail.com\">Email Me</a></TD></TR>\n";
$content .= "</TABLE>\n";
//$content .= "<HR noShade SIZE=1>\n"; /* <hr> to separate menu */




$content .= "</TABLE>\n";
//$content .= "<HR noShade SIZE=1>\n"; /* <hr> to separate menu */
/* Make dropdown or block style full selection menu - NOTE: inactive modules only viewable by Admin */
if ($dropDown == 0){
$content .= "<CENTER><br><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><FORM METHOD=POST ACTION=\"modules.php\"><TD><SELECT NAME=\"name\" onChange=\"top.location.href=this.options[this.selectedIndex].value\"><OPTION VALUE=\"\">Full Selection";
} else {
$content .= "<CENTER><br><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><FORM METHOD=POST ACTION=\"modules.php\"><TD><SELECT NAME=\"name\" MULTIPLE SIZE=\"$row2show\" onChange=\"top.location.href=this.options[this.selectedIndex].value\"><OPTION VALUE=\"\">Full Selection";
}

$content .= "<OPTION VALUE=\"\">---------------\n";
$result = sql_query("select title, custom_title, view from ".$prefix."_modules where active='1' AND title!='$def_module' AND inmenu='1' ORDER BY title ASC", $dbi);
while(list($m_title, $custom_title, $view) = sql_fetch_row($result, $dbi)) {
$m_title2 = ereg_replace("_", " ", $m_title);
if ($custom_title != "") {
$m_title2 = $custom_title;
}
if ($m_title != $main_module) {
if ((is_admin($admin) AND $view == 2) OR $view != 2) {
$content .= "<OPTION VALUE=\"modules.php?name=$m_title\">$m_title2\n";
}
}
}
/* 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] != "") {
$result = sql_query("select mid from ".$prefix."_modules where title='$modlist[$i]'", $dbi);
list ($mid) = sql_fetch_row($result, $dbi);
if ($mid == "") {
sql_query("insert into ".$prefix."_modules values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1')", $dbi);
}
}
}

$content .= "<OPTION VALUE=\"\">---------------\n";
$content .= "<OPTION VALUE=\"\">"._INVISIBLEMODULES."\n";
//$content .= "<OPTION VALUE=\"\">"._ACTIVEBUTNOTSEE."\n";
$content .= "<OPTION VALUE=\"\">---------------\n";
$result = sql_query("select title, custom_title from ".$prefix."_modules where active='1' AND inmenu='0' ORDER BY title ASC", $dbi);
while(list($mn_title, $custom_title) = sql_fetch_row($result, $dbi)) {
$mn_title2 = ereg_replace("_", " ", $mn_title);
if ($custom_title != "") {
$mn_title2 = $custom_title;
}
if ($mn_title2 != "") {
$content .= "<OPTION VALUE=\"modules.php?name=$mn_title\">$mn_title2\n";
$dummy = 1;
} else {
$a = 1;
}
}
if ($a = 1 AND $dummy != 1) {
$content .= "<OPTION VALUE=\"\">"._NONE."\n";
}

$content .= "<OPTION VALUE=\"\">---------------\n";
$content .= "<OPTION VALUE=\"\">"._NOACTIVEMODULES."\n";
//$content .= "<OPTION VALUE=\"\">"._FORADMINTESTS."\n";
$content .= "<OPTION VALUE=\"\">---------------\n";
$result = sql_query("select title, custom_title from ".$prefix."_modules where active='0' ORDER BY title ASC", $dbi);
while(list($mn_title, $custom_title) = sql_fetch_row($result, $dbi)) {
$mn_title2 = ereg_replace("_", " ", $mn_title);
if ($custom_title != "") {
$mn_title2 = $custom_title;
}
if ($mn_title2 != "") {
$content .= "<OPTION VALUE=\"modules.php?name=$mn_title\">$mn_title2\n";
$dummy = 1;
} else {
$a = 1;
}
}
if ($a = 1 AND $dummy != 1) {
$content .= "<OPTION VALUE=\"\">"._NONE."\n";
}
}
$content .= "</SELECT></TD></TR></FORM></TABLE></CENTER>";

/* Search feature */
if ($viewSearch == 1){
$content .= "<center><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><form action=\"search.html\" method=\"post\">";
$content .= "<br><center><input type=\"text\" onfocus=\"value=''\" value=\"Site Search\" name=\"query\" size=\"20\"></center>";
$content .= "</TD></TR></form></TABLE></center>";
} else {
return;
}

?>
 
bornsexy2100
PostPosted: Sun Feb 19, 2006 5:05 pm Reply with quote

Sweet it is all done now Smile thanks

Check it out if you wanna see it
Only registered users can see links on this board! Get registered or login!

Here is the correct code

<?php

/************************************************************************/
/* DALME block-Modules */
/* =========================== */
/* */
/* Copyright (c) 2002 by Avery Hise Only registered users can see links on this board! Get registered or login! */
/* Only registered users can see links on this board! Get registered or login! */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/* */
/* DALME block-Modules v1.6a provided by Only registered users can see links on this board! Get registered or login! */
/* Updated and cleaned up 01-02-2004 Telli telli -at- Codezwiz.com */
/************************************************************************/

if (eregi("block-Modules.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}

global $prefix, $dbi, $admin;

//-------------MODIFY HERE TO CUSTOMIZE THE MENU------>
$mouseOver = "#cccc99"; /* Sets mouseover color */
$mouseOut = ""; /* Sets mouseout color - leave blank for background*/
$image1 = "images/arrow.gif"; /* image path relative to public root*/
$image2 = "images/icon_select.gif"; /* image path relative to public root*/
$image3 = "images/oarrow.gif"; /* image path relative to public root*/

$viewSearch = "0"; /* "0" = no search -- "1" = yes search */
$dropDown = "0"; /* "0" = dropdown style -- "1" = block style */
$row2show = "5"; /* "NUMBER YOU SELECT (default is 5)" = numbers of rows visible when block style */

define ("mSECTION1","General"); /* title Menu Section 1 */
//--------END-----------END----------END------------>

$actionMenu = "onMouseOver=\"this.style.background='$mouseOver'\" onMouseOut=\"this.style.background='$mouseOut'\" style=\"cursor:pointer;cursor:hand\" onclick=\"window.location.href=";

$result = sql_query("select main_module from ".$prefix."_main", $dbi);
list($main_module) = sql_fetch_row($result, $dbi);
/* If the module doesn't exist, it will be removed from the database automaticaly */
$result = sql_query("select title from ".$prefix."_modules", $dbi);
while (list($title) = sql_fetch_row($result, $dbi)) {
$a = 0;
$handle=opendir('modules');
while ($file = readdir($handle)) {
if ($file == $title) {
$a = 1;
}
}
closedir($handle);
if ($a == 0) {
sql_query("delete from ".$prefix."_modules where title='$title'", $dbi);
}
}

/* Now we make the Modules block with the correspondent links */
/* Menu Section 1 */
$content .= "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=\"100%\"><tr><TD class=\"info1\"><img src=$image2 BORDER=0><b>" .mSECTION1."</b></td></tr></table>\n";
$content .= "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=\"100%\">\n";

$content .= "<TR $actionMenu''\"><TD class=\"row1\"><a href=\"/index.html\">Home</a></TD></TR>\n";
$content .= "<TR $actionMenu''\"><TD class=\"row1\"><a href=\"/forums.html\">Battlefield 2 Forums</a></TD></TR>\n";
$content .= "<TR $actionMenu''\"><TD class=\"row1\"><a href=\"/members.html\">Members List</a></TD></TR>\n";
$content .= "<TR $actionMenu''\"><TD class=\"row1\"><a href=\"/modules.php?name=Your_Account\">Your Account</a></TD></TR>\n";
$content .= "<TR $actionMenu''\"><TD class=\"row1\"><a href=\"/submit.html\">Submit News</a></TD></TR>\n";
$content .= "<TR $actionMenu''\"><TD class=\"row1\"><a href=\"/join.html\">Apply to Join Us!</a></TD></TR>\n";
$content .= "</TABLE>\n";




$content .= "</TABLE>\n";
//$content .= "<HR noShade SIZE=1>\n"; /* <hr> to separate menu */
/* Make dropdown or block style full selection menu - NOTE: inactive modules only viewable by Admin */
if ($dropDown == 0){
$content .= "<CENTER><br><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><FORM METHOD=POST ACTION=\"modules.php\"><TD><SELECT NAME=\"name\" onChange=\"top.location.href=this.options[this.selectedIndex].value\"><OPTION VALUE=\"\">Full Selection";
} else {
$content .= "<CENTER><br><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><FORM METHOD=POST ACTION=\"modules.php\"><TD><SELECT NAME=\"name\" MULTIPLE SIZE=\"$row2show\" onChange=\"top.location.href=this.options[this.selectedIndex].value\"><OPTION VALUE=\"\">Full Selection";
}

$content .= "<OPTION VALUE=\"\">---------------\n";
$result = sql_query("select title, custom_title, view from ".$prefix."_modules where active='1' AND title!='$def_module' AND inmenu='1' ORDER BY title ASC", $dbi);
while(list($m_title, $custom_title, $view) = sql_fetch_row($result, $dbi)) {
$m_title2 = ereg_replace("_", " ", $m_title);
if ($custom_title != "") {
$m_title2 = $custom_title;
}
if ($m_title != $main_module) {
if ((is_admin($admin) AND $view == 2) OR $view != 2) {
$content .= "<OPTION VALUE=\"modules.php?name=$m_title\">$m_title2\n";
}
}
}
/* 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] != "") {
$result = sql_query("select mid from ".$prefix."_modules where title='$modlist[$i]'", $dbi);
list ($mid) = sql_fetch_row($result, $dbi);
if ($mid == "") {
sql_query("insert into ".$prefix."_modules values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1')", $dbi);
}
}
}

$content .= "<OPTION VALUE=\"\">---------------\n";
$content .= "<OPTION VALUE=\"\">"._INVISIBLEMODULES."\n";
//$content .= "<OPTION VALUE=\"\">"._ACTIVEBUTNOTSEE."\n";
$content .= "<OPTION VALUE=\"\">---------------\n";
$result = sql_query("select title, custom_title from ".$prefix."_modules where active='1' AND inmenu='0' ORDER BY title ASC", $dbi);
while(list($mn_title, $custom_title) = sql_fetch_row($result, $dbi)) {
$mn_title2 = ereg_replace("_", " ", $mn_title);
if ($custom_title != "") {
$mn_title2 = $custom_title;
}
if ($mn_title2 != "") {
$content .= "<OPTION VALUE=\"modules.php?name=$mn_title\">$mn_title2\n";
$dummy = 1;
} else {
$a = 1;
}
}
if ($a = 1 AND $dummy != 1) {
$content .= "<OPTION VALUE=\"\">"._NONE."\n";
}

$content .= "<OPTION VALUE=\"\">---------------\n";
$content .= "<OPTION VALUE=\"\">"._NOACTIVEMODULES."\n";
//$content .= "<OPTION VALUE=\"\">"._FORADMINTESTS."\n";
$content .= "<OPTION VALUE=\"\">---------------\n";
$result = sql_query("select title, custom_title from ".$prefix."_modules where active='0' ORDER BY title ASC", $dbi);
while(list($mn_title, $custom_title) = sql_fetch_row($result, $dbi)) {
$mn_title2 = ereg_replace("_", " ", $mn_title);
if ($custom_title != "") {
$mn_title2 = $custom_title;
}
if ($mn_title2 != "") {
$content .= "<OPTION VALUE=\"modules.php?name=$mn_title\">$mn_title2\n";
$dummy = 1;
} else {
$a = 1;
}
}
if ($a = 1 AND $dummy != 1) {
$content .= "<OPTION VALUE=\"\">"._NONE."\n";
}
}
$content .= "</SELECT></TD></TR></FORM></TABLE></CENTER>";

/* Search feature */
if ($viewSearch == 1){
$content .= "<center><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><form action=\"search.html\" method=\"post\">";
$content .= "<br><center><input type=\"text\" onfocus=\"value=''\" value=\"Site Search\" name=\"query\" size=\"20\"></center>";
$content .= "</TD></TR></form></TABLE></center>";
} else {
return;
}

?>

Please note that to create more section you need to add this to the bottom line of your hyperlins near the top, It is abit confusing but just contact me if you need help with it.

//$content .= "<HR noShade SIZE=1>\n"; /* <hr> to separate menu */
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

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 ©