uktab Posted August 25, 2008 Share Posted August 25, 2008 Hi - This sounds like an easy thing to change, but I'm still a beginner and the site uses extra code that comes into play if I log in as admin to add new songs etc. (rather than just browse it) , so it's a bit confusing and complicated when I try to edit it. Here's what I'm having trouble with... My site shows a list of different musical styles (genres) on the left, that first appear in 'home.php' This list is all coloured the same shade of blue. When the user clicks a genre in that list, you're taken to 'listing.php' - this shows a list of songs relating to the genre that you clicked. I'd like the chosen genre to be highlighted in the list with a lighter blue, so the user can see which genre they are looking at, until they've selected a different genre. I've highlghted the links to the different pages on the site, and even coloured the corresponding graphic music note myself - but the coding for this list is difficult to interpret due to the extra 'admin only' code, and I'm a complete beginner. I appreciate any help, as I've spent hours trying to find where to change the colour, and finally realise it's not as easy as I thought. The site is www.makin-trax.co.uk If anyone needs the code I can email it if that will help, or I can copy and paste it here if it will fit. Thanks UkTab Quote Link to comment https://forums.phpfreaks.com/topic/121246-how-can-i-highlight-a-menu-to-show-the-user-what-theyve-selected-pls/ Share on other sites More sharing options...
DarkWater Posted August 25, 2008 Share Posted August 25, 2008 Just make a new CSS class and set the current selection to that CSS class instead of the normal one. Can I see the menu code? (Please only the relevant code, not 17 files that don't even pertain to this. You'd be surprised at what people post here.) Quote Link to comment https://forums.phpfreaks.com/topic/121246-how-can-i-highlight-a-menu-to-show-the-user-what-theyve-selected-pls/#findComment-625060 Share on other sites More sharing options...
Minase Posted August 25, 2008 Share Posted August 25, 2008 or use IF Quote Link to comment https://forums.phpfreaks.com/topic/121246-how-can-i-highlight-a-menu-to-show-the-user-what-theyve-selected-pls/#findComment-625064 Share on other sites More sharing options...
DarkWater Posted August 25, 2008 Share Posted August 25, 2008 or use IF That was uhh...specific. o-O Quote Link to comment https://forums.phpfreaks.com/topic/121246-how-can-i-highlight-a-menu-to-show-the-user-what-theyve-selected-pls/#findComment-625068 Share on other sites More sharing options...
Minase Posted August 25, 2008 Share Posted August 25, 2008 i mean to use IF syntax based on $_GET if($_GET['gid']) == "Ambient_Chillout") { // echo the text with a new color } else { // echo normal one } ofcourse this is a messy one but it work prety good Quote Link to comment https://forums.phpfreaks.com/topic/121246-how-can-i-highlight-a-menu-to-show-the-user-what-theyve-selected-pls/#findComment-625072 Share on other sites More sharing options...
uktab Posted August 25, 2008 Author Share Posted August 25, 2008 Sorry everyone - I meant to say that I know about IF THEN (I used to program in BASIC a long time ago) ! The problem isn't knowing how to change the colour - the problem is finding the 'chosen' genre in the code. There doesn't seem to be a part of the code that holds the variable anywhere ! Darkwater - what's the best way to get the code to you (or anyone) ? Quote Link to comment https://forums.phpfreaks.com/topic/121246-how-can-i-highlight-a-menu-to-show-the-user-what-theyve-selected-pls/#findComment-625084 Share on other sites More sharing options...
Minase Posted August 25, 2008 Share Posted August 25, 2008 i did show you an good example (the code itself) give your left menu Quote Link to comment https://forums.phpfreaks.com/topic/121246-how-can-i-highlight-a-menu-to-show-the-user-what-theyve-selected-pls/#findComment-625085 Share on other sites More sharing options...
uktab Posted August 25, 2008 Author Share Posted August 25, 2008 Minase - thanks, but the problem is that the code doesn't contain anything like ($_GET['gid']) == "Ambient_Chillout") { (or any other genre !) ??? The only $_GET variables are when I want to add, alter or delete a song Quote Link to comment https://forums.phpfreaks.com/topic/121246-how-can-i-highlight-a-menu-to-show-the-user-what-theyve-selected-pls/#findComment-625090 Share on other sites More sharing options...
Minase Posted August 25, 2008 Share Posted August 25, 2008 phoa ... the code should contain those in order to do what you want i mean in your php file how the menu look,give me the menu code and i will do it for you.... you have under your nose but dont realize... Quote Link to comment https://forums.phpfreaks.com/topic/121246-how-can-i-highlight-a-menu-to-show-the-user-what-theyve-selected-pls/#findComment-625093 Share on other sites More sharing options...
uktab Posted August 25, 2008 Author Share Posted August 25, 2008 Minase - pls check your message inbox ... thanks! Quote Link to comment https://forums.phpfreaks.com/topic/121246-how-can-i-highlight-a-menu-to-show-the-user-what-theyve-selected-pls/#findComment-625099 Share on other sites More sharing options...
DarkWater Posted August 25, 2008 Share Posted August 25, 2008 You could post the code in: [code] [/code] tags and I'll be glad to help. Quote Link to comment https://forums.phpfreaks.com/topic/121246-how-can-i-highlight-a-menu-to-show-the-user-what-theyve-selected-pls/#findComment-625172 Share on other sites More sharing options...
sasa Posted August 25, 2008 Share Posted August 25, 2008 in listing.php change code <a href="listing.php?gid=Abstract_Experimental">Abstract / Experimental</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Acoustic">Acoustic</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Ambient_Chillout">Ambient / Chillout</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Big_Band_Swing">Big Band / Swing</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Dance_Disco">Dance / Disco</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Film_Game_Scores">Film / Game Scores</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Hip_Hop_Rap_Urban">Hip Hop / Rap / Urban</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Jazz">Jazz</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Pop">Pop</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Reggae">Reggae</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Rock">Rock</a> <img src="images/dot.jpg"><br><a href="listing.php?gid=Trip_Hop">Trip Hop</a> <img src="images/dot.jpg"><br> with <?php $menu = '<a href="listing.php?gid=Abstract_Experimental">Abstract / Experimental</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Acoustic">Acoustic</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Ambient_Chillout">Ambient / Chillout</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Big_Band_Swing">Big Band / Swing</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Dance_Disco">Dance / Disco</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Film_Game_Scores">Film / Game Scores</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Hip_Hop_Rap_Urban">Hip Hop / Rap / Urban</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Jazz">Jazz</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Pop">Pop</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Reggae">Reggae</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Rock">Rock</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Trip_Hop">Trip Hop</a> <img src="images/dot.jpg"><br>'; if ($_GET['gid']) $menu = str_replace('?gid='.$_GET['gid'], '?gid='.$_GET['gid'].'" style="color:red;',$menu); echo $menu; ?> Quote Link to comment https://forums.phpfreaks.com/topic/121246-how-can-i-highlight-a-menu-to-show-the-user-what-theyve-selected-pls/#findComment-625227 Share on other sites More sharing options...
uktab Posted August 25, 2008 Author Share Posted August 25, 2008 Minase thinks the changes are actually in menu-search.php Standard menu colour should be #333366. Highlighted colour should be #0066FF I sent Minase a copy with the colours needed but they're offline now. If anyone else wants to check it for me, it's <!--a href="listing.php">ALL</a> <img src="images/dot.jpg"><br--> <a href="listing.php?gid=Abstract / Experimental">Abstract & Experimental</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Acoustic">Acoustic</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=A capella">A capella</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Ambient / Chillout">Ambient & Chillout</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Big Band / Swing">Big Band & Swing</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Blues">Blues</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Classical %26 Orchestral">Classical & Orchestral</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Dance / Disco">Dance & Disco</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Film / Game Scores">Film & Game Scores</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Folk">Folk</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Hip Hop / Rap / Urban">Hip Hop, Rap & Urban</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Jazz">Jazz</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Latin">Latin</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Pop">Pop</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Psychedelic">Psychedelic</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Punk">Punk</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=R %26 B">R & B</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Reggae">Reggae</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Rock">Rock</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Ska">Ska</a> <img src="images/dot.jpg"><br> <a href="listing.php?gid=Trip Hop">Trip Hop</a> <img src="images/dot.jpg"> Thank you ! Quote Link to comment https://forums.phpfreaks.com/topic/121246-how-can-i-highlight-a-menu-to-show-the-user-what-theyve-selected-pls/#findComment-625243 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.