News:

Join the Facebook Fan Page.

Main Menu

change menu

Started by MinasC, September 24, 2007, 03:22:01 PM

Previous topic - Next topic

MinasC

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 !

jerm

What code are you using? What exactly is not working? Errors?

MinasC

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 .

MinasC

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 .

MinasC

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 !

codenaught

Dev Consultant
Former SMF Doc Coordinator

MinasC

i am gonna try it out and tell you how it went , thnx a lot !

MinasC

#7
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 !

MinasC

doesn't anyone know what Error 'cssdropdown' is undefined means ?
i really need this menu so if anyone could help ...
thnx!

codenaught

Did you upload chromestyle.css and chrome.js to Themes/default?
Dev Consultant
Former SMF Doc Coordinator

MinasC


codenaught

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.
Dev Consultant
Former SMF Doc Coordinator

MinasC

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 !

MinasC

check this menu , it's something like what i had in mind in the first place (but any dropdown tht ACTUALLY WORKS will do) !

metallica48423

is this resolved or do you still require assistance?
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

MinasC

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 ...

MinasC

just for the record , i found a drop down menu 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 !!!

metallica48423

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 :)
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Advertisement: