View Full Version : Request: User Side Latest Post Source Forum Filter
PMichaud
05-29-2005, 09:51 PM
I've just put up the cmps, and my users like it for the most part, but many want the ability to filter the forums from which the latest posts are drawn for the index page. I know the admins have the ability to filter it, but what if a user wants to load up the index and see only posts from the general forum and the rpg forum in the latest posts module? They can't!
I know this modification would require a user cp hack, and probably an additional db table... but could someone write this?
theMusicMan
05-30-2005, 06:48 AM
You can perhaps set up a few new nav menu items that use the following;
?do=getnew&exclude=x,y,z
... where x,y,z are the forums you wish to exclude from being returned.
So - if you have a forumID of 12 and 14 that you don't want any new posts returned from when clicking New Posts, then simply put that text at the end of the search.php i.e.
www.yourdomain.com/yourvB/search.php?do=getnew&exclude=12,14
moses
05-30-2005, 08:20 AM
I played around with this and it can be done.
You need to create public user-groups that your members can join in their control panel. You then give these groups permissions to see the forums that you want them to see, and then include all of the forums in the cmps. The users will only see content from the forums which they have chosen to join.
PMichaud
05-30-2005, 12:06 PM
Thanks for the replies.
Doing the new post exclude thing won't really work, since I have different users who want to see different arbitrary forums.
The user groups thing might work, but I don't want to actually prevent users from seeing other parts of the forum, just because they don't want to see the latest posts in those forums on the index.
I'm not sure what to do.
Albus
05-30-2005, 02:28 PM
Actually, the easiest way is to set up a single line custom profile field asking for a comma-delimited list of forumids. Join that with the module field. Make sure to use explode(), intval(), trim(), and implode() to correctly ensure the exclusion string is valid. Pass that into the mosules sql instead of whats already there.
That is, if I understood your request correctly.
Albus
05-30-2005, 03:05 PM
NOTICE: I have not tested this, but it should work.
1) Take board offline.
2) Create a single text line custom profile field for users to enter a comma-delimited list of forumids.
3) Note the fields name (I.E field5).
4) Edit the attached file and replace the name in the following line if needed:
$outforums = $bbuserinfo['field5'];
5) Rename /modules/latesttopics.php to /modules/latesttopics.php.bak
6) Upload the attached file as /modules/latesttopics.php
Test it.
If anything doesn't work right, you can restore the file from backup.
Albus
05-30-2005, 03:33 PM
Hang on...there's a small coding error and a logic error somewhere. I'll repost when fixed.
Albus
05-30-2005, 03:50 PM
Ok. I applied it to my forum and fixed it. Follow the instructions above but use this file instead.
moses
05-31-2005, 06:41 AM
another option would be to create a few cmps pages, showing different forums on each one. that way your users could just change their bookmark for the different forums to be visible..
PMichaud
05-31-2005, 03:23 PM
That's not customized like this is though -- this works perfectly. And by the way, you can reverse the filter by editting the code where the query says "NOT IN" to just "IN" -- that way the fild will specify what forums you WANT posts from.
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.