Support Forum

exclude a forum from recents topics

CA Carlos
Carlos
Member

Hi! is there any chance to exclude a forum form recents topics ?

I want to leave out of the topics from a forum… any way to do it?

15 Answers

New Answer

MP Mr Papa
Mr Papa
Member

you didnt say if you were using a template tag or the widget… but both can do it…

here is the codex for the template tag:  http://codex.simple-press.com/codex/plugins/our-plugins/the-template-tags-plugin/template-tag-recent-posts/

just pass the the list of forum ids you want to include…  the widget has the options in the widget box…

CA Carlos
Carlos
Member

Mr Papa i want to take them off from the template tag… 

 

My idea would be to create a custom page only for recents topics excluding those categories

YS Yellow Swordfish
Yellow Swordfish
Member

Then you probably need the template tag – this codex article shows what control you have on the call to the template tag function. You would need to pass the llst of forum IDs that you DO want to show…

http://codex.simple-press.com/codex/plugins/our-plugins/the-template-tags-plugin/template-tag-recent-posts/

CA Carlos
Carlos
Member

On the widget I´m not able to exclude a forum adding only the dessired forums to show… 

What i´m doing worng? 

If i put only one it works but if I put various forums sepparated by commas it doesn´t works….

i´m putting this…

2169,2188,

 

MP Mr Papa
Mr Papa
Member

with the empty trailing comma? shouldnt matter but try correcting the list…

and screenshot please of the widget options…

CA Carlos
Carlos
Member

I´m editing the sp-RecentPost-tag.php

And this does not works for me… 

 

‘forumIds’ => 2188,

 

What i´m doing worng?

MP Mr Papa
Mr Papa
Member

Why are you editing the tag??

You should pass the forum id as an argument.

Is that really the forum id??? Means at some point you created 2187 other forums since we start the ids at one. That looks more like a topic id.

CA Carlos
Carlos
Member

Hi! I´m editing the tag because i want to leave some forums out of the recents topics tag… 

What should i edit for that? on the widget worked… but i don´t know where to put the categories that want to filter…?

 

The forum id is correct… the reason of this is that i migrated from bbpress so maybe bbpress asigned that forum  id… 

YS Yellow Swordfish
Yellow Swordfish
Member

Editing the tag is really not a good idea. The way to do this is to pass the comma-delimited list of id’s you DO want to show. I know you said above this did not work but we have no other reports of problems and it seems to work OK for me here in tests. So it would be better if you explained what, exactly, did not work so we can get you on the right path.

CA Carlos
Carlos
Member

Hi Yellow Swordfish!

My english is not good enought… so maybe sometimes i dont understand ( or explain myself ) good 

 

I edited the tag because i understood that was what i should be edited…

 

so… what have i to edit?

maybe the SpGroupView.php ?

sp_RecentPostList(‘show=10&admins=1’, __sp(‘Unread and recently updated topics’));

 

if is this line please let me know what shoud i put… 

 

thanks

 

MP Mr Papa
Mr Papa
Member

still not sure what you are doing….

if you use the widget, you only want to adjust the widget options in the widget itself in the wp admin…  just put the forum ids you want included in the list…

if you are not use the widget, then you would use the template tag, which is what you have been trying to edit..

see:  http://codex.simple-press.com/codex/plugins/our-plugins/the-template-tags-plugin/template-tag-recent-posts/

you would put the function call where you want the recent posts list to show up… ie

<?php sp_RecentPostsTag();?>

then you would use the forum id list as specified in that codex page to only include specific ids… ie

<?php sp_RecentPostsTag(‘forumIds=1,2,3,4’);?>

CA Carlos
Carlos
Member

On the botton of my forum there´s a place where it shows the Unread and recently updated topics

This is called from the SpGroupView.php with this code

sp_RecentPostList(‘show=10&admins=1’, __sp(‘Unread and recently updated topics’));

What I´m trying is to exclude a forum from these results… but I´m not having luck…

I tried differents ways… on the “widget” works without problem but on this place no way to success…

:(1.jpg
MP Mr Papa
Mr Papa
Member

Ooooohhhh…. sorry, never realized you were talking about the unread posts vs the recent posts…

out of curiosity, why do you want to exclude a forum from this list? The list will only contain forums that the user has permission to view… so they wont see private stuff…

there is currently no way to specify specific forums for this… this is because it operates on a per user basis on their unread list…

I think we could hook into the query and adjust the ‘where’ clause if you still wanted to do it… do you know how to use the wp api for hooks?

CA Carlos
Carlos
Member

Hi!

The main reason for exclude a forum is that my site is a “online guitar school” and the forum is a community, I dont want to show all the petitions of people asking for making a lesson of a song, I would like to show only those forums where the people talks about certain themes…. 

I dont have any idea of how to write code / api…

What a I need is a page where show the recent topics so people can interact quickly and “chat” 

And i want to leave a forum out of that “page” because is not a “community” page

 

( sorry again for my english )