News:

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

Main Menu

Recent posts user preference

Started by miseryshining, March 19, 2007, 05:37:32 PM

Previous topic - Next topic

flame baiter

#60
Quote from: S1L1C0N on April 26, 2007, 02:46:51 PM
Quote from: hvyhitter on April 26, 2007, 02:23:00 PM
Quote from: miseryshining on April 24, 2007, 09:46:18 AM
Ha, you guys seem really desperate, i can't let you down. I'll do the following:

-add a user definable option for nr of days to go back (is that a requirement? we could also use pagination, just like the unread posts listing).
-make it only display topics that have replies you haven't seen yet (right?).
-maybe create a template page that looks like the unread posts listing.

no no no no.. unread or READ i dont care.. the issue is I may click NEW and read it quick.. then go.. you know what.. I DO have a reply for that thread later.. and then I cant hit like latest thread listing and find it fast....

I cant believe no one has asked for a Vbulletin style "New posts" Option.. well only a Few have.. about 6 people that I saw in my search..

and the Vbulletin way is NOT the correct description of what new posts is in the vbulletin  world.. its more like

List posts (any READ or UNREAD) in cronological order starting with most recently updated one first.

I want to take this and make a button right next to the New posts button on the header.

i think THAT way of (incorrectly displaying) new posts is more condusive to posting. (From my vbulletin days.)

Plus I also like that after I post.. and hit new posts.. if I am the last person to post in that thread it is STILL listed as the most recent post.. even though i obviously read it all.

Thanks.. I have been going nuts.. my user community has been REALLY patient.. and they love the new board.. i love the way SMF gives me DATA! its awesome.. so.. I dont want to go back.. i just want that ONE piece of functionality back..


WORD FOR WORD EXACTLY WHAT I FEEL. THANK GOD IM NOT ALONE, LETS MAKE IT HAPPEN FINALLY FOLKS!

sorry for my double-post but ZOMG I can't believe my eyes...I *so* second that...100% my thoughts. we switched from phpbb to smf and this is by far (!) the most requested thing on our board....

is this already here and does it work with 1.1.3?

EDIT: okay, wait...

our old phpbb-latest actually showed the last xx threads in which there was a post and not just the newest xx threads...so if an old thread got a reply, it would show up in the latest threads...so does this mod only show the newest xx threads OR the newest xx threads in which there was a new post?

(no matter if read or unread...)

okay, maybe I should make an example coz my English isn't exactly superb...

let's say a board has 5 threads!

A created Today at 10:41:52 AM
B created Yesterday at 08:03:00 PM
C created July 16, 2007, 07:55:47 PM
D created  July 12, 2007, 10:22:03 AM
E created  July 10, 2007, 04:23:26 PM

now, there are new posts in 3 of those threads:

A (newest reply)
B (second newest reply)
E (third newest reply)

then does your mod show

A
B
C
D
E

(just threads sorted by creation date)

or

A
B
E
C
D

(threads sorted by newest replies)

?

in this example it doesn't really matter (coz all of the threads show up in the latest anyway) but remember that on big boards you have thousands of threads and the latest only shows like 50 or something...so if it's option 1, you'd only see the newest threads but not the threads with the newest comments in that list...erm, did anyone get that? oh well...2:50 am, guess I should go to bed!  o.O

miseryshining

Pretty much everything you guys ask for has been added already, so I'm not sure what more to add. Read the mods' description to find out how to make it all work.

The mod provides a list of all the latest threads, unread AND read. It also provides a flexible list of new posts (only unread). If you want a list of only unread threads, you can use the unread posts list that SMF provides.

flame baiter

#62
Okay, so we're using this mod now...

http://www.dachboden-wg.de/portal/index.php?option=com_smf&Itemid=104&action=recenttopics

Problems?

1. The "number of posts to show" setting has no effect
2. It always says "neu" (new) even if it's no new
3. "Only show the last reply of a thread" - what is this for? Nothing changes when it's ticked/unticked

Other than that, this is great...thanks tons!

Benson

Great mod - is there any chance to only have the new-symbol only for topics which are really unread?

flame baiter

Any way to make this show up all polls in a list? That would be great!


JaGuR123

#66
Hi miseryshining,

Is it possible to ask for an addition to this recentposts mod.

I would love to be able to list recent posts by user id, there is the SMF version that does the Posts , but i just want the thread title , not the whole post.

I am already loving your MOD, you can see it in action at www.racehorsetalk.com.au

franklinrony

can anyone helpme please, rhe mod install fine, i see in the panel th eoption to select the board to monitor, i check some boards, but when clic in  show recent topics all boards are show, need edit some file more
http://twitter.com/franklinrony

