News:

Wondering if this will always be free?  See why free is better.

Main Menu

View the most recent posts on the forum.

Started by midkin, December 22, 2009, 06:49:46 AM

Previous topic - Next topic

midkin

Hello there. I would like to disable/hide the "View the most recent posts on the forum.".
My forum is in greek and it says. View the last 10 posts.

I don't care if my users can see those last posts. But i do care that my visitors(non register members) can!

So i want to ether disable this function or just hide it from visitors. Is this possible?

Thanks in advance!


Kays

Hi, sorry about the delay

In the Admin CP > Current Theme > Number of recent posts to display on board index:

Set that to 0 to disable it.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

midkin

This is not what i mean.

What i want to do is hide the "View the most recent posts on the forum." that is on the forum stats, or even disable all forum stats.

Can i do this?

Hassan_the best

You can remove the "View the most recent posts" from index.template.php and if you want them to be removed from the forum stats then boardindex.template.php is the file for it..

midkin

Could you tell me what exactly should i do?

Hassan_the best

I am not understanding you correctly.If you want this

to remove then you can do by
Quote from: Kays on December 23, 2009, 11:18:09 AM
Hi, sorry about the delay

In the Admin CP > Current Theme > Number of recent posts to display on board index:

Set that to 0 to disable it.
If this is not, please specify correctly what you want...

Kays

Quote from: midkin on December 24, 2009, 05:09:11 AM
This is not what i mean.

What i want to do is hide the "View the most recent posts on the forum." that is on the forum stats, or even disable all forum stats.

Can i do this?


Can you post a screenshot of what you wish to remove?

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

hyena

I would like 2 disable the same thing--- "View the most recent posts on the forum"



Thanks

Kays

To remove just the "View the most recent posts on the forum." link in that spot. In BoardIndex.php of the theme you are using, Look for:


<span class="middletext">
', $context['common_stats']['total_posts'], ' ', $txt[95], ' ', $txt['smf88'], ' ', $context['common_stats']['total_topics'], ' ', $txt[64], ' ', $txt[525], ' ', $context['common_stats']['total_members'], ' ', $txt[19], '. ', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
<br /> ' . $txt[659] . ': <b>&quot;' . $context['latest_post']['link'] . '&quot;</b>  ( ' . $context['latest_post']['time'] . ' )<br />
<a href="', $scripturl, '?action=recent">', $txt[234], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</span>


And replace it with:


<span class="middletext">
', $context['common_stats']['total_posts'], ' ', $txt[95], ' ', $txt['smf88'], ' ', $context['common_stats']['total_topics'], ' ', $txt[64], ' ', $txt[525], ' ', $context['common_stats']['total_members'], ' ', $txt[19], '. ', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
<br /> ' . $txt[659] . ': <b>&quot;' . $context['latest_post']['link'] . '&quot;</b>  ( ' . $context['latest_post']['time'] . ' )
', $context['show_stats'] ? '<br /><a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</span>


@ midkin

Is this what you wish to remove?




If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

midkin

#10
@Kays Thanks! This is what i wanted to remove!!!

Thanks.

Kays


If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

hyena

Quote from: Kays on December 25, 2009, 10:37:38 PM
To remove just the "View the most recent posts on the forum." link in that spot. In BoardIndex.php of the theme you are using, Look for:


<span class="middletext">
', $context['common_stats']['total_posts'], ' ', $txt[95], ' ', $txt['smf88'], ' ', $context['common_stats']['total_topics'], ' ', $txt[64], ' ', $txt[525], ' ', $context['common_stats']['total_members'], ' ', $txt[19], '. ', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
<br /> ' . $txt[659] . ': <b>&quot;' . $context['latest_post']['link'] . '&quot;</b>  ( ' . $context['latest_post']['time'] . ' )<br />
<a href="', $scripturl, '?action=recent">', $txt[234], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</span>


And replace it with:


<span class="middletext">
', $context['common_stats']['total_posts'], ' ', $txt[95], ' ', $txt['smf88'], ' ', $context['common_stats']['total_topics'], ' ', $txt[64], ' ', $txt[525], ' ', $context['common_stats']['total_members'], ' ', $txt[19], '. ', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
<br /> ' . $txt[659] . ': <b>&quot;' . $context['latest_post']['link'] . '&quot;</b>  ( ' . $context['latest_post']['time'] . ' )
', $context['show_stats'] ? '<br /><a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</span>


@ midkin

Is this what you wish to remove?

Sorry but I'm a dummy I can't find any of the above

This is what I find

