TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,964
  • Latest: stylix
Stats
  • Total Posts: 195,966
  • Total Topics: 21,317
  • Online today: 2,241
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 393
  • Total: 393

Can't prevent guests from viewing news box

Started by DreamSinger, September 06, 2009, 05:56:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DreamSinger

Hi, I asked for help at the smf forum, and they sent me here.

I'm putting together a forum for a group of homeschool girls, and I am trying to make it as private as possible.

I disabled registration. All members will be registered manually by me. I have the smf box unchecked for allowing guests to browse the forum in the basic features section.

In the tiny portal front page section, I have the circle checked "no", for allowing guests to view the news box. However, when I log out, I can still see the news box. Am I overlooking something? Is there any way I can prevent guests from seeing the news box?

Thanks in advance for assistance in this!

Demian
smf 1.1.10/tp v1.0 beta 49.7/Bright Forest Theme
http://www.atagahi.net

IchBin

That is actually an SMF problem. They don't appear to recognize that it is actually the news code in the theme. Open the index.template.php file and find this code:
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<tr>
<td id="nieuws" colspan="2" class="tborder2" height="41">
<span>', $txt[102], '</span>:<br />
', $context['random_news_line'], '
</td>
</tr>';


Change it to this:
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']) && !$context['user']['is_guest'])
echo '
<tr>
<td id="nieuws" colspan="2" class="tborder2" height="41">
<span>', $txt[102], '</span>:<br />
', $context['random_news_line'], '
</td>
</tr>';

DreamSinger


This website is proudly hosted on Crocweb Cloud Website Hosting.