Entra y aprende a ser un webmaster
www.sv-blog.com
--Si pides ayuda al menos agradece el soporte recibido----

miseryshining

#68
sorry for the lack of replies, somehow the notifications didn't reach my inbox. I will get back to the support request the coming week.

Quote from: frony on September 11, 2007, 02:12:01 PM
can anyone helpme please, rhe mod install fine, i see in the panel th eoption to select the board to monitor, i check some boards, but when clic in  show recent topics all boards are show, need edit some file more

what version of SMF are you using?

Did anyone test the mod with version 1.1.4? Encountered any problems?

miseryshining

#69
Quote from: flame baiter on July 24, 2007, 06:03:53 AM
Okay, so we're using this mod now...

http://www.dachboden-wg.de/portal/index.php?option=com_smf&Itemid=104&action=recenttopics

Problems?

1. The "number of posts to show" setting has no effect
2. It always says "neu" (new) even if it's no new
3. "Only show the last reply of a thread" - what is this for? Nothing changes when it's ticked/unticked

Other than that, this is great...thanks tons!
2 should work for logged on users.
1 and 3 are only used for the ssi_recentPostsPref(), not for the recenttopics listing. I'll see if I can make this more obvious.
Quote from: flame baiter on August 03, 2007, 07:37:48 AM
Any way to make this show up all polls in a list? That would be great!
That would be quite a different feature, not something that fits in this mod well.
Quote from: guyverschuere on August 04, 2007, 01:58:36 AMWhy does http://forum.cindyenguy.be/index.php?action=recenttopics;count=50;limit=1;all shows last 50 post instead of last day?And http://forum.cindyenguy.be/index.php?action=recenttopics;count=50 shows only 25 topics?Thanks
this is fixed in version 2.2
Quote from: JaGuR123 on August 19, 2007, 07:32:09 PMHi miseryshining,Is it possible to ask for an addition to this recentposts mod.I would love to be able to list recent posts by user id, there is the SMF version that does the Posts , but i just want the thread title , not the whole post.I am already loving your MOD, you can see it in action at www.racehorsetalk.com.au
i attached a package that makes it possible, but only by including the following code in one of the template files (you can also create a new template file off course and include it in that). This will display recent posts by the user that is logged onglobal $context;require_once("SSI.php");ssi_recentPosts($context['user']['recentPosts']['nrofPosts'], null, 'echo', null, $context['user']['id']);

miseryshining

New in 2.2: 
you can configure whether the extra options for recent post blocks are shown in the profile. Look under "Features and Options => user preferences. These options are useless if you only use the recenttopics list. 

Another new feature is the possibility to list recent posts by a single member (without the body), for example like this: 
global $context;
require_once("SSI.php");
ssi_recentPosts($context['user']['recentPosts']['nrofPosts'], null, 'echo', null, $context['user']['id']);

You can include that in any template file (or create a new page/template). 


JaGuR123

Thanks Miseryshining , will have a look at it after golf this morning

JaGuR123

Having some trouble manually installing this MS , i am up to the SSI.php and in searching for this line
AND b.ID_BOARD NOT IN (" . implode(', ', $exclude_boards) . ")") . "
there is no line but there is 3 of these
AND b.ID_BOARD NOT IN (" . implode(', ', $exclude_boards) . ")") . (!empty($include_boards) ? "
and if i replace it with
AND b.ID_BOARD IN (" . implode(',AND b.ID_BOARD NOT IN (" . implode(', ', $exclude_boards) . ")") . (!empty($include_boards) ? " ', $include_boards) . ")"  : '') . (isset($_REQUEST['limit']) && is_numeric($_REQUEST['limit']) ? "
   AND m.posterTime > " . (time() - ($_REQUEST['limit']*24*60*60)) : '') . (!empty($member_id) ? "
   AND m.ID_MEMBER = {$member_id}" : '') . "

I get an error, i was using 2.1 i think, and some of the stuff i needed to replace was already in the old version
Any help appreciated

miseryshining

Quote from: JaGuR123 on October 12, 2007, 03:54:47 AM
Having some trouble manually installing this MS , i am up to the SSI.php and in searching for this line
AND b.ID_BOARD NOT IN (" . implode(', ', $exclude_boards) . ")") . "
there is no line but there is 3 of these
AND b.ID_BOARD NOT IN (" . implode(', ', $exclude_boards) . ")") . (!empty($include_boards) ? "
and if i replace it with
AND b.ID_BOARD IN (" . implode(',AND b.ID_BOARD NOT IN (" . implode(', ', $exclude_boards) . ")") . (!empty($include_boards) ? " ', $include_boards) . ")"  : '') . (isset($_REQUEST['limit']) && is_numeric($_REQUEST['limit']) ? "
   AND m.posterTime > " . (time() - ($_REQUEST['limit']*24*60*60)) : '') . (!empty($member_id) ? "
   AND m.ID_MEMBER = {$member_id}" : '') . "

