hey guys hi hello ..
tell me How Can I Disable The Recent Posts Option Appears on the bottom of the index page :( i am using a mod for guests cannot read the thread contents but if any guest click on recent topics so he/she can view everything :(
PLEASE TELL ME HOW DO I DISABLE IT
Admin -> Features and Options -> Recent posts to display
Set to "0"
admin cpanel >> current theme>>Number of recent posts to display on board index:
set it to zero and save.
no i want to disable this option >> View the most recent posts on the forum.
the option you guys saying is already set on 0 but i want to disable View the most recent posts on the forum.
this option is shown in forum stats
.in Themes/{your_theme}/BoardIndex.template.php
You can either make it just for the admins visible
<a href="', $scripturl, '?action=recent">', $txt[234], '</a>
<a href="', $scripturl, '?action=recent">', $context['user']['is_admin'] ? ''. $txt[234]. '' : '' ,'</a>
or remove it completely
<a href="', $scripturl, '?action=recent">', $txt[234], '</a>
hey thanks for your info i have done it the option is gone now but if anyone is hitting a direct url to recent posts then its showing now too :( how do i disable it for guests
./Sources/Recent.php
?>
is_not_guest();
?>
hey thanks a lot and i have replaced boardIndex.Template with the default one the option is now showing to guests but if anyone clicking on this then it asking for login :)
Thanks Thanks Thanks
Thanks, this has helped me also.
Hi a member just pointed this out to me and i have boards on the forums that are protected.
Like VIP boards and what not.
By clicking the little recent posts button at the bottom or searching in google lets say
YOURWEBSITESNAME, the name of a member, Recent Posts
Type that in google and you will see cached pages of them boards u didn't want people to see.
Now I dunno much about the software in SMF so I was searching all over to close this loop as fast as I could.
I basically found in "Recent.php"
// Get all the most recent posts.
and replaced it with
// Get all the most recent posts.
if ($user_info['is_admin'])
Now this shown the page numbers to anyone else but did not reveal the recent posts.
So thats a huge bonus
also adding the
is_not_guest();
Can anyone advise me of a propper way of doing this. Or is this method O.K.
Its basically stopped anyone other than admin vieweing recent posts just displays the page number 1 to 10
I have enabled it for multiple member groups to view this because i have mods that are o.k. to view any post in the forums.
So mayaswell give them the option to use recent posts.
if (in_array(10, $user_info['groups']) || in_array(15, $user_info['groups']) || in_array(18, $user_info['groups']) || in_array(20, $user_info['groups']) || in_array(22, $user_info['groups']) || $user_info['is_admin'])
Thanks.
Also I know this is in the 1x forum but I'm using SMF 2.0 RC2
Quote from: Kermit on June 11, 2009, 07:09:12 AM
./Sources/Recent.php
?>
is_not_guest();
?>
This is fantastic - thanks, exactly what I need to try to encourage my very many guests to login (it worked on 2.0.15 too, and the same logic can be used with the search facility).