collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 828
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Installation errors? Mod incompatibilities? Upgrade problems? Make your way over to the Install and Upgrade Support board for all your solutions!

Author Topic: Recent Posts and Topics in Simpleportal  (Read 5460 times)

0 Members and 1 Guest are viewing this topic.

Offline infostrides

  • Semi Newbie
  • *
  • Posts: 27
    • TheInfoStrides.com
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Recent Posts and Topics in Simpleportal
« on: October 25, 2011, 10:22:50 AM »
Hello, I will like to change the display period of Recent Posts and Topics in Simpleportal homepage.

I have used Recent Posts/Topics in my forum home (http://www.theinfostrides.com) and observed that the posts disappear after 48 hours. Is it possible to change the period?

Thank you.
« Last Edit: November 01, 2011, 03:30:33 PM by infostrides »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Recent Posts and Topics in Simpleportal
« Reply #1 on: October 25, 2011, 12:56:29 PM »
Actually, posts disappear from recent activity after a certain number of posts have been added to the database.
The "recent" function only looks back so many posts. This is to prvent it from checcking the ENTIRE database, all the way back to the beginning.You can see this in SSI.php. Look for the lines that include "35" in them.
Then increase that 35 to something larger, like maybe 100. that should normally be plenty.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline infostrides

  • Semi Newbie
  • *
  • Posts: 27
    • TheInfoStrides.com
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Recent Posts and Topics in Simpleportal
« Reply #2 on: October 26, 2011, 12:44:01 AM »
Thank you. I made the change and will be observing it.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Recent Posts and Topics in Simpleportal
« Reply #3 on: October 27, 2011, 02:37:54 PM »
Did that solve your problem?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline infostrides

  • Semi Newbie
  • *
  • Posts: 27
    • TheInfoStrides.com
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Recent Posts and Topics in Simpleportal
« Reply #4 on: November 01, 2011, 03:29:16 PM »
Did that solve your problem?

Thanks. It worked. What is the implication if the value is increased above 100?
« Last Edit: November 01, 2011, 03:43:12 PM by infostrides »

Offline Eliana Tamerin

  • Comrade
  • *
  • Posts: 2889
  • Gender: Female
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: Recent Posts and Topics in Simpleportal
« Reply #5 on: November 01, 2011, 04:17:33 PM »
The higher the value, the more posts the database will search through. On big forums, this can bog down the server, and it can even happen on shared hosting when lots of databases are running in a high-stress environment. However, if you have a small forum on a healthy server with a sparse population...you shouldn't need to worry.
Ms. Eliana TamerinIt should be painfully obvious by now that I don't respond to support PMs. Don't send me PMs for support. They will be ignored and deleted, post on the Support Boards to get support.

Offline infostrides

  • Semi Newbie
  • *
  • Posts: 27
    • TheInfoStrides.com
  • SMF Version: 2 RC5
  • SP Version: 2.3.3
Re: Recent Posts and Topics in Simpleportal
« Reply #6 on: November 06, 2011, 05:20:15 AM »
The higher the value, the more posts the database will search through. On big forums, this can bog down the server, and it can even happen on shared hosting when lots of databases are running in a high-stress environment. However, if you have a small forum on a healthy server with a sparse population...you shouldn't need to worry.

Thank you.

Offline albertng

  • Semi Newbie
  • *
  • Posts: 6
  • SMF Version: 2.0.1
  • SP Version: 2.3.3
Re: Recent Posts and Topics in Simpleportal
« Reply #7 on: December 07, 2011, 08:40:47 PM »
Thank you. I made the change and will be observing it.

dear Angelinabelle and all experts:

I have faced the same problem.
could you kindly elaborate further the codes that need to increase from 35 to 100? and explain the code a little bit as I am a newbie.
TQ so much.
« Last Edit: December 09, 2011, 08:34:17 PM by albertng »

Offline albertng

  • Semi Newbie
  • *
  • Posts: 6
  • SMF Version: 2.0.1
  • SP Version: 2.3.3
Re: Recent Posts and Topics in Simpleportal
« Reply #8 on: December 07, 2011, 09:45:24 PM »
part of the codes and what we need to do to lengthen the period of recent posts:

Could it be modified to be based on certain number of APPROVED posts rather than after certain number of postings....TQ for your expert help.

~~~~~~~~~~~~~~~~~~~~

/ Recent post list:   [board] Subject by Poster   Date
function ssi_recentPosts($num_recent = 8, $exclude_boards = null, $include_boards = null, $output_method = 'echo', $limit_body = true)
{
   global $context, $settings, $scripturl, $txt, $db_prefix, $user_info;
   global $modSettings, $smcFunc;

   // Excluding certain boards...
   if ($exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)
      $exclude_boards = array($modSettings['recycle_board']);
   else
      $exclude_boards = empty($exclude_boards) ? array() : (is_array($exclude_boards) ? $exclude_boards : array($exclude_boards));

   // What about including certain boards - note we do some protection here as pre-2.0 didn't have this parameter.
   if (is_array($include_boards) || (int) $include_boards === $include_boards)
   {
      $include_boards = is_array($include_boards) ? $include_boards : array($include_boards);
   }
   elseif ($include_boards != null)
   {
      $include_boards = array();
   }

   // Let's restrict the query boys (and girls)
   $query_where = '
      m.id_msg >= {int:min_message_id}
      ' . (empty($exclude_boards) ? '' : '
      AND b.id_board NOT IN ({array_int:exclude_boards})') . '
      ' . ($include_boards === null ? '' : '
      AND b.id_board IN ({array_int:include_boards})') . '
      AND {query_wanna_see_board}' . ($modSettings['postmod_active'] ? '
      AND m.approved = {int:is_approved}' : '');

   $query_where_params = array(
      'is_approved' => 1,
      'include_boards' => $include_boards === null ? '' : $include_boards,
      'exclude_boards' => empty($exclude_boards) ? '' : $exclude_boards,
      'min_message_id' => $modSettings['maxMsgID'] - 25 * min($num_recent, 5),
   );

   // Past to this simpleton of a function...
   return ssi_queryPosts($query_where, $query_where_params, $num_recent, 'm.id_msg DESC', $output_method, $limit_body);
}


« Last Edit: December 09, 2011, 08:33:24 PM by albertng »

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: Recent Posts and Topics in Simpleportal
« Reply #9 on: December 09, 2011, 03:36:42 AM »
What are you asking?

Offline albertng

  • Semi Newbie
  • *
  • Posts: 6
  • SMF Version: 2.0.1
  • SP Version: 2.3.3
Re: Recent Posts and Topics in Simpleportal
« Reply #10 on: December 09, 2011, 08:40:46 PM »
“Actually, posts disappear from recent activity after a certain number of posts have been added to the database. The "recent" function only looks back so many posts………”

My question is how could the codes  be modified to after certain number of APPROVED posts rather than after certain number of posts as it is now....TQ for your expert help.
« Last Edit: December 09, 2011, 08:50:46 PM by albertng »

Offline albertng

  • Semi Newbie
  • *
  • Posts: 6
  • SMF Version: 2.0.1
  • SP Version: 2.3.3
Recent Posts based on certain number of approved posts...
« Reply #11 on: December 11, 2011, 07:58:55 PM »
Could anybody help with my problems as above. This would be useful for many users of simple portal too...

TQ so much.

Albert Ng

Offline albertng

  • Semi Newbie
  • *
  • Posts: 6
  • SMF Version: 2.0.1
  • SP Version: 2.3.3
Re: Recent Posts and Topics in Simpleportal
« Reply #12 on: December 17, 2011, 08:14:56 PM »
“Actually, posts disappear from recent activity after a certain number of posts have been added to the database. The "recent" function only looks back so many posts………”

My question is how could the codes  be modified to after certain number of APPROVED posts rather than after certain number of posts as it is now....TQ for your expert help.

Could any expert help with the problem stated above? TQ.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Recent Posts and Topics in Simpleportal
« Reply #13 on: January 06, 2012, 02:13:12 PM »
I see the number 25 in your ssi.php.

Replace the 25 to 100.

That will show more posts.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?