I get an error, i was using 2.1 i think, and some of the stuff i needed to replace was already in the old version
Any help appreciated

I'd advise against doing stuff manually unless you really know what you're doing. It's very easy to defect your SMF installation with mods that are not properly deinstalled. That said, you could try to replace the whole query with

// Find all the posts.  Newer ones will have higher IDs.
$request = db_query("
SELECT
m.posterTime, m.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, m.ID_BOARD, b.name AS bName,
IFNULL(mem.realName, m.posterName) AS posterName, " . ($user_info['is_guest'] ? '1 AS isRead, 0 AS new_from' : '
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) >= m.ID_MSG_MODIFIED AS isRead,
IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ", LEFT(m.body, 384) AS body, m.smileysEnabled
FROM ({$db_prefix}messages AS m, {$db_prefix}boards AS b)
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? "
LEFT JOIN {$db_prefix}log_topics AS lt ON (lt.ID_TOPIC = m.ID_TOPIC AND lt.ID_MEMBER = $ID_MEMBER)
LEFT JOIN {$db_prefix}log_mark_read AS lmr ON (lmr.ID_BOARD = m.ID_BOARD AND lmr.ID_MEMBER = $ID_MEMBER)" : '') . "
WHERE m.ID_MSG >= " . ($modSettings['maxMsgID'] - 25 * min($num_recent, 5)) . "
AND b.ID_BOARD = m.ID_BOARD" . (empty($exclude_boards) ? '' : "
AND b.ID_BOARD NOT IN (" . implode(', ', $exclude_boards) . ")") . (!empty($include_boards) ? "
AND b.ID_BOARD IN (" . implode(', ', $include_boards) . ")"  : '') . (isset($_REQUEST['limit']) && is_numeric($_REQUEST['limit']) ? "
AND m.posterTime > " . (time() - ($_REQUEST['limit']*24*60*60)) : '') . (!empty($member_id) ? "
AND m.ID_MEMBER = {$member_id}" : '') . "
AND $user_info[query_see_board]
ORDER BY m.ID_MSG DESC
LIMIT $num_recent", __FILE__, __LINE__);


In case you made other changes to the query, this won't work obviously.

miseryshining

#74
count is not supported anymore for the recent topics list. Forpagination, it will now use the value from "Posts and Topics ->Topic Settings => Number of topics per page in the message index:"

example
http://www.yourforum.com/index.php?action=recenttopics;boards=2,4;limit=1
(will show a list of recent topics from boards 2 and 4, limited to the last day)

supported filters:
boards=all; (all boards, overrides user preference)
boards=2,4; (board filter, overrides user preference)
limit=3; (days)
start=20; (pagination)
sort=starter;
desc (sorting)

configuration

[forum users]
"edit profile -> Recent posts preferences"
  • setup which boards to monitor
  • choose between showing all recent posts or only the last one in atopic (this is only applied to recent post blocks and can be disabledby admins)
  • choose how many posts to display in a block (same as above)
[admins]
"features and options -> user preferences"
  • enable extra user settings for users admins can change
instructions to setup a recent posts/topics block

Example: Insert the following code where you want to display the block


require_once('SSI.php');
if (function_exists('ssi_recentPostsPref')) ssi_recentPostsPref();


parameters

ssi_recentPostsPref( int $nrofPosts, string $boards, string $returnMode, int $mode, int $member_id )

$nrofPosts:     
  • override user preference,
  • default: null
$boards:           
  • override board selection
  • possible values: board numbers seperated by commas
  • default: null
$returnMode:
  • how the list is returned
  • possible values:       
  • 'echo' (print the result on the page)
  • 'extended' (print adetailed list of recent topics, ala vBulletin)
  • [anything else] (return an array with post/topic info)
  • default: 'echo'
  • peculiarities:  applies only for recent topics, for recent posts, it will fallback to 'echo' mode
$mode:           
  • override posts/topics mode
  • possible values:
  • 1 (show all posts)
  • 2 (show topics)
  • default: 1                     
$member_id   
  • show only posts by one member
  • default: null

JaGuR123

#75
Quote from: miseryshining on October 12, 2007, 04:04:17 AM
I 'd advise against doing stuff manually unless you really know what you 're doing. It 's very easy to defect your SMF installation with mods that are not properly deinstalled. That said, you could try to replace the whole query with

