Squalls_dreams Posted February 20, 2008 Share Posted February 20, 2008 hello, I've been searching for a tutorial on making a menu for my links and I finally found one. heres the link: http://www.webmaster-talk.com/html-forum/71017-help-pulling-content-links-several-pages.html#post324589 But the problem is I would like it to appear like so: Say I have my links in my index.php file right? <a href="me.php">About me</a> <a href="you.php">About you</a> <a href="us.php">About Us</a> <a href="everyone.php">About everyone</a> ok now lets say I click on "about us" right? it loads the page and some content shows up, but I have more links that I would like to have and thats where my menu comes in. Is there a way where when I click on "about us" it would load the menu.php file and add a new menu on top of the original menu? like so. <a href="meu.php">me & you</a> <a href="who.php">Who's us?</a> <a href="we.php">We're Us</a> <a href="cool.php">We're Cool</a> <a href="me.php">About me</a> <a href="you.php">About you</a> <a href="us.php">About Us</a> <a href="everyone.php">About everyone</a> Quote Link to comment Share on other sites More sharing options...
Squalls_dreams Posted February 21, 2008 Author Share Posted February 21, 2008 anyone? Quote Link to comment Share on other sites More sharing options...
deansatch Posted February 21, 2008 Share Posted February 21, 2008 If I understand you correctly: save your two menus as smallmenu.php and extramenu.php then on your index page: include('smallmenu.php'); on us.php: include('extramenu.php'); include('smallmenu.php'); Quote Link to comment Share on other sites More sharing options...
Squalls_dreams Posted February 22, 2008 Author Share Posted February 22, 2008 ummI think you might be right. but just to try and say it clearly again. So if I were to click on lets say.... <a href="me.php">About me</a> the extra menu would show up along with the main menu? Quote Link to comment Share on other sites More sharing options...
Squalls_dreams Posted February 25, 2008 Author Share Posted February 25, 2008 maybe someone will know a way with this code I'm using right now? ok what I want is another meny to show up if I were to click on lets say Final Fantasy 7. Then another menu would appear above the main menu links. here is the code I use right now so I don't have to put my layout on every singe page. <? $val = $_GET['bleach']; $val .= ".php"; $dirty = array(".."); $clean = array(""); $val = str_replace($dirty, $clean, $val); if (isset($_GET['bleach'])) { if (file_exists($val)) { include "$val"; } else { include "index.php"; } } else { $number = "3"; include "bnews/show_news.php"; } ?> Is there a way?? Quote Link to comment Share on other sites More sharing options...
uniflare Posted February 25, 2008 Share Posted February 25, 2008 i dont get it, wheres your menu coming in? is it per file? All you need to do is add an if statement like: if($_GET['bleach'] == "aboutus"){ $menu .= "Extra Links"; // this will put extra info underneath the menu // $menu = "Extra Links".$menu; // this will put extra info before the menu } im guessing as to how your menu script works so the above example may not work as defined. we may need more info like how your menu system actually works, give us index.php perhaps? Quote Link to comment Share on other sites More sharing options...
Squalls_dreams Posted February 27, 2008 Author Share Posted February 27, 2008 i dont get it, wheres your menu coming in? is it per file? All you need to do is add an if statement like: if($_GET['bleach'] == "aboutus"){ $menu .= "Extra Links"; // this will put extra info underneath the menu // $menu = "Extra Links".$menu; // this will put extra info before the menu } im guessing as to how your menu script works so the above example may not work as defined. we may need more info like how your menu system actually works, give us index.php perhaps? ok so where "extra links" is I would make a php file called extra links? and put my links in that file for them to show up? anyway here is what my index.php file looks like. <html> <head> <meta name="verify-v1" content="uqg9MDJiAHsLcoN8lEN1TFdIQ9KZNrWhOpiOXOeVd0M=" /> <title> ||[FFBeyondTheEyes]||Your NEW #1 Anime & RPG Resource.. </title> <link href="style.css" type="text/css" rel="stylesheet" /> </head> <body marginheight="0" background="#5f5f5f"> <div align="center"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td style="width:20px;background-image:url(/v2/lb.jpg)"> </td> <td valign="top" align="left" bgcolor="#8e8e8e"> <!--inner table--> <table cellspacing="0" cellpadding="0" border="0" width= "710"> <tr> <td class="topnav"> <a href="http://www.ffbte.net/index2.php">Home</a> - <a href="http://www.ffbte.net/forum">Forum</a> - <a href="http://www.ffbte.net/topsites">Topsites</a> </td> <td class="topnav" align="right"> <?php echo date("F d,Y"); ?> </td> </tr> </table> <table cellspacing="0" cellpadding="0" border="0" width= "710"> <tr> <td colspan="2"> <img src="/v2/logo.jpg" width="710" height="165" alt="" border="0" /></td> </tr> <tr> <td style="width:182px;background-color:black" valign= "top"><img src="/v2/logo-l1.jpg" width="182" height="80" alt="" border="0" /><div id="navigation"> <h2 class="start"> <font color="#FFFFFF">Sitely</font> </h2> <ul> <li> <a href="http://www.ffbte.net">Splash</a> </li> <li> <a href="http://www.ffbte.net/index2.php">Home</a> </li> <li> <a href="?ffbte=staff">Staff</a> </li> <li> <a href="?ffbte=jobs">Staff Jobs<font color="#FFFFFF"><b>NEW!</b></font></a> </li> <li> <a href="?ffbte=about">About Us</a> </li> <li> <a href="?ffbte=contact">Contact Us</a> </li> <li> <a href="?ffbte=linkus">Link To Us</a> </li> <li> <a href="?ffbte=affiliation">Affiliation</a> </li> <li> <a href="?ffbte=affiliates2">Affiliates</a> </li> <li> <a href="http://www.ffbte.net/index1.php">Layout V.1</a> </li> </ul> <h2> <font color="#FFFFFF">Interactive</font> </h2> <ul> <li> <a href="http://www.ffbte.net/JohnJ/index.php">Online Store<font color="#FFFFFF"><b>NEW!</b></font></a> </li> <li> <a href="http://www.ffbte.net/forum">Forum</a> </li> <li> <a href="http://www.ffbte.net/topsites">Topsites</a> </li> <li> <a href="?ffbte=vs">Battle Arena</a> </li> <li> <a href="?ffbte=albhed">Al Bhed Translator</a> </li> <li> <a href="#">JukeBox</a> </li> </ul> <h2> <font color="#FFFFFF"><b>Anime</b></font> </h2> <ul class="small"> <li> <a href="http://www.ffbte.net/bleach">Bleach<font color="#FFFFFF"><b>NEW!</b></font></a> </li> <li> <a href="#">Naruto</a> </li> </ul> <h2> <font color="#FFFFFF">Final Fantasy</font> </h2> <ul class="small"> <li> <a href="?ffbte=ffvii">Final Fantasy VII</a> </li> <li> <a href="?ffbte=ffviii">Final Fantasy VIII</a> </li> <li> <a href="?ffbte=ffix">Final Fantasy IX</a> </li> <li> <a href="#">Final Fantasy X</a> </li> <li> <a href="#">Final Fantasy X-2</a> </li> <li> <a href="#">Final Fantasy XI</a> </li> <li> <a href="#">Final Fantasy XII</a> </li> <li> <a href="?ffbte=ffxiii">Final Fantasy XIII</a> </li> </ul> <h2> <font color="#FFFFFF">WebMasters</font> </h2> <ul class="small"> <li> <a href="?ffbte=avatars">Avatars</a> </li> <li> <a href="?ffbte=banners">Banners</a> </li> <li> <a href="?ffbte=buttons">Buttons</a> </li> <li> <a href="?ffbte=layouts">Layouts</a> </li> <li> <a href="#">Signatures</a> </li> <li> <a href="#">Wallpapers</a> </li> <li> <a href="?ffbte=tips">PHP Tutorials</a> </li> </ul> <h2> <font color="#FFFFFF">Affiliates</font> </h2> <ul class="small"> <li> <a href="http://rpgaming.info">http://rpgaming.info</a> <a href="http://www.ffusite.net"><img src="http://www.ffusite.net/button.jpg " border="0"></a> <a href="http://sins-oblivion.com/"><img src="http://sins-oblivion.com/Site%20Buttons/88x31button09.gif" border="0"></a> </li> </ul> <h2> <font color="#FFFFFF">Voting</font> </h2> <ul class="small"> <li> <?php require '/home/ffbte0/public_html/poll/booth.php'; display_booth(1); ?> </li> </ul> <h2> <font color="#FFFFFF">Site Statistics</font> </h2> <center> <img src="http://www.myknet.org/images/counter.php?id=johnfisher&digits=digital-blue" align="absmiddle"> <br> <div id="eXTReMe"><a href="http://extremetracking.com/open?login=squallsd"> <img src="http://t1.extreme-dm.com/i.gif" style="border: 0;" height="38" width="41" id="EXim" alt="eXTReMe Tracker" /></a> <script type="text/javascript"><!-- var EXlogin='squallsd' // Login var EXvsrv='s11' // VServer EXs=screen;EXw=EXs.width;navigator.appName!="Netscape"? EXb=EXs.colorDepth:EXb=EXs.pixelDepth; navigator.javaEnabled()==1?EXjv="y":EXjv="n"; EXd=document;EXw?"":EXw="na";EXb?"":EXb="na"; EXd.write("<img src=http://e2.extreme-dm.com", "/"+EXvsrv+".g?login="+EXlogin+"&", "jv="+EXjv+"&j=y&srw="+EXw+"&srb="+EXb+"&", "l="+escape(EXd.referrer)+" height=1 width=1>");//--> </script><noscript><div id="neXTReMe"><img height="1" width="1" alt="" src="http://e2.extreme-dm.com/s11.g?login=squallsd&j=n&jv=n" /> </div></noscript></div> </center> </div> </td> <td valign="top" align="justify" style="width:528px"> <!--cont--> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td class="contentads"> <!--ads--> <table cellspacing="0" cellpadding="0" border="0" style="width:528px"> <tr> <td valign="top"> <div style= "padding-top:13px;padding-left:13px;" align="left"> <table cellspacing="0"cellpadding="1" border="0"> <tr> <td width="528" valign="top" id="eyecandyads"> <A href="http://www.ffbte.net/forum"><img src="/v2/forums.gif" alt="Forum" border="0" /></a> <A href="http://www.ffbte.net/topsites"><img src="/v2/topsite.gif" alt="Topsites" border="0" /></a> <A href="http://www.ffbte.net/bleach"><img src="/v2/bleach.gif" alt="Bleach" border="0" /></a> <A href="#"><img src="/v2/fan.gif" alt="Bleach" border="0" /></a> </td> <td> <!--Adsense 300x250--> <!--//Adsense 300x250--> </td> </tr> </table> </div> </td> <td valign="middle" align="center" style2= "background-image:url(/v2/ad-l.jpg);background-position:top right;background-repeat:repeat-x;background-color:#434343;"> </td> </tr> </table> <!--/ads--> </td> </tr> <tr> <td class="contentarea"> <!--cont new--> <!--spacer--> <div style="margin:0px"> <img src="/v2/1x1.gif" width="1" height="13" alt="" border="0" /> </div> <!--//spacer--> <div align="center" style= "background-color:red; background-image:url(/v2/cab.jpg); background-position:topleft;background-repeat:no-repeat;background-color:#bfbfbf;"> <div> <center> </div> </div> <center> <table width="513" cellpadding="0" cellspacing="0" border="0"> <tr> <td colspan="5" height="30" background="http://www.ffbte.net/v2/topl.gif"></td> </tr> </table> <table width="511" cellpadding="0" cellspacing="0" border="1" bordercolor="#000000" bgcolor="#cccccc"> <tr> <td> <? $val = $_GET['ffbte']; $val .= ".php"; $dirty = array(".."); $clean = array(""); $val = str_replace($dirty, $clean, $val); if (isset($_GET['ffbte'])) { if (file_exists($val)) { include "$val"; } else { include "index2.php"; } } else { $number = "5"; $template = "FFv2"; include "/home/ffbte0/public_html/ffnews/show_news.php"; } ?> </td> </tr> </table> <table width="513" cellpadding="0" cellspacing="0" border="0"> <tr> <td colspan="5" align="center" height="30" background="http://www.ffbte.net/v2/tope.gif"></td> </tr> </table> </center> </td> </tr> </table> <!--cont--> </td> </tr> </table> <table cellspacing="0" cellpadding="0" border="0" width= "100%" style=""> <tr> <td style="background-image:url(/v2/pre-copy.jpg);height:25px;width:710px;vertical-align:bottom;border:0px solid red;"> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td><a href="#"><img src="/v2/1x1.gif" width="30" height="25" alt="" border="0" /></a></td> <td style= "text-align:right;font-size:11px;color:#cfcfcf;padding-right:2px;"> <!--adsense 468x15px--><!--/adsense--> </td> </tr> </table> </td> </tr> <tr> <td class="copyright" style="width:700px;"> <marquee height=31 width=100 scrollamount=4 direction=right align="left"> <a href="http://animetopsite.net/" target="_blank"><img src="http://i223.photobucket.com/albums/dd279/animetopsite/anime_topsite_88x31_1.gif" alt="The Anime Topsite" width="88" height="31" border="0" /></a> <a href="http://acidpixels.com/top/"><img src="http://i199.photobucket.com/albums/aa271/aetopsite/ae.gif" alt="Anime Extra Topsites" border="0" /><a href="http://myffnet.com/topsite/"><img src="http://myffnet.com/topsite/button.php?u=squalls_dreams" alt="My Topsites List" border="0" /></a> <a href="http://www.squareunion.com/topsites/"><img src="http://www.squareunion.com/topsites/button.php?u=squalls_dreams" alt="Square Union Topsites" border="0" /></a> <a href="http://forgottenmemories.itopsites.com/" target="_blank"><img src="http://forgottenmemories.itopsites.com/button.php?id=133986" alt="Forgotten Memories Topsites" border="0" /></a> <a href="http://tou.planets.gamespy.com/topsites/"><img src="http://tou.planets.gamespy.com/topsites/button.php?u=squalls_dreams" alt="ToU Topsites" border="0" /></a> <a href="http://www.fftears.com/topsites/"><img src="http://www.fftears.com/topsites/button.php?u=Squalls_Dreams" alt="Final Fantasy Tears Topsites" border="0" /></a> <a href="http://www.ffskies.com/topsites/"><img src="http://www.ffskies.com/topsites/button.php?u=squalls_dreams" alt="Final Fantasy Skies Topsites" border="0" /></a> <a href="http://finalfantasy.itopsites.com/" target="_blank"><img src="http://finalfantasy.itopsites.com/button.php?id=126578" alt="Final Fantasy Topsites" border="0" /></a> <a href="http://www.ffnemesis.com"><img src="http://topsite.ffnemesis.com/button.php?u=Squalls_Dreams" alt="Final Fantasy" border="0" /></a> <a href="http://www.oritsuru.com/topsites/"><img src="http://www.oritsuru.com/topsites/button.php?u=squalls_dreams" alt="Oritsuru Topsites" border="0" /></a> <a href="http://ffbte.net/topsites/"><img src="http://ffbte.net/topsites/button.php?u=squalls_dreams" alt="FFBeyondTheEyes Topsites" border="0" /></a> </marquee> <img src="/v2/copyright.jpg" border="0"><a href="http://www.ffbte.net"><img src="/v2/moog.jpg" border="0"></a> </td> </tr> </table> <!--inner table--> </td> <td style="width:20px;background-image:url(/v2/rb.jpg)"> </td> </tr> </table> </div> </body> </html> Quote Link to comment Share on other sites More sharing options...
uniflare Posted February 27, 2008 Share Posted February 27, 2008 did u say you were already using a dynamic php menu? Basically have one file called MainMenu.php, this file holds your "Main" menu. Then you make a file called Menu2.php, this will hold your "Other" html links. ............... in mainmenu.php have the following: <a href="me.php">About me</a> <a href="you.php">About you</a> <a href="us.php">About Us</a> <a href="everyone.php">About everyone</a>' <?php if($_GET['bleach'] == "aboutus"){ include("./Menu2.php"); } ?> now, instead of the links in your index.php, put: <?php include("./Mainmenu.php"); ?> , -- sorry i cant explain better my monitor is on the fritz, keeps blanking out for no reason extremely annoyingly randomly. hope this helps, Quote Link to comment Share on other sites More sharing options...
Squalls_dreams Posted February 28, 2008 Author Share Posted February 28, 2008 hey thanks..I'll try that out. And maybe your graphic card is loose? or your monitor connection could be loose? If thats not the problem then I guess you might need a new monitor ??? ok so lets say my links was Final Fantasy 7 and the php file was ffvii.php would I change it to something like this <?php if($_GET['bleach'] == "ffvii"){ include("./Menu2.php"); } ?> Quote Link to comment Share on other sites More sharing options...
Squalls_dreams Posted February 28, 2008 Author Share Posted February 28, 2008 OMG IT WORKED!!!! WOOOHOOO!!!! THANK YOU SOOOOOOOOOOOOOOOOOOOOOOOOOOO MUCH!!! sorry for the caps but at last!!!!! thank you thank you thank you!!! I'm so happy you figured it out for me. ;D thank you sooo sooo much. I changed my code the the neccessary files and what not and I got this. <?php if($_GET['ffbte'] == "ffvii"){ include("./ff7menu.php"); } ?> and it works but I also had to add <?php if($_GET['ffbte'] == "ff7/characters"){ include("./ff7menu.php"); } ?> <?php if($_GET['ffbte'] == "ff7/access"){ include("./ff7menu.php"); } ?> <?php if($_GET['ffbte'] == "ff7/armor"){ include("./ff7menu.php"); } ?> <?php if($_GET['ffbte'] == "ff7/midis"){ include("./ff7menu.php"); } ?> so when I click on characters and those other links. They would still show up. Quote Link to comment Share on other sites More sharing options...
uniflare Posted February 28, 2008 Share Posted February 28, 2008 ya will be getting a samsung, glad you figured it out , keep coding and i love final fantasy so tell me your url if you get one . il be getting this mon: Samsung 20" TFT LCD monitor Pebble SM2032BW widescreen Glossy Black DVI 2ms 3000:1 (3year manufacturer's warranty) http://www.microdirect.co.uk/productInfo.aspx?ProductID=23008 Quote Link to comment Share on other sites More sharing options...
Squalls_dreams Posted March 19, 2008 Author Share Posted March 19, 2008 my url for my site is http://www.ffbte.net Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.