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
Most recent topics with unread posts excluding a forum...
Avatar
Carlos
Spain
Member
Free Members
sp_UserOfflineSmall Offline
Sep 17, 2013 - 5:29 pm

Hi! what i need is to exclude a forum from the " most recent topics with unread posts" I know that is possible but read the codex and not sure of what to do and on what files... please can anyone bring me some help? 

 

The forum id that i want to exclude is the 2173

 

thanks in advance

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 17, 2013 - 8:36 pm

are you talking about the sp_RecentPostsTag() template function in the template tags plugin??

per the codex, there is not an exclude... instead you have to use the forumIds argument and pass the forum ids that you do want to show...

there is an open ticket to add an exclusion, but not ETA...

Avatar
Carlos
Spain
Member
Free Members
sp_UserOfflineSmall Offline
Sep 18, 2013 - 12:03 am

Thanks, is great to hear that! 

I´m reffering to this button!Sinulo.jpgImage Enlarger

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 18, 2013 - 1:10 am

oh, sorry didnt catch you were talking about that...

but why would you want to exclude a forum from there?  what's the use case?  maybe I am just missing it...  you only see forums that you have permission to view already...

so afraid no easy option type way to exclude a forum from that list..  frankly, its never been asked for before...

but a couple of ways it can be done:

o  use the filters for the list topic class to exclude the forum you want to

o  edit your sp theme, the spNewPostsView.php template file... find this statement:

            $spListView = new spTopicList($spThisUser->newposts['topics'], $count, $group, '', $first);

and change it...  the fourth argument, currently '', and change it to a comma separated list of the forum ids  you WANT in the posts... no way to exclude, list the ones you want...

Avatar
Carlos
Spain
Member
Free Members
sp_UserOfflineSmall Offline
Sep 18, 2013 - 1:39 am

Hi! First of all thanks for helping me and my english :)

 

i tried it... but doesn´t worked for me...

 

this is what i wrote

$spListView = new spTopicList($spThisUser->newposts['topics'], 0, $group,1,2169,2188,2271,2206,2211,2217,2220,2224,2228,2,2186,2182,2184,2230, $first);
sp_load_template('spListView.php');

 

what is going wrong? 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 18, 2013 - 3:25 am

Carlos,

the comma separated forum ids need to be a string...  so

$spListView = new spTopicList($spThisUser->newposts['topics'], 0, $group, '1,2169,2188,2271,2206,2211,2217,2220,2224,2228,2,2186,2182,2184,2230', $first);
 

Avatar
Carlos
Spain
Member
Free Members
sp_UserOfflineSmall Offline
Sep 18, 2013 - 5:44 am

Hi... i have been testing and doesn´t work for me... :(  

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 18, 2013 - 6:21 am

Are they really genuine forum IDs? That means you have created over 2000 forums? Is that literally correct?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Carlos
Spain
Member
Free Members
sp_UserOfflineSmall Offline
Sep 18, 2013 - 6:28 am

I imported from BbPress so... maybe that is the reason of those high numbers... 

 

take a look here:

dsgsdg.jpgImage Enlarger

 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Sep 18, 2013 - 7:14 am

Ah yes - that would explain it.

When you say it doesn't work what, exactly, does that mean please? And also - it would be interesting to understand why you need to do this as Steve (Mr papa) asked from the start. If it is just a matter of access by certain users then this should be taken care of through the user groups and permissions which is a much better way of doing this as it then applies to every view.

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: 620
Members: 17367
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626