I am running a customized custom theme and the only way i can install most mods is to do them manually.

I figured out my problem , and i feel quite silly ... your latest mod is installing from a fresh install and because i had the last version of this mod already installed when i was searching for the code to change of course it was different because it had all ready been changed from the previous installation  :(

Some other quick questions MS is it possible to display more then 50 latest recentTopics mine only seems to be showing around 30 , also with the lastest mod are there any extra options the user or admin can change as it can 't see any.

Cheers and thanks again for a great mod

miseryshining

#76
Quote from: JaGuR123 on October 12, 2007, 08:22:24 PM
Quote from: miseryshining on October 12, 2007, 04:04:17 AM
I 'd advise against doing stuff manually unless you really know what you 're doing. It 's very easy to defect your SMF installation with mods that are not properly deinstalled. That said, you could try to replace the whole query with

I am running a customized custom theme and the only way i can install most mods is to do them manually.

I figured out my problem , and i feel quite silly ... your latest mod is installing from a fresh install and because i had the last version of this mod already installed when i was searching for the code to change of course it was different because it had all ready been changed from the previous installation  :(

Some other quick questions MS is it possible to display more then 50 latest recentTopics mine only seems to be showing around 30 , also with the lastest mod are there any extra options the user or admin can change as it can 't see any.

Cheers and thanks again for a great mod

try in the admin panel: "Posts and Topics -> Topic Settings => Number of topics per page in the message index:". Shouldn't limit you to a max value as far as I know.

btw, seems the SMF credits at the bottom of your site disappear in the background, you should fix that  :)

JaGuR123

Quote from: miseryshining on October 12, 2007, 09:52:54 PM
try in the admin panel: "Posts and Topics -> Topic Settings => Number of topics per page in the message index:". Shouldn't limit you to a max value as far as I know.

Yes i have done that, seems that it has something to do with how long the recentTopics stay recent, is there a way of making them display for longer , it seems it is only showing up 33 recent topics, but i would prefer it to be 50 to 100  :( ?


Quote from: miseryshining on October 12, 2007, 09:52:54 PM
btw, seems the SMF credits at the bottom of your site disappear in the background, you should fix that  :)

Yes i am in the processes of changing my colour scheme/s to someting that looks good (still working on it) , and it now blends into the background , i will fix it asap ;)

ES23

Hi!

I'm running SMF 1.1.4 and wish to install yr recent posts user preference 2.3 ...

But I've got a test unsuccessful for Recent.template.php

Tried manual install for that file but the part where


<a href="', $scripturl, '?action=unread',


needs to be replaced by

<a href="', $scripturl, '?action=', $_REQUEST['action'],

I realised that there is a few "<a href="', $scripturl, '?action=unread'," in my Recent.template.php file.Am I supposed to do the above modification for all "<a href="', $scripturl, '?action=unread', " that I see?

Attached to this post is my Recent.template.php file. Please advise :) Thanks.

miseryshining

#79
Quote from: JaGuR123 on October 12, 2007, 10:30:03 PM
Quote from: miseryshining on October 12, 2007, 09:52:54 PM
try in the admin panel: "Posts and Topics -> Topic Settings => Number of topics per page in the message index:". Shouldn't limit you to a max value as far as I know.

Yes i have done that, seems that it has something to do with how long the recentTopics stay recent, is there a way of making them display for longer , it seems it is only showing up 33 recent topics, but i would prefer it to be 50 to 100  :( ?

That's hard to accomplish since we are displaying recent threads here. If, for instance, only 10 threads on your board are active at the same time, and those threads all have 15 new posts, it will only display those 10 threads, and a few others. currently the query will only check the last 175 posts (for performance reasons).

You can up that number in SSI.php. look for the following code and change 5 to something higher (don't go too high though).
min($num_recent, 5)

Quote from: ES23 on October 13, 2007, 06:45:42 AM
Hi!

I'm running SMF 1.1.4 and wish to install yr recent posts user preference 2.3 ...

But I've got a test unsuccessful for Recent.template.php

Tried manual install for that file but the part where


<a href="', $scripturl, '?action=unread',


needs to be replaced by

<a href="', $scripturl, '?action=', $_REQUEST['action'],

I realised that there is a few "<a href="', $scripturl, '?action=unread'," in my Recent.template.php file.Am I supposed to do the above modification for all "<a href="', $scripturl, '?action=unread', " that I see?

Attached to this post is my Recent.template.php file. Please advise :) Thanks.

Hi, you need to replace all 5 of them, yes.

Advertisement: