|
|
classixuk |
|
|
Posts: 64
Posts Per Day: 0.07
Time Online: 16 hours 57 minutes
|
Hi all, I was wondering how I go about adding a button to my menu bar? I'd like to add a " recent posts" button. I know how to make the image and hyperlink it etc, but I don't know where the "menubar" string is defined. Thanks. P.S. Justin and mods. I've asked each question that I need to be answered in a seperate thread. This isn't to increase my post count  , but simply for the reason that users with the same question in the future will be able to find the answer quickly. Hope that's OK with you. |
|
|
|
|
|
Justin |
|
|
Posts: 15,080
Gender:  Male
Posts Per Day: 6.42
Reputation: 93.42%
Reputation Score: +298 / -21
Time Online: 37 days 1 hours 13 minutes
Location: Tallassee, AL
Age: 22
|
|
|
|
|
|
classixuk |
|
|
Posts: 64
Posts Per Day: 0.07
Time Online: 16 hours 57 minutes
|
I was going to do that Justin, but me being a perfectionist, I wanted my last button to remain as Log in/out and my first to be home. I need to insert the recent posts button into the $menu code. |
|
|
|
|
|
Ryan |
|
|
Posts: 1,799
Gender:  Male
Posts Per Day: 1.11
Reputation: 85.00%
Reputation Score: +85 / -15
Time Online: 11 days 8 hours 2 minutes
Location: Ontario
Age: 29
|
| In Routines.pl find the parts in black and add the parts in red: $latestposts = qq~<a href="$surl"><img src="/adasdf.gif"></a>~; $homemenu = qq~<a href="$surl">$img{'home'}</a>~; $calmenu = qq~<a href="$surl\lv-cal/">$img{'cal'}</a>~; $searchmenu = qq~<a href="$surl\lv-search/~; $searchmenu .= "b-$URL{'b'}/" if($URL{'b'}); $searchmenu .= qq~">$img{'search'}</a>~; $menubar = "$homemenu $latestposts$sep$help$msp2$calmenu$msp2$searchmenu$msp2"; |
|
|
|
|
|
classixuk |
|
|
Posts: 64
Posts Per Day: 0.07
Time Online: 16 hours 57 minutes
|
Wow Ryan, thanks for that. You're really good at this aren't you! That's another increase on your rep.  |
|
|
|
|
|
classixuk |
|
|
Posts: 64
Posts Per Day: 0.07
Time Online: 16 hours 57 minutes
|
In Routines.pl find the parts in black and add the parts in red: $latestposts = qq~<a href="$surl"><img src="/adasdf.gif"></a>~; $homemenu = qq~<a href="$surl">$img{'home'}</a>~; $calmenu = qq~<a href="$surl\lv-cal/">$img{'cal'}</a>~; $searchmenu = qq~<a href="$surl\lv-search/~; $searchmenu .= "b-$URL{'b'}/" if($URL{'b'}); $searchmenu .= qq~">$img{'search'}</a>~; $menubar = "$homemenu $latestposts$sep$help$msp2$calmenu$msp2$searchmenu$msp2"; Just a quick update for anybody else who wants to do this. Ryan's code is almost correct, but the link from the button will take you to the front page of your forums instaed of the recent posts page. If you'd like to have a button inserted into your menubar for recent posts (in this example I will place it after the "home" button) then follow Ryan's guide but use the code below: Quoted Text $homemenu = qq~<a href="$surl">$img{'home'} </a>~; $latestposts = qq~<a href="$surl\v-search/p-topten/"> <img src="/blahdocs/template/ mac_revisited/buttons/recentpost .gif " alt="Recent Posts" border="0"></a>~; $calmenu = qq~<a href="$surl\lv-cal/">$img{'cal'}</a>~; $searchmenu = qq~<a href="$surl\lv-search/~; $searchmenu .= "b-$URL{'b'}/" if($URL{'b'}); $searchmenu .= qq~">$img{'search'}</a>~; $menubar = "$homemenu $latestposts$sep$help$msp2$calmenu$msp2$search menu$msp2"; The red parts of the code are what you need to copy and paste. Where the red code turns green you will need to type the name of your templates folder (e.g. sub_silver, winter or mac_revisited etc.) Where the red code turns blue you will need to type the name of your button for recent posts (e.g. recentposts.gif, recent.gif, rec_post.gif etc.) Hope that helps, and thanks to Ryan for giving me the code. P.S. Remember, if you ever change themes you will need to go back and delete these lines from your routine.pl unless you are using the same style of buttons, otherwise you will have one odd button in your menubar! |
|
| Revision History (1 edits) |
|
| |
|
|
|
|
|
turbomad1 |
| September 2, 2006, 7:14am |
|
|
Posts: 355
Gender:  Male
Posts Per Day: 0.40
Time Online: 6 days 1 hours 2 minutes
Location: coventry (uk)
Age: 32
|
i have done this and its taking it to the recent post and that is great but how would i alter it for the unread post? |
|
|
|
|
|
Martin |
| September 2, 2006, 7:25am |
|
|
Posts: 4,573
Gender:  Male
Posts Per Day: 3.07
Reputation: 98.60%
Reputation Score: +212 / -3
Time Online: 35 days 21 hours 17 minutes
Location: UK
Age: 50
|
Try Changing: | Code <a href="$surl\v-search/p-topten/"> | | to: | Code <a href="$surl\lv-search/p-newposts/"> | | |
| Martin's Reputation: Increase |
|
|
|
|
|
turbomad1 |
| September 2, 2006, 7:25am |
|
|
Posts: 355
Gender:  Male
Posts Per Day: 0.40
Time Online: 6 days 1 hours 2 minutes
Location: coventry (uk)
Age: 32
|
|
|
|
|
|
Martin |
| September 2, 2006, 7:27am |
|
|
Posts: 4,573
Gender:  Male
Posts Per Day: 3.07
Reputation: 98.60%
Reputation Score: +212 / -3
Time Online: 35 days 21 hours 17 minutes
Location: UK
Age: 50
|
If you wait a few days I plan to make mods to add buttons for both Latest Posts and Unread Posts |
| Martin's Reputation: Increase |
|
|
|
|
|
turbomad1 |
| September 2, 2006, 7:45am |
|
|
Posts: 355
Gender:  Male
Posts Per Day: 0.40
Time Online: 6 days 1 hours 2 minutes
Location: coventry (uk)
Age: 32
|
|
|
|
|
|
turbomad1 |
| September 2, 2006, 8:05am |
|
|
Posts: 355
Gender:  Male
Posts Per Day: 0.40
Time Online: 6 days 1 hours 2 minutes
Location: coventry (uk)
Age: 32
|
If you wait a few days I plan to make mods to add buttons for both Latest Posts and Unread Posts ok thank you i have done that one now matey i just need to sort a button image out now thank you |
|
|
|
|
|
Martin |
| September 2, 2006, 8:09am |
|
|
Posts: 4,573
Gender:  Male
Posts Per Day: 3.07
Reputation: 98.60%
Reputation Score: +212 / -3
Time Online: 35 days 21 hours 17 minutes
Location: UK
Age: 50
|
| Here's a button for you.
 |
This post contains attachments; to download them you must login. |
|
|
| Martin's Reputation: Increase |
|
|
|
|
|
turbomad1 |
| September 2, 2006, 8:25am |
|
|
Posts: 355
Gender:  Male
Posts Per Day: 0.40
Time Online: 6 days 1 hours 2 minutes
Location: coventry (uk)
Age: 32
|
|
|
|
|
|
turbomad1 |
| September 2, 2006, 10:05am |
|
|
Posts: 355
Gender:  Male
Posts Per Day: 0.40
Time Online: 6 days 1 hours 2 minutes
Location: coventry (uk)
Age: 32
|
| i have just noticed the new posts doesnt show all the new posts on my forum would there be a reason for this? its not showing anything up from the projects section on there at least i havnt gone through and checked all categories/forums on there as yet to find out which ones do and dont |
|
| Revision History (1 edits) |
|
| |
|
|
|
|
|
|