disable 'Recent Posts' & 'News Fader' for guests

Started by steve51184, May 29, 2010, 03:24:55 PM

Previous topic - Next topic

steve51184

is there anyway to disable 'Recent Posts' & 'News Fader' for guests as it's really something they should/don't wan to see

thanks

steve51184

right i've managed to disable the news fader for guests:

in '/Sources/Subs.php'

Code (find) Select
// Get some news..

Code (add after) Select
if (!$user_info['is_guest'])

but for the life of me i can't get the recent post bit disabled for guests :(

i've tried:

in '/Themes/default/BoardIndex.template.php'

Code (find) Select
// This is the "Recent Posts" bar.

Code (add after) Select
if (!$user_info['is_guest'])

but that didn't work at all... any ideas please?

steve51184

hmm disabling the fader like that outputs this error (x2) for guests:

Undefined index: news_lines

so i had to take it off... back to square one lol


Joker™

try to use this in in '/Themes/default/BoardIndex.template.php' for recent post


if(!$context['user']['is_guest'])
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

steve51184

Quote from: sid2varun on June 03, 2010, 08:10:55 AM
try to use this in in '/Themes/default/BoardIndex.template.php' for recent post


if(!$context['user']['is_guest'])

been trying that didn't work

Joker™

In BoardIndex.template.php

Find:

    // This is the "Recent Posts" bar.
    if (!empty($settings['number_recent_posts']))



Replace with:

    // This is the "Recent Posts" bar.
    if ((!$context['user']['is_guest']) && !empty($settings['number_recent_posts']))


worked fine for me on RC3
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

steve51184

cool will test that out in a bit thank you any idea about the news fader?

Joker™

For news fader

In BoardIndex.template.php

Find:
// Show the news fader?  (assuming there are things to show...)
    if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))


Replace:
// Show the news fader?  (assuming there are things to show...)
       if ((!$context['user']['is_guest']) && ($settings['show_newsfader']) && !empty($context['fader_news_lines']))
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

steve51184


Joker™

your welcome . if your problem is solved can you mark the topic solved !
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

steve51184

ok ty very much but i have one last question how would i disable this mod for guests:

http://custom.simplemachines.org/mods/index.php?mod=2274

seems a little different but still a simple mod :)

Joker™

that mod isn't compatible with RC3 ,

It's working fine on RC2
so to hide it on RC2 you can make following changes

in BoardIndex.template.php

Find:

            echo '
    <h4 class="titlebg"><span class="left"></span>
            <span>'. $txt['num_last_24'] .' : ' .$context['num_last_24']. '</span></h4><p class="pminfo">';
        echo implode(', ', $context['list_last_24']);
        echo '</p>';   


Replace:

    if(!$context['user']['is_guest'])
    {
        echo '
            <h4 class="titlebg"><span class="left"></span>
            <span>'. $txt['num_last_24'] .' : ' .$context['num_last_24']. '</span></h4><p class="pminfo">';
        echo implode(', ', $context['list_last_24']);
        echo '</p>';
    }



if you have a copy of mod for RC3 i can look into it also to hide it from guests :)
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

steve51184


Joker™

your welcome once again :) .

what u said .. " u love me " :o OMG  ;)
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

steve51184

Quote from: sid2varun on June 05, 2010, 08:51:54 AM
your welcome once again :) .

what u said .. " u love me " :o OMG  ;)

yeah these are a few problem's i've had and you just solved most of them so only a few to go now :)

Joker™

glad that i could help you in some way . you can open new threads for your others problems , someone might be able to solve them as well.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

steve51184

Quote from: sid2varun on June 05, 2010, 09:01:44 AM
glad that i could help you in some way . you can open new threads for your others problems , someone might be able to solve them as well.
already have threads open but no replys after a month :P

Advertisement: