how to use Matt Mullenweg’s script menu?
-
Hello I would like to know how to use the Matt Mullenweig’s men on my wordpress :`Intelligent Menu Code
<?php
$menu = <<<MENU
<ul id=”nav”>- Home
- Archives
- About
- Photos
- Music
- Scripts
- Jazz Quotes
- Toys
- Syndicate
- Portal
- Zeitgeist
- Contact
MENU;
$lines = split(“\n”, $menu);
foreach ($lines as $line) {
$current = false;
preg_match(‘/href=”([^”]+)”/’, $line, $url);
if (substr($_SERVER[“REQUEST_URI”], 0, 5) == substr($url[1], 0, 5)) {
$line = str_replace(‘<a h’, ‘<a id=”current” h’, $line);
}
echo $line.”\n”;
}
?>”`is it possible to make something whith this for my pages
<?php elseif ( is_page('home') )?><?php $menuhome = <<<MENUHOME <ul id="menu_oupocreanum"> <li><a href="/" title="home" id="menu_home_on"><span class="off">home</span></a></li> <li><a href="/biography/" title="biography" id="menu_biography"><span class="off">biography</span></a></li> <li><a href="/randomizer/" title="randomizer" id="menu_random"><span class="off">randomizer</span></a></li> <li><a href="/workingprogress/" title="workingprogress" id="menu_workingprogress"><span class="off">workingprogress</span></a></li> <li><a href="/play/" title="play" id="menu_play"><span class="off">play</span></a></li> <li><a href="/videos/" title="videos" id="menu_videos"><span class="off">videos</span></a></li> <li><a href="/pictures/" title="pictures" id="menu_pictures"><span class="off">pictures</span></a></li> <li><a href="/sounds/" title="sounds" id="menu_sounds"><span class="off">sounds</span></a></li> <li><a href="/exhibition/" title="exhibition" id="menu_exhibition"><span class="off">exhibition</span></a></li> <li><a href="/software/" title="software" id="menu_software"><span class="off">software</span></a></li> <li><a href="/abstracts/" title="abstracts" id="menu_abstracts"><span class="off">abstracts</span></a></li> <li><a href="/diagrams/" title="diagrams" id="menu_diagrams"><span class="off">diagrams</span></a></li> <li><a href="/machines/" title="machines" id="menu_machines"><span class="off">machines</span></a></li> <li><a href="/artists/" title="artists" id="menu_artists"><span class="off">artists</span></a></li> <li><a href="/bibliography/" title="bibliography" id="menu_bibliography"><span class="off">bibliography</span></a></li> <li><a href="/webography/" title="webography" id="menu_webography"><span class="off">webography</span></a></li> <li><a href="/discography/" title="discography" id="menu_discography"><span class="off">discography</span></a></li> <li><a href="/citations/" title="citations" id="menu_citations"><span class="off">citations</span></a></li> <li><a href="/lexicon on interactivity/" title="lexicon on interactivity" id="menu_lexique"><span class="off">lexicon on interactivity</span></a></li> <li><a href="/forum/" title="forum" id="menu_forum"><span class="off">forum</span></a></li> <li><a href="/upload/" title="upload" id="menu_upload"><span class="off">upload</span></a></li> <li><a href="/thanks/" title="thanks" id="menu_thanks"><span class="off">thanks</span></a></li> <li><a href="/links/" title="links" id="menu_links"><span class="off">links</span></a></li> </ul> MENUHOME; $lines = split("\n", $menuhome); foreach ($lines as $line) { $current = false; preg_match('/href="([^"]+)"/', $line, $url); if (substr($_SERVER["REQUEST_URI"], 0, 5) == substr($url[1], 0, 5)) { $line = str_replace('<a h', '<a id="current" h', $line); } echo $line."\n"; } ?>
my website adress is olivierbaudrydesign.free.fr
i ask to Matt but no response actually!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘how to use Matt Mullenweg’s script menu?’ is closed to new replies.