Skip to content
  • Jeroen's avatar
    Hey, · 460706b9
    Jeroen authored
    OK after a boring family 50 year marriage anniversary (what's the exact word...) of my grand-parents which lasted twelve hours (no computer in the mean time, ack) I got home and stared themeing. All I did in these three hours is fix the navigation box. In the code there was an attribute "selected" set in <option> main of the drop-down list. I copied that from linux.com... But now it seems that the option with selected appears as default in the list. So, when going to account it should be account appearing as default in the drop down list. But we load the same HTML for each page in Drupal. This caused Main to be "selected" for every page we load. That's where the problem was. So, how do we change that... After some time I went to irc.homelien.no #php (cool people by the way) and asked how I could get the URL the browser was currently on. They told me about $REQUEST_URI. OK... REQUEST_URI... Then the standard procedure followed when discovering something new. You tink that it returns the whole URL, but it doesn't only the last significant part (which is a good thing) After finding that out, you wonder why it still doesn't work, and it takes you some more time to find out that you have to globlify the variable $REQUEST_URI if you want to use it. OK, and after that it worked. :) So what I do now for every option in the list is: <?if ($REQUEST_URI == "/index.php") echo "selected"; ?> And this for every page we have. Houston we have a working drop-down list. :) Not only that I found out but also that NS 4.76 can't do CSS good. It just sucks actually, it can't even do a a:hover { color: <?php echo $color; ?> } That's one of the reasons Dries why you didn't notice much. It can't even do a a.active or a.visited either... (40 minutes and a NS 4.76-looking-nice theme later, happy Easter Dries :), it is 03.40, I should really start getting some normal hours again, school starts Tuesday...) OK Dries as you read, I added some twenty <font face="Helvetica">'s in the theme (NS 4.76 didn't seem to be able to do Arial) set the color links differently and hope that you like it a bit. I know the font is still a bit small, but if I do a +1 there it's huge in NS 6.01. But Dries, why don't you just back off from the NS 4.76 (there's a new version 4.77 btw) and get yourself something a bit more recent. You'll be astonished of how beautiful the wired actually is :) There is however still one pain in the ass. I can't the vertical spacer to be only one pixel in width. But I'll manage to get that right to eventually. OK, I am off to bed. Goodnight, and to all of you, a happy Easter (Google's cool too :))
    
    Jeroen.
    460706b9