<span class="middletext">';

   // If the user is logged in, display stuff like their name, new messages, etc.
   if ($context['user']['is_logged'])
   {
      echo '
                        <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
                        <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';

   }
   // Otherwise they're a guest - send them a lovely greeting...
   else
      echo $txt['welcome_guest'];

   // Now, onto our second set of info, are they logged in again?
   if ($context['user']['is_logged'])
   {
      // Is the forum in maintenance mode?
      if ($context['in_maintenance'] && $context['user']['is_admin'])
         echo '
                        <b>', $txt[616], '</b><br />';

      // Are there any members waiting for approval?
      if (!empty($context['unapproved_members']))
         echo '
                        ', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '<br />';

      // Show the total time logged in?
      if (!empty($context['user']['total_time_logged_in']))
      {
         echo '
                        ', $txt['totalTimeLogged1'];

         // If days is just zero, don't bother to show it.
         if ($context['user']['total_time_logged_in']['days'] > 0)
            echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];

         // Same with hours - only show it if it's above zero.
         if ($context['user']['total_time_logged_in']['hours'] > 0)
            echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];

         // But, let's always show minutes - Time wasted here: 0 minutes ;).
         echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '<br />';
      }
      echo '            </span>';
   }
   // Otherwise they're a guest - this time ask them to either register or login - lazy bums...
   else
   {
      echo '            </span>
                        <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/sha1.js"></script>

                        <form action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" class="middletext" style="margin: 3px 1ex 1px 0;"', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
                           <input type="text" name="user" size="10" /> <input type="password" name="passwrd" size="10" />
                           <select name="cookielength">
                              <option value="60">', $txt['smf53'], '</option>
                              <option value="1440">', $txt['smf47'], '</option>
                              <option value="10080">', $txt['smf48'], '</option>
                              <option value="43200">', $txt['smf49'], '</option>
                              <option value="-1" selected="selected">', $txt['smf50'], '</option>
                           </select>
                           <input type="submit" value="', $txt[34], '" /><br />
                           <span class="middletext">', $txt['smf52'], '</span>
                           <input type="hidden" name="hash_passwrd" value="" />
                        </form>';
   }

Thanks for your help

Kays

Look in BoardIndex.template.php. That looks like index.template.php.

Search for $txt[659]

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Satfreak

I have SMF 2.0 RC2 and also cant find that lines,this is my

Boardindex.php,please can you find that lines and replace,

Regards,..

Kays

What I had posted there was for 1.1 since that's what the template looked like. For 2.0 look for:


<p>
', $context['common_stats']['total_posts'], ' ', $txt['posts_made'], ' ', $txt['in'], ' ', $context['common_stats']['total_topics'], ' ', $txt['topics'], ' ', $txt['by'], ' ', $context['common_stats']['total_members'], ' ', $txt['members'], '. ', !empty($settings['show_latest_member']) ? $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br />
', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>&quot;' . $context['latest_post']['link'] . '&quot;</strong>  ( ' . $context['latest_post']['time'] . ' )<br />' : ''), '
<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['more_stats'] . '</a>' : '', '
</p>';


And replace it with


<p>
', $context['common_stats']['total_posts'], ' ', $txt['posts_made'], ' ', $txt['in'], ' ', $context['common_stats']['total_topics'], ' ', $txt['topics'], ' ', $txt['by'], ' ', $context['common_stats']['total_members'], ' ', $txt['members'], '. ', !empty($settings['show_latest_member']) ? $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br />
', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>&quot;' . $context['latest_post']['link'] . '&quot;</strong>  ( ' . $context['latest_post']['time'] . ' )<br />' : ''), '
', $context['show_stats'] ? '<br /><a href="' . $scripturl . '?action=stats">' . $txt['more_stats'] . '</a>' : '', '
</p>';


Satfreak, I've made the change to your copy.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Satfreak


Kays


If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Forum Guy

Probably a very good idea to have a check-box option for this in the admin CP  section guest permissions

I too find that especially guests, by default, should NOT be able to see recent posts listed (or any stats)

bluidkiti

Quote from: Forum Guy on February 04, 2010, 02:16:50 AM
Probably a very good idea to have a check-box option for this in the admin CP  section guest permissions

I too find that especially guests, by default, should NOT be able to see recent posts listed (or any stats)

I think so also.  Great idea!

Forum Guy

just skimmed the code for disabling it in RC3 and there is an easy way - just uncheck Show statistics on board index: in Current Theme and it is gone for good.

RVD

Quote from: Forum Guy on February 04, 2010, 02:16:50 AM
Probably a very good idea to have a check-box option for this in the admin CP  section guest permissions

I too find that especially guests, by default, should NOT be able to see recent posts listed (or any stats)
Quote from: bluidkiti on April 09, 2010, 06:33:56 PM
Quote from: Forum Guy on February 04, 2010, 02:16:50 AM
Probably a very good idea to have a check-box option for this in the admin CP  section guest permissions

I too find that especially guests, by default, should NOT be able to see recent posts listed (or any stats)

I think so also.  Great idea!

I know this is an old topic and I apologize. But I would really like to be able to shut off "view most recent posts on the forum" for guests.

Can anyone help?
Thank you for your time.  :)

RVD

I just noticed this was for version 2. I found this topic in a google search, anyone know how to do this in 1.11?

Thank you.

Kays


If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

RVD

I would really like to be able to shut off "view most recent posts on the forum" for guests.

Can anyone help?

Thank you!


Advertisement: