Jump to content

maxert

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

maxert's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. If you can think of an alternate method that doesn't use the existing script, that would also be cool. Thanks!
  2. I figured out how to fix this... I used a HEX editor.
  3. Hello, I have a two level submenu that looks something like this: [code] <ul> <li><a href="/main-dir/subdir1/>1st Item</a></li> <li><a href="/main-dir/subdir2/>2nd Item</a>     <ul>         <li><a href="/main-dir/subdir2/a.php>1st SubItem</a>         <li><a href="/main-dir/subdir2/b.php>2nd SubItem</a>         <li><a href="/main-dir/subdir2/c.php>3rd SubItem</a>     </ul> </li> <li><a href="/main-dir/subdir3/>3rt Item</a></li> <li><a href="/main-dir/subdir4/>4th Item</a></li> </ul> [/code] I am indicating the active page by giving the relevant <li> a class of "active" The tricky part is that, in the case of SubItems I would like the parent <li> to have a class of "active" as well as the actual active page <li>. I have some code that is working on the main menu: [code] //Menu is $menu $lines = split("\n", $menu); foreach ($lines as $line) {     $current = false;     preg_match('/href="([^"]+)"/', $line, $url);     if (substr($_SERVER["PHP_SELF"], 0, 5) == substr($url[1], 0, 5)) {         $line = str_replace('<a h', '<a class="active" h', $line);         }     echo $line."\n"; [/code] Can I modify this to work for my submenu? Thank you!
  4. I am getting some odd characters appearing in the beggining of an include when rendered in firefox (v 1.5x on XP Pro). The characters are:  These are not appearing in IE6 Any ideas on what is causing this? The include line: [code]<?php include_once ('rootdir/filedir/filename.php'); ?>[/code] This is not occuring for other included files. This is the last include on the page. Include file source: [code]</div></div> <div id="footer">         <div id="submenu">         <ul>         <li><a href="registry.php" <?php if ($thisPage=="Registry") echo " class='active' "; ?>title="Home">Registry</a></li>         <li> - <a href="pictures.php" <?php if ($thisPage=="Pictures") echo " class='active' "; ?>title="Pictures">Pictures</a></li>         <li> - <a href="contact.php" <?php if ($thisPage=="Contact") echo " class='active' "; ?>title="Contact Us">Contact us</a></li>         </ul>         <span class="clearfix"> </span>         </div> </div> <script type="text/javascript"> if(typeof sIFR == "function"){     sIFR(); }; </script> <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "accountcode"; urchinTracker(); </script> </body> </html>[/code] Any ideas? Thanks!
×
×
  • 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.