Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: MinasC on September 24, 2007, 03:22:01 PM

Title: change menu
Post by: MinasC on September 24, 2007, 03:22:01 PM
i tried to remove the default buttons of smf (successfully) and put in a horizontal dropdown menu , quite like the one in this forum , but couldn't do it ! actually i tried several scripts (css or javascript based) but none worked ! are there any standard instructions for this ?

thnx !
Title: Re: change menu
Post by: jerm on September 24, 2007, 04:02:04 PM
What code are you using? What exactly is not working? Errors?
Title: Re: change menu
Post by: MinasC on September 25, 2007, 03:54:22 PM
no errors , it just didn't show at all or , in another case , it showed fine but on mouse over it didn't drop down as it was supposed to ! i am out of home now , i will post the code i used later tonight .
Title: Re: change menu
Post by: MinasC on September 25, 2007, 06:54:58 PM
ok , as i already said i tried more than one scripts but the one i would really like to use is the one attached ! i hope there is a way to do that .
Title: Re: change menu
Post by: MinasC on September 30, 2007, 07:25:28 PM
wow , i didn't think it would be so hard to put/find a code for a horizontal dropdown menu ! it doesn't have to be as complex as the one i uploaded , just a simple menu like the simplemachine's forum would do !

any help would be appreciated !
thnx !
Title: Re: change menu
Post by: codenaught on September 30, 2007, 07:32:57 PM
Perhaps this topic may help you - Drop down selection on the index.. (http://www.simplemachines.org/community/index.php?topic=195417.0)
Title: Re: change menu
Post by: MinasC on October 01, 2007, 12:12:54 PM
i am gonna try it out and tell you how it went , thnx a lot !
Title: Re: change menu
Post by: MinasC on October 01, 2007, 01:58:21 PM
ok , i tried it but there seem to be 2 errors (according to IE) :

Line 110
Char 39
Error Unterminated string constant
Code 0
URL http://www.forum.com/index.php?action=forum

and

Line 2432
Char 1
Error 'cssdropdown' is undefined
Code 0
URL http://www.forum.com/index.php?action=forum

the changes i made in index.template.php :

1) in the head , i replaced
// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?fin11" />
        <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?fin11" media="print" />';


with
// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?fin11" />
        <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?fin11" media="print" />
        <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/chromestyle.css" />';


2) in the head , just before </head> i added
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/chrome.js">

/***********************************************
* Chrome CSS Drop Down Menu- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>


3) in the body , i put the menu in so that it looks like that :
// TinyPortal
     if($context['TPortal']['showtop']==1)
     {
// TinyPortal end
echo '
<table width="100%" cellpadding="4" cellspacing="0" border="0" >
<tr>';

// SHOW THE JAVASCRIPT DROPDOWN MENU !!!
echo '<td width="90%" class="titlebg2">
       
<div class="chromestyle" id="chromemenu">
<ul>
<li><a href="http://www.dynamicdrive.com">Home</a></li>
<li><a href="#" rel="dropmenu1">Resources</a></li>
<li><a href="#" rel="dropmenu2">News</a></li>
</ul>
</div>

<!--1st drop down menu -->
<div id="dropmenu1" class="dropmenudiv">
<a href="http://www.dynamicdrive.com/">Dynamic Drive</a>
<a href="http://www.cssdrive.com">CSS Drive</a>
<a href="http://www.javascriptkit.com">JavaScript Kit</a>
</div>


<!--2nd drop down menu -->
<div id="dropmenu2" class="dropmenudiv" style="width: 150px;">
<a href="http://www.cnn.com/">CNN</a>
<a href="http://www.msnbc.com">MSNBC</a>
<a href="http://news.bbc.co.uk">BBC News</a>
</div>

<script type="text/javascript">
cssdropdown.startchrome("chromemenu")
</script>
</td>';


i looked it over and over again but i cannot find the mistake i made !
(note : all the dropdown menu files were uploaded in / public_html / forumv3 / Themes / default / )

i get to see the menu fine but it doesn't drop down !
please help !
thnx a lot !
Title: Re: change menu
Post by: MinasC on October 09, 2007, 07:01:46 AM
doesn't anyone know what Error 'cssdropdown' is undefined means ?
i really need this menu so if anyone could help ...
thnx!
Title: Re: change menu
Post by: codenaught on October 09, 2007, 05:48:54 PM
Did you upload chromestyle.css and chrome.js to Themes/default?
Title: Re: change menu
Post by: MinasC on October 09, 2007, 06:08:01 PM
yes i did !
Title: Re: change menu
Post by: codenaught on October 10, 2007, 01:06:16 AM
cssdropdown should definitely be defined if the file is properly loaded.

Could we have a link to your forum? This may make it easier to debug what is going wrong.
Title: Re: change menu
Post by: MinasC on October 10, 2007, 11:50:48 AM
i will pm you the link (to you and anyone else willing to help off course) cause it is a closed-to-visitors forum , only alrerady registered members allowed (family forum) so what i am going to do is change the permissions and let visitors in until you tell me you are done examining it ! i also have to inform you that it is a fresh install and i am still working on the way it looks (i still haven't "released" it to my members) and it is mostly in greek ! i hope that doesn't stop you from finguring what's wrong with the menu !

thnx a lot , i'll be waiting for your answer !
Title: Re: change menu
Post by: MinasC on October 10, 2007, 03:27:01 PM
check this (http://news.ert.gr/) menu , it's something like what i had in mind in the first place (but any dropdown tht ACTUALLY WORKS will do) !
Title: Re: change menu
Post by: metallica48423 on October 24, 2007, 08:02:08 PM
is this resolved or do you still require assistance?
Title: Re: change menu
Post by: MinasC on October 25, 2007, 07:05:45 AM
no , i still have the same problem and i am in request for a drop down menu script that will work (since the ones i posted didn't get me anywhere and there was noone who could help) !

the script used in the drop down menu of the smf site would be great but i guess that would be too much to ask ...
Title: Re: change menu
Post by: MinasC on October 28, 2007, 07:51:23 PM
just for the record , i found a drop down menu (http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm) that actually works with smf ! i don't know why this worked while others didn't ! the only difference is that this one defines how its submenus are within the <head> section while others do it within the <body> section of the page ! that's the only thing i can think of ! anyway , case closed for me !!!
Title: Re: change menu
Post by: metallica48423 on October 28, 2007, 07:59:29 PM
Quotethe script used in the drop down menu of the smf site would be great but i guess that would be too much to ask ...

Most of *us* don't even fully know how that works -- its tied into the sources and the new way the menus work in 2.0 -- which is another thing.

Glad to see you found a drop down that works :)