Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Recent Forum Topics Widget - Template Tags Plugin
Avatar
Chris Hustad
Member
Free Members
sp_UserOfflineSmall Offline
Feb 9, 2014 - 7:42 pm

I just updated the SP software and plugins, and we're now seeing a problem with the Recent Forum Topics widget on our sidebar.  It displays the post multiple times, depending on the amount of replies.

http://www.werejustparents.com/ (See Sidebar)

Here is the code we're using (as a text widget ):

[ sp_newest_topics itemorder='T' beforetopic='' ]

Thanks

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 9, 2014 - 10:06 pm

is is the same post??  or the same topic?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 9, 2014 - 10:11 pm

ah sorry... missed the link...  so same topic...  odd, they really are different posts - look at the excerpt from hover...  but the link is topic - surprising, but makes sense by name...

nothing to limit it per topic - and not sure anything changed recently...

will have to research...

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 9, 2014 - 10:29 pm

so maybe you can try a change for me...  in the sp-NewestTopics-tag.php file, find this line:

    $where = (!empty($forumIds)) ? SFPOSTS.'.forum_id IN ('.$forumIds.')' : '1=1';

right after that line, add this code:

    add_filter('sph_post_list_query', 'sp_ttags_list_post_query', 10, 2);
     function sp_ttags_list_post_query($spdb, $x) {
         $spdb->groupby = SFTOPICS.'.topic_id';
         return $spdb;
     }

technically, should have one more line of code changed too though only for fringe cases...  after:

    $spPostList = new spPostList($where, SFTOPICS.'.topic_id DESC', $limit);

add this line:

    remove_filter('sph_post_list_query', 'sp_ttags_list_post_query', 10);

think that will fix it up for you...

Avatar
Chris Hustad
Member
Free Members
sp_UserOfflineSmall Offline
Feb 11, 2014 - 11:07 am

Looks like it did the trick.

Thanks for the help.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 11, 2014 - 11:45 am

Glad we got it  sorted and apologies for the issue - fixed in the next update of course.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17363
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625