SimplePortal

SimplePortal => Site Discussion => Topic started by: willerby on May 12, 2009, 06:31:05 PM

Title: 'Show Unread' in Title Bar
Post by: willerby on May 12, 2009, 06:31:05 PM
Just noticed the 'Show Unread' links in the title bar on this site which include links limited to unread categories eg. Show Unread | Support | Customisation etc. using ?action=unread;c=x

I have technical and historical categories / boards on my site along with more general chat type content. I'd like to create a similar effect in my title bar, would you mind sharing the code used here?

I can work out the links I'd need to make an HTML or BBC block but would like to add to my title bar in same way as this site if possible (replacing the SMF standard ones)

?

W

 
Title: Re: 'Show Unread' in Title Bar
Post by: Nathaniel on May 12, 2009, 07:36:26 PM
That linkbar (only visible to Community Support Helpers + team members) is done with plain HTML code, inserted into the correct location in the 'index.template.php' file for our custom theme.

For the Shadow people theme, something like this should work ('index.template.php'):
Find this code:
Code: [Select]
// Show a random news item? (or you could pick one from news_lines...)

if (!empty($settings['enable_news']))

{

echo '

<div id="random_news"><h3>', $txt['news'], ':</h3><p>', $context['random_news_line'], '</p></div>';

}

echo '

<div>';

Replace with this code:
Code: [Select]
// Show a random news item? (or you could pick one from news_lines...)

if (!empty($settings['enable_news']))

{

echo '

<div id="random_news"><h3>', $txt['news'], ':</h3><p>', $context['random_news_line'], '</p></div>';

}

echo '

<div>
<div>
Show Unread:
<a href="url1">link1</a> |
<a href="url2">link2</a>
</div>';

You will have to edit some CSS styles to get it to center and look how you want. Jade created that theme, so she might be able to help. ;)
Title: Re: 'Show Unread' in Title Bar
Post by: willerby on May 13, 2009, 03:59:34 AM
Thanks LHVWB (Nathaniel)...

I can play with that until it looks right.

PS: preferred the enigmatic LHVWB
Title: Re: 'Show Unread' in Title Bar
Post by: willerby on June 03, 2009, 03:59:07 PM
Thanks for this Nathaniel. It's taken me a few weeks to get round to doing this but love it.

I particularly like...

<a href=".../index.php?action=unread;board=1.0;children">Board name</a>

...which picks up unread posts in a specific board PLUS all its child boards.

Great stuff. Thanks

W
SimplePortal 2.3.8 © 2008-2024, SimplePortal