Jump to content

Search the Community

Showing results for tags 'menu'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (Dreamweaver, Zend, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

  1. Check out http://mainlypiano.com/ and start typing in the search box ("dav" will get you several results). Notice that the search box goes below the middle light purple box. There's no z-index here to cause an issue. If one removes the relative position of the light purple box, the search results menu shows in its entirety. That's weird, isn't it? (That messes up the "favorite albums" text there, which is the point of the relative position, but lets you see the error.) Any idea why this is happening?
  2. I have a simple setup where I have a collapsed menu. When you click on the button, it will open a menu. If the menu is already opened and you open another menu, the previous menu will collapse. All that works. The only thing I noticed is that It will not collapse the opened menu if I click the same button. That menu will only collapse if I open a different menu. I was wondering how the code below will look with that extra function added? Here's the code for that. <h5 class="mobile-collapse__title">Title Button</h5> <div class="mobile-collapse__content"> <ul> <li>list 1</li> <li>list 2</li> <li>list 3</li> </ul> </div> <script> $(document).ready(function($){ $(".mobile-collapse__title").click(function(e) { e.preventDefault(); $('.mobile-collapse__content:visible').hide(); $(this).next('div.mobile-collapse__content').show(); }); }); </script>
  3. http://www.tirerack.com/content/tirerack/desktop/en/wheels.html See the window where it says "Shop by Vehicle"? Is there a script already out there that does the dropdown search by make/model/year? I am only looking for the front-end code; javascript/jquery code in particular.
  4. We've got a responsive menu that when you click on an li the ul inside it is then displayed as a block (displayed as none beforehand). However you cannot then close the ul without refreshing the page or closing the menu itself. What we want is for when you click the li again, the ul inside it then displays as none. Is this possible using only CSS? (No jQuery please!!!) Any help is greatly appreciated, thanks!
  5. So I am creating php script to make my navigation for a website. I've gathered bits and pieces from books/online forums. One thing that is confusing me is what does the "?" in this line accomplishes? $currentTitle=isset($mainMenu[$currentPage]) ? $mainMenu[$currentPage] : ''; As you can imagine this is a hard question to find an answer to because of the use of ?'s in <?php. Also a little confused on the : symbol also. I am writing this script to keep track of the current page to generate a css class to be modified, which works. But then I also thought id have it generate the titles too but when i echo this.. The script goes bad. echo' <title> ',(is_empty($currentTitle) ? '' : $currentTitle.' - '),$siteTitle,' </title> ' I would be grateful for any help! Thanks in advance.
  6. I'm using a theme that supports a Sub-Filter Menu, and I am having a hard time changing a sub-menu title without losing the functions of the actual prompt. For instance the sub-filter menu has Latest, Likes, Comments. However I want for it to say Latest, Hottest, Comments, when I change the Like to Hottest it no longer shows the post with the most likes in order. I believe this is because the 'Likes' is being called from other php files. Is there a way to add a code that will keep the like function, but display my desired Sub-filter menu title at the same time? An example would be something like this <label for="Likes">Hottest</label> Code below: <ul id="filter_subfilter" class="sort"> <?php if (isset($inspire_options_hp['subfilter_show_latest'])) {?><li><a href="#"><?php _e('Latest', 'loc_inspire'); ?></a></li><?php ;} ?> <?php if (isset($inspire_options_hp['subfilter_show_likes'])) {?><li><a href="#"><?php _e('Likes', 'loc_inspire'); ?></a></li><?php ;} ?> <?php if (isset($inspire_options_hp['subfilter_show_comments'])) {?><li><a href="#"><?php _e('Comments', 'loc_inspire'); ?></a></li><?php ;} ?> <?php if (isset($inspire_options_hp['subfilter_show_random'])) {?><li><a href="#"><?php _e('Random', 'loc_inspire'); ?></a></li><?php ;} ?> </ul>
  7. I've followed a few tutorials, as I've never touched drop down before (more of a conventional navbar guy ). But none are dropping the nested list . I even took the code from one, no changes made, and it still didn't drop the menu This is as far as I got on this tutorial (http://line25.com/tutorials/how-to-create-a-pure-css-dropdown-menu) before coming here #topbar-navigation { width: 101%; margin: 0 auto; ; margin-top: -8px; height: 56px; background: #ffffff; display: inline-block; text-align: center; min-width: 1100px; -webkit-box-shadow: 0 1px 8px 0px #b5b5b5; -moz-box-shadow: 0 1px 8px 0px #b5b5b5; box-shadow: 0 1px 8px 0px #b5b5b5; } #topbar-navigation ul { display: inline-table; list-style: none; position: absolute; margin-left: auto; margin-right: auto; margin-top: 20px; top: 0; left: 765px; right: 0; } #topbar-navigation ul:after { content: ""; clear: both; display: block; } #topbar-navigation ul ul { display: none; } #topbar-navigation ul li:hover > ul { display: block; } #topbar-navigation ul li a { display: block; padding: 25px 40px; color: #99a0a8; text-decoration: none; font-family: 'sinkin_sans400_regular'; font-size: 12px; } <div id="topbar-navigation"> <a href="index.php"><img src="images/moduniverselogo.png" class="site-logo" draggable="false" /></a> <ul> <li><a href="#">Welcome, <b style="color:#ff924e" ><?php echo $user->data['username'] ?></b></a></li> <ul> <li><a href="#">My Profile</a></li> <li><a href="#">Edit Account</a></li> <li><a href="#">Log Out</a></li> </ul> </ul> </div> I want it nested to the right like on the site currently: http://i.imgur.com/llZPUbZ.png
  8. I have adapted a script from w3schools to use as a main menu for my site. It works great in IE, but about 3 or 4 times slower in FireFox, Chrome and Safari! I have no idea what might be wrong and would appreciate any help. Many thanks Mark <html> <head> <script> function showUser(str) { if (str=="") { document.getElementById("hoverbar").innerHTML=""; return; } if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("hoverbar").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","menulookuptest.php?q="+str,true); xmlhttp.send(); } </script> </head> <body> <div class='divcolor1' onmouseover='showUser("1")'>Option 1</div> <div class='divcolor2' onmouseover='showUser("2")'>Option 2</div> <div class='divcolor3' onmouseover='showUser("3")'>Option 3</div> <div class='divcolor4' onmouseover='showUser("4")'>Option 4</div> <div class='divcolor5' onmouseover='showUser("5")'>Option 5</div> <div class='divcolor6' onmouseover='showUser("6")'>Option 6</div> <div class='divcolor7' onmouseover='showUser("7")'>Option 7</div> <div class='divcolor8' onmouseover='showUser("8")'>Option 8</div> <div id="hoverbar">Content Goes Here</div> </body> </html> menulookuptest.php <?php $q = $_GET['q']; $con=mysqli_connect("localhost","root","PASS","DBNAME"); mysqli_select_db($con,"ajax_demo"); $sql="SELECT pagetitle, pagedept FROM intranetpage WHERE pagedept = '".$q."'"; $result = mysqli_query($con,$sql); while($row = mysqli_fetch_array($result)) { echo $row['pagetitle']; echo "<BR>"; } ?>
  9. Hello, I have a menu and using css to control the display. problem area: mouse over menu and bolding. for most part the menu works, what i like to do is prevent the bold (mouse over) from pushing surrounding menus to make space to display the bold. I know i need to somehow expand the menu spaceing so that when the mouse over wont pushing the other menus over but cant seem to hit that number. any ideas? <style rel="stylesheet" type="text/css"> #navcontainer ul { list-style-type: none; margin: 0; padding: 0; } #navcontainer ul li {display: inline; } #navcontainer ul li a { text-decoration: none; font-size: 18px; color: black; background-color: #FFFFFF;} #navcontainer ul li a:hover { color: darkblue; background-color: #FFFFFF; text-decoration:underline; font-weight:bold;} </style> </head> <body> <div id="navcontainer"> <ul> <li> <a href="#"> Home</a></li> <li>|<a href="#"> Project listing</a></li> <li>|<a href="#"> Directory</a></li> <li>|<a href="#"> Create project</a></li> <li>|<a href="#"> My project</a></li> </ul> </div> </body> </html>
  10. Hello to everyone ! I am new in php, and need some help. I had, a website coded, in html, and decided to change it in php. In the old version, I had some controls for giving the user the oportunity to change the text and background color of my website based in his/her, choice, by using some buttons. When I changed my website, into php, I was also try to change the color controls of the old website, to work in php. Unfortunatelly, I achieved to change only the half part of these controls, basically only the background color selection and make a dropdown menu for that. But I couldn't create a dropdown menu for changing the font controls. As I know, in PHP there is not actually the possibility to control the color of the text, there is no color actually but the colors are being implemented as html in the client side.(Correct me if I am Wrong) My questions are: 1) how can I implement a drop down menu, which will give the oportunity to the visitors of my website, to change the color of the text in my website 2) how can I take actually the selected value from the html, and store it to a php cookie, like I did it in the background color selection Thanks in Advance !!!
  11. Please help me with this I'm completely lost. The problem is that in Firefox (v12) it worked , but in IE8 and Opera 9 series did not. I know about the bugs that are there , but I can not remove it, so not to break menu. I mention the code in the original version. 1) The end tag \ p delete this should not be there 2) The main problem I see is the repeat of id AB: <li id="AB"> and also the user of class . AB is useless because the class is not there. However that is the main problem: if I remove the id#AB so it is all broken, so you wont see the submenu in IE8 or Opera will not show the backround of the submenu 3 ) the reason why the ids AB were there is to distinguish between the fisrt 4 items in menu and the last item logout. The logout should not be highlighted when you hover over it. I do not understand how the unpack of drop-down submenus works , so maybe that's why i do not know what to do, but it seems to me that the error after removing the # id selector is caused by a more detailed ( some rule that trumps ) for clarification about the dimensions of the elements here is a code with dimensions: http://paste.ofcode.org/NQANEG25v3UXQgWBVu3TMn because in jsfiddle http://jsfiddle.net/WhSzr/ it does not have the correct dimensions I use two width there the first li items, they are narrow, 85px and the submenu ul is 108px wide. I give a link to the picture in FF12 : http://oi39.tinypic.com/502t21.jpg http://oi43.tinypic.com/2qi8u47.jpg Can you help to fix the problem? I need to remove the ids AB from li and fix it to work with IE8.
  12. Hi Mates, Please there is this application I was working on with a friend before we lost contact. I am required to make the following changes and as well updates on the script which I encountered some difficulties in. 1. Upon Selection of Assigned Court, the Name of Judge and his Court Location should be auto selected on the Add New Entry page.. The Second Icon.. I have been able to to for Court and Judge name but want it as Court, Judge and Location 2.. Adding of New user should now be • Full Names • User Name • Department • Designation • Mobile Phone number • Email • Type • Password • Uploading of Passport Photograph 3. There should be record upload counts per user 4. Capture User activities – Login time, Idle time, Logout time with date 5. On the Report page, Status of cases per court should be included and more so report should be in Bar chat format 6. ADVANCED SEARCH : Search by Court Number should be included
  13. I have worked so hard to create a WordPress function and I got stuck. I am pretty sure that for some of you it will take 2 second to figure it out. I am familiar with WordPress and I know my way around it but i lack coding skills. Please help me correct this function keeping in mind that I want my banner and logo included and that's what the: <div class="wrap"> and <div class="icon32" id="icon-index"><br></div> is all about. What I am trying to do is the followings: Have a Main menu item in WordPress Dashboard for both Admins and Subscribers to be displayed with the main Menu titled: "For Buyers" then add submenus with the following titles: Marketing Materials - First Time Buyers - Lead Generation - Ad campaigns. Thank you so much, this is a wonderful community . add_action( 'admin_menu', 'register_my_custom_menu_page' ); function register_my_custom_menu_page(){ add_menu_page( "For Buyers", "For Buyers", "manage_options", "for_buyers", "add_buyers_function", '', 61 ); add_submenu_page( "for_buyers", " Marketing Materials", " Marketing Materials", "manage_options", "marketing_materials","add_marketing_materials"); } function add_buyers_function(){ ?> <div class="wrap"> <div class="icon32" id="icon-index"><br></div> </div> <?php } //marketing materials for buyers wordpress menu function add_marketing_materials(){ ?> <div class="wrap"> <div class="icon32" id="icon-index"><br></div> </div> <?php }
  14. Hi folks, I have a project that im working on right now, I have developed it in joomla, on the index page, I have a menu which shows the year , I need to know how to code a php variable to get the active item name of this menu so I can show (echo) it where I want. I have attached a screenshot for better understanding, Any help would be much appreciated. thanks.
  15. Hi Guys, I have the below code that I am trying to make work correctly, basically it creates a menu structure and then should only make the parent active if the page you are on belongs to that parent. at the moment the structure is wrong as it is adding too many <ul> entries for each menu. this is what it currently does: <ul id="nav"> <li class="active"><a href="admin.php">System Settings</a> <ul id="nav"> <li><a href="reports.php">Reports</a></il> </ul> <ul id="nav"> <li><a href="memblst.php?opt=createuser">Create User</a></il> </ul> </li> </ul> This is what it should be: <ul id="nav"> <li class="active"><a href="admin.php">System Settings</a> <ul> <li><a href="reports.php">Reports</a></il> <li><a href="memblst.php?opt=createuser">Create User</a></il> </ul> </li> </ul> $MENU["SYSTEMS"] = array ( 'parent'=>true, 'enabled'=>true, 'text'=>'System Settings', 'link'=> 'admin.php', 'sub_modules' => array('REPORTS','CREATE_USER') ); $MENU["REPORTS"] = array ( 'parent'=>FALSE, 'enabled'=>true, 'text'=>'Reports', 'link'=> 'reports.php', 'sub_modules' => array() ); $MENU["CREATE_USER"] = array ( 'parent'=>FALSE, 'enabled'=>true, 'text'=>'Create User', 'link'=> 'memblst.php?opt=createuser', 'sub_modules' => array() ); $MENU["MEMBER_LST"] = array ( 'parent'=>FALSE, 'enabled'=>true, 'text'=>'Member List', 'link'=> 'memberlst.php', 'sub_modules' => array() ); $MENU["SYSTEM_LOGS"] = array ( 'parent'=>FALSE, 'enabled'=>true, 'text'=>'System Logs', 'link'=> 'syslog.php', 'sub_modules' => array() ); function show_menu(&$MENU,$subIndex=false){ $menu_string = ''; $menu_string .= '<ul id="nav">'; if(!$subIndex){ foreach($MENU as $item) { if( $item['enabled']&&$item['parent'] ) { $_subString=""; if(!empty($item['sub_modules'])){ foreach($item['sub_modules'] as $sub){ $_subString .= show_menu($MENU,$sub); } } $menu_string .= '<li class="active"><a href="'.$item['link'].'">'.$item['text'].'</a>'.$_subString.'</li>'; } } }else{ if(@$MENU[$subIndex]['enabled']&&!@$MENU[$subIndex]['parent']) { $_subString=""; if(!empty($MENU[$subIndex]['sub_modules'])){ foreach($MENU[$subIndex]['sub_modules'] as $sub){ $_subString .= show_menu($MENU,$sub); } } $menu_string .= '<li><a href="'.$MENU[$subIndex]['link'].'">'.$MENU[$subIndex]['text'].'</a></il>'.$_subString; } } return $menu_string.'</ul>'; } echo show_menu($MENU);
  16. Navigation menu hover for contact is correct in chrome but not in Firefox. See the contact us link onhover at last in menu In firefox the hover is not completely white If i increase padding for ".menu_bar ul li:first-child a" menu comes down I dont know where is the problem. My Link: http://72.29.85.214/~smartweb/teamwork/VPR025/index.php
  17. In my main navigation bar there is a menu named category & item and it has two submenus which names are category and item respectively. I have only one page to display these two section. My page is category_item.php and it has two different tabs to display each sections. In this case it iscategory and item. So my problem is I need to open category and item tab when clicking on category and item links on the submenu. This is code from main navigation bar <li class="current"> <a>Category & Item</a> <div class="menu-container"> <div class="menu-link"> <a href="">Category</a> </div> <div class="menu-link current"> <a href="">Item</a> </div> </div> </li> This is from category_item.php page <div class="ui-widget-header ui-corner-top"> <ul> <li><a href="#tabs-1">My Category</a></li> <li><a href="#tabs-2">My Items</a></li> </ul> </div> <div id="tabs-1" class="tabs3"> my stuff... </div> <div id="tabs-21" class="tabs3"> my stuff... </div> Can I know is it possible to do? Thank you.
  18. I have this dependent radio and dropdown box, it works fine. Now I am trying to validate and its failing to validate. When i click on a radio button it should display "select a make" and If i dont select anything it should prompt me to select something rather than just submit. Also when i try to reset, what ever ive selected does not clear away. Any help will be great. Thanks in advance. Original code is from http://forums.phpfreaks.com/topic/145947-radio-button-to-change-drop-down-fields/ <html> <head> </head> <body> <form id="formname" name="formname" method="post" action="#" onsubmit="return validate()"> Make:<br> <input type="radio" name="make" value="Chrysler" onclick="changeMake(this.value);"> Chrysler<br /> <input type="radio" name="make" value="Ford" onclick="changeMake(this.value);"> Ford<br /> <input type="radio" name="make" value="GMC" onclick="changeMake(this.value);"> GMC<br /> <br> Model: <select name="model" id="model" onchange="changeModel(this.value);" disabled="disabled"> <option> -- Select a Make -- </option> </select> <br><br> Output: <span id="output"></span> <input type="reset"> <input type="submit"> </form> </body> <script type="text/javascript"> var models = new Array(); models['Chrysler'] = ['Pacifica', 'PT Cruiser', 'Sebring']; models['Ford'] = ['Ranger', 'Taurus', 'Mustang']; models['GMC'] = ['Acadia', 'Sierra', 'Yukon']; function changeMake(make) { var modelList = models[make]; changeSelect('model', modelList, modelList); document.getElementById('model').disabled = false; document.getElementById('model').onchange(); } function changeModel(modelValue) { document.getElementById('output').innerHTML = modelValue; return; } function changeSelect(fieldID, newValues, newOptions) { selectField = document.getElementById(fieldID); selectField.options.length = 0; if (newValues && newOptions) { for (i=0; i<newValues.length; i++) { selectField.options[selectField.length] = new Option(newOptions[i], newValues[i]); } } } </script> </html>
  19. hey everybody ; i want to hide some tabs in the menu for users according to their privileges ; my table : user (id, name , pwd , state , histotic , report) state , historic and report ill take values : yes or no . and according to that if user 1 will have : state = yes , historic=no , report = no it means that in the menu the too tabs : historic and reort will be hidden . is it possible to do it in php ?? if it is any ideas how can i start it ?? thank u so much for helpin me
  20. My drop down input doesn't pass the value to the next page correctly echo " <select name='NexternalStocker'> <option value='NULL'>Select</option> <option value='NULL'>-----</option>"; while ($row2 = mysql_fetch_assoc($result2)) { echo "<option value='$row2[external_Stocker]'>$row2[external_Stocker]</option>"; } echo " </select>"; Despite the drop down menu item appearing correctly on the page, "$_POST['Nexternal_Stocker'];" won't retrieve anything on the next page... can anyone give me any pointers?
  21. I'm taking this class and we've just started to learn PHP so I am really new to the subject. I have done some coding and have been emailing my instructor (he has not responded yet) so please do not just click the back button thinking all I want is the answer. Here is what I need to accomplish: Create a "self-processing" PHP page that will initially just display a simple form with a drop-down select box that lets the user choose between the feedback and help request forms. When the user makes a selection, instead of using JavaScript to dynamically build or reveal the appropriate submission form, the form will be submitted back to the same page on the server for further processing. The PHP page will use a PHP script to check if the user has submitted a choice, and if so it will dynamically display the appropriate form. This is what my assignment looks like so far: http://www2.esc.edu/jvooris/assignment5-2.php As you can see, the forms are already displayed even without selecting an option from the drop down menu. What I need to have happen is have that drop down menu appear and then have the appropriate form display after the user clicks the submit button. So if the user clicks the submit button when the option is still on "Please select the form you want to fill out" then nothing should be displayed. However, if the user clicks the submit button when they select the option "Feedback Form" then that form will appear on the page and the same goes for the "Help Form". When I emailed my instructor he said that I need to: "Create a PHP page with a form with a drop down menu and a submit button that has a action to post to itself" and "Add PHP code at the top using the isset method to test to see if the page was submitted to itself and if your drop down menu variable was sent." Like I said, I do have some code already written. My problem is trying to figure out how to make it work correctly and I can't tell if I am way off base with the code I already have or if I just need to tweak a few things. I would appreciate any help in this matter and I hope I did not do too much explaining to deter anyone. Thank you. I will post my code below (I have cut out the code for the forms to shorten the code). <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>PHP Form</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <link rel="stylesheet" href="styles.css" type="text/css" /> <!--This links the entire page to the CSS style sheet. The font sizes, colors, colors on the page, etc. are all created on the attached style sheet--> </head> <body> <div id="wrapper"> <!--This statement makes the entire page align to a specific setting as set in the CSS.--> <!--This code first appears on the page to allow the user to select an option--> <form action="assignment5-2.php" name="select"> <p><select name="formChoice" size="1"> <option value="0">Please select the form you want to fill out</option> <?php $formChoice=$_GET["formChoice"]; echo $formChoice; if($formChoice==1)echo "<option value=1 selected='selected'>Feedback Form</option>"; else echo "<option value=1>Feedback Form</option>"; if($formChoice==2)echo "<option value=2> selected='selected'>Help Form</option>"; else echo "<option value=2>Help Form</option>"; ?> <input type="submit" value="Submit"/> </select> </form> <form id="feedbackForm" action="assignment5-2.php" method="GET"> <h1>User Feedback</h1>
  22. Hi everyone ! I'm new here... So I got a little problem with creating my first website. I want to include files with the content of my subpages to the main index file. At the first I made a simple solution with switch. Where the urls to the files in the menu look like: href="index.php?page=1" than "page=2" and so on and the code in the place of subpages content was: <? switch ($_GET['page']) { case 2: include("/subpages/aboutme.php"); break; case 3: include("/subpages/a=gallery.php"); break; case 4: include("/subpages/movies.php"); break; case 5: include("/subpages/contact.php"); break; case 1: default: include("/subpages/main.php"); } ?> Of course this solution was correct and it was working BUT what about when someone change the url to the ..."index.php?page=10000000" just because being curious and to check what will happen (there isn't any site with the sign "The page you're looking for cannot be found") and the other reason why I want to upgrade my include solution was that I have to add another cases every time when I want to make another subpages. So I decided to change it and my new url code in menu looks like: href="index.php?page=aboutme" or href="index.php?page=gallery" (so after equal sign there is an exactly name of my subpage without ".php") and than the code which includes my content is: if (file_exists('subpages/' . $page . '.php')) { require('subpages/' . $page . '.php'); } else { echo '<div id="main"><span>The page you’re looking for cannot be found.</span></div>'; } where the $page=$_GET['page']; It is working too but only when I click on one of the subpages in my menu but what about default like in the switch solution? I mean the case when I go to my site typing url without selecting any subpage. Now there is just the sign "The page you're looking for cannot be found." My other question is that I want to add a guestbook which is in the other folder in subpages so the url is "subpages/guestbook/gbook.php". What should I change in my code which works only for the subpages folder? I try to do something like this but it doesn't work: if ($page='gbook' && file_exists('subpages/guestbook/' . $page . '.php')) { require('subpages/guestbook/' . $page . '.php'); } elseif ($page!='gbook' && file_exists('subpages/' . $page . '.php')) { require("subpages/' . $page . '.php'); } else { echo '<div id="main"><span>The page you’re looking for cannot be found.</span></div>'; } Sorry for the length of this topic but I want to avoid unnecessary questions and useless solutions and I want apologies for my English but I'm 17 and I'm from Poland so I've been still learning it !
  23. Hi. I have just downloaded a WordPress theme which has a pre-installed horizontal accordion on the homepage. The .css is: .haccordion{ padding: 0; } .haccordion ul{ margin: 0; padding: 0; list-style: none; overflow: hidden; /*leave as is*/ } .haccordion li{ margin: 0; padding: 0; display: block; /*leave as is*/ width: 100%; /*For users with JS disabled: Width of each content*/ height: 200px; /*For users with JS disabled: Height of each content*/ overflow: hidden; /*leave as is*/ float: left; /*leave as is*/ } .haccordion li .hpanel{ width: 100%; /*For users with JS disabled: Width of each content*/ height: 200px; /*For users with JS disabled: Height of each content*/ } <script type="text/javascript"> haccordion.setup({ accordionid: 'hc1', //main accordion div id paneldimensions: {peekw:'50px', fullw:'786px', h:'786px'}, selectedli: [0, true], //[selectedli_index, persiststate_bool] collapsecurrent: false //<- No comma following very last setting! }) haccordion.setup({ accordionid: 'hc2', //main accordion div id paneldimensions: {peekw:'30px', fullw:'786px', h:'786px'}, selectedli: [-1, true], //[selectedli_index, persiststate_bool] collapsecurrent: false //<- No comma following very last setting! }) </script> ...which all seems pretty straightforward... The .js is: <script type="text/javascript"> haccordion.setup({ accordionid: 'hc1', //main accordion div id paneldimensions: {peekw:'50px', fullw:'786px', h:'430px'}, selectedli: [0, true], //[selectedli_index, persiststate_bool] collapsecurrent: false //collapse current expanded li when mouseout into general space? }) </script> ...again, fairly straightforward... The problem is that, when I go to the homepage, the first panel of the accordion is open with the other accordion 'tabs' visible on the right - all good so far - but the second I roll over, the accordion collapses and won't re-open...the hyperlinks still work off the 'tabs', but each layer / panel of the accordion refuses to open, roleed over, clicked on, whatever... Any suggestions?
  24. I have a table that I want to create into a horizontal menu using lists/CSS in my header. I have the code that creates the menu, I just can't figure out the foreach loops to actually generate the menu. $refs = array(); $list = array(); $result = full_query("SELECT id,title,slug,parent FROM `page`"); while($data = mysql_fetch_assoc($result)) { $thisref = &$refs[$data['id']]; $thisref['parent'] = $data['parent']; $thisref['title'] = unserialize($data['title']); $thisref['slug'] = $data['slug']; if($data['parent'] == 0) { $list[$data['id']] = &$thisref; } else { $refs[$data['parent']]['children'][$data['id']] = &$thisref; } } // can't figure this part out foreach($list as $keys => $var) { foreach($var as $vkey => $vvar) { if(isset($vkey['children'])) { print $vkey; } } } Which, with my current data, results in this array: Array ( [4] => Array ( [children] => Array ( [1] => Array ( [parent] => 4 [title] => Child1 [id] => 1 [slug] => child1 ) ) [parent] => [title] => Parent1 [id] => 4 [slug] => parent1 ) [6] => Array ( [children] => Array ( [2] => Array ( [parent] => 6 [title] => child2 [id] => 2 [slug] => child2 ) [3] => Array ( [parent] => 6 [title] => child3 [id] => 3 [slug] => child3 ) [8] => Array ( [parent] => 6 [title] => child4 [id] => 8 [slug] => child4 ) ) [parent] => [title] => Parent2 [id] => 6 [slug] => parent2 ) [7] => Array ( [parent] => [title] => Parent3 [id] => 7 [slug] => parent3 ) [9] => Array ( [parent] => [title] => Parent4 [id] => 9 [slug] => parent4 ) ) Am trying to get the foreach to do this: Parent1 Child1 Parent2 Child2 Child3 Child4 Parent3 Parent4 But horizontally. Any help is greatly appreciated!
  25. Hello! I am using CSS to nest a menu on this page: http://pirantin.com/index.php It's not displaying correctly in ...wait for it... da da daaaa! Internet explorer! Yes, our old friend Microsoft is acting up again. Can anyone here suggest a way of getting around it. I think it WAS working, but I don't know what happened. :o/ Thanks, Neil
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.