Members: 16,996
Threads: 38,845
Posts: 159,389
Online: 16

Newest Member: Kl_broka@rediffmail.com


Odoo.tv - Outdoor Television


Sedo - Domains kaufen und verkaufen das Projekt mambers.com steht zum Verkauf Besucherstatistiken von mambers.com etracker® Web-Controlling statt Logfile-Analyse
Old 24.04.2004, 03:52   #1 (permalink)
Junior Mamber
 
mcpat's Avatar
 
Join Date: Apr 2004
Posts: 27
mcpat is on a distinguished road
Flame Rollovermenu with images

if someone need it, I made it tonight :-)

index.php of the template
PHP Code:
// make rolloverimages for menu (remove "old" $mymenu_rows!!!)
$database->setQuery("SELECT * FROM #__menu WHERE menutype = 'mainmenu' AND published ='1' AND parent = '0' ORDER BY ordering");
$mymenu_rows = $database->loadObjectList();
$mymenu_content = "";
$i="0";
foreach($mymenu_rows as $mymenu_row) {
    $i++;
    // akede, 2004-03-04: Support for multi language component MambelFish added
    if ($mosConfig_mbf_content) {
        $mymenu_row = MambelFish::translate( $mymenu_row, 'menu', $mosConfig_lang);
    }
    // END: akede
    // print_r($mymenu_rows);
    $mymenulink = $mymenu_row->link;
    if ($mymenu_row->type != "url") {
        $mymenulink .= "&Itemid=$mymenu_row->id";
    }
    if ($mymenu_row->type != "separator") {
        
        $mymenu_content .= "<div class=\"cssnav".$i."\"><a href=\"".sefRelToAbs($mymenulink)."\"><img src=\"".$mosConfig_live_site."/templates/duckrace/images/nav_".$i.".gif\"></a></div>"; 
    }
}
// make the css for the menu-rollover-images
$k="1";
while ($k <= $i){
    if ($k =="1") {
        echo "<style type=\"text/css\">";
    }
    ?>        
        .cssnav<? echo $k;?>    {
            position:relative;font-family: arial, verdana, helvetica, sans-serif;
            background-image: url(/templates/duckrace/images/nav_<? echo $k;?>_on.gif);
            background-repeat: no-repeat;display: block;
            width: 116px;height: 30px;margin: 0; margin-bottom:0px;padding: 0; 
        }
        .cssnav<? echo $k;?> a {
            display:block;
                    font-size: 11px;
            width: 116px;
            height: 30px;display: block;
            float: left;margin: 0;
            padding: 0;color: black; 
            text-decoration: none; 
        }
        .cssnav<? echo $k;?> img { width: 100%; height: 100%; border: 0;}
        * html a:hover {visibility:visible}
        .cssnav<? echo $k;?> a:hover img{visibility:hidden}
        .cssnav<? echo $k;?> span {    
            position:absolute;
            left:5px;
            top:3px;
            margin:0;
            cursor: hand;
        }
    <?
    $k
++;
}
?>
</style></head><body>
<?php echo $mymenu_content ?>

....
</body></html>
insert images "nav_1.gif nav_1_on.gif nav_2.gif nav_2_on.gif ......" in the images dir of the template

have fun....
mcpat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mamb-Ads Component -> images are not being displayed oukenfold Component 'How Do I' Questions 6 19.05.2004 23:47
Static Component -> How do I get images to show ZeroZen Component 'How Do I' Questions 37 27.04.2004 10:57
Adding FTP'd images directly to content ThereseWeel Mambo 4.5 Bugs 0 15.04.2004 21:06
frontpage and content images - where to find reemas Mambo 4.5 General Talk 1 14.04.2004 00:14
problem with htmlarea2 and uploading images scoobidoo Mambo 4.5 'How Do I' Questions 2 12.04.2004 14:43


All times are GMT +2. The time now is 10:07.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.