Author |
Message |
bornsexy2100
Client
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Oct 21, 2005
Posts: 31
Location: UK
|
Posted:
Tue Feb 14, 2006 7:56 pm |
|
Hi ther, I just need to find a custom modules block,
Thanks, |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
Site Admin
![](modules/Forums/images/avatars/41f0b40a419280935f3a0.gif)
Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Tue Feb 14, 2006 8:08 pm |
|
Search for Nuke navigation and nuke menu - there are several available. Many use one called Sommaire Paramétrable. |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
bornsexy2100
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Feb 14, 2006 8:44 pm |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Feb 14, 2006 9:21 pm |
|
A little confused... it sounds like you could use a regular HTML block where you add your own links? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
bornsexy2100
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Feb 14, 2006 9:25 pm |
|
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
http://www.battlefield-2.biz/ |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Steptoe
Involved
![Involved Involved](modules/Forums/images/ranks/4stars.gif)
![](modules/Forums/images/avatars/db59d0e0432a3ca97d73f.gif)
Joined: Oct 09, 2004
Posts: 293
|
Posted:
Tue Feb 14, 2006 11:04 pm |
|
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 www.kakariki.net
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> Since Last Visit\n";
$content .= "<strong><big>·</big></strong><b><a href=\"fsearch-newposts.html\"> View Forum Posts <br></a> Since Last Visit</b><br></center>";
/// Below line has book icon
/// $content .= "<strong><big>·</big></strong><b><a href=\"fsearch-newposts.html\"> View Forum Posts <br><img src=\"images/blocks/lastespost.gif\" border=0></a> Since Last Visit</b><br></center>";
}
{
// Email to webmaster
$content .= "<strong><big>·</big></strong><b><a href=\"mailto:kaka.riki@xtra.co.nz?subject=Site Enquires\"> 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>·</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 www.kakariki.net logo\" width=135 height=25></a></textarea></center>";
|
|
_________________ My Spelling is NOT incorrect, it's Creative |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Taz
Worker
![Worker Worker](modules/Forums/images/ranks/3stars.gif)
![](modules/Forums/images/avatars/c748228243e27c931adc1.gif)
Joined: Dec 22, 2005
Posts: 158
|
Posted:
Wed Feb 15, 2006 9:52 am |
|
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
http://www.battlefield-2.biz/ |
Golly! That looks familiar. lol Only registered users can see links on this board! Get registered or login!
![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
bornsexy2100
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Feb 15, 2006 12:06 pm |
|
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 avery@dalme.com */
/* http://www.dalme.com */
/* */
/* 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 http://www.dalme.com */
/* 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;
}
?> |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
bornsexy2100
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sun Feb 19, 2006 5:05 pm |
|
Sweet it is all done now thanks
Check it out if you wanna see it
http://www.theheatseekers.co.uk
Here is the correct code
<?php
/************************************************************************/
/* DALME block-Modules */
/* =========================== */
/* */
/* Copyright (c) 2002 by Avery Hise avery@dalme.com */
/* http://www.dalme.com */
/* */
/* 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 http://www.dalme.com */
/* 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 */ |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|