News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

[Trick] Show board icon as "on" to guests

Started by Antes, June 16, 2014, 12:29:45 PM

Previous topic - Next topic

Antes

This small trick allows you to show board icons as on all the time to guests.

Open BoardIndex.template.php
Code (Find) Select
                // If the board or children is new, show an indicator.
                if ($board['new'] || $board['children_new'])
                    echo '

Code (Replace) Select
                // If the board or children is new, show an indicator.
                if ($context['user']['is_guest'])
                    echo '
                            <img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'on','.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
                elseif ($board['new'] || $board['children_new'])
                    echo '


Matthew K.

Code (Find) Select
                // If the board or children is new, show an indicator.
                if ($board['new'] || $board['children_new'])
                    echo '

Code (Replace) Select
                // If the board or children is new, show an indicator.
                if ($board['new'] || $board['children_new'] || $user_info['is_guest'])
                    echo '

Antes

then you'll show on2.png or on.png based on which variable returns true.

Antechinus

Are you sure that will work? Does the forum track what is new for guests?

ARG01

I have on a few occasions upon request set the New Post "new_some" icon to be visible to guests under the boards along with the No New Post "new_none.png" and Redirect Board "new_redirect.png" icons. The only actual good I see in this is to show newbies that they must be logged in to see any new posts. It may help, it may not but just seems more practical.

;)
No, I will not offer free downloads to Premium DzinerStuido themes. Please stop asking.

Illori

Quote from: Antechinus on June 16, 2014, 08:20:33 PM
Are you sure that will work? Does the forum track what is new for guests?

nope smf does not show the new flag to guests.

Arantor

The point is to show guests the 'on' icon to entice them into viewing. 2.1 already does this but like so many other things I regret making the change because conservatism is alive and well.

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Advertisement: