PDA

View Full Version : Show new posts from members only?


Simon Lloyd
03-06-2009, 07:45 AM
Hi all we have both members and guests posting in our forums, currently we use http://www.thecodecage.com/forumz/search.php?do=getnew to find all new posts, is there a way of showing all new posts from members only?

Mr-Moo
03-06-2009, 02:16 PM
Let me know if this works, in my "head" it does :p

Find in "search_results":
<if condition="$action == 'getnew'">$vbphrase[new_posts_nav]<else />$vbphrase[posts_from_last_day]</if>
</if>

Replace With:
<if condition="!is_member_of($vbulletin->userinfo, X)"><if condition="$action == 'getnew'">$vbphrase[new_posts_nav]<else />$vbphrase[posts_from_last_day]</if>
</if></if>

Replace "X" with the usergroups you want to allow. Separate them like this "1,2,4,5,6" for multiple groups.

Let me know if this works.

Simon Lloyd
03-06-2009, 05:24 PM
Mr-Moo, thanks very much for the reply, i haven't added it yet as i have one question, if i use the code does that mean that the "New Posts" will only ever show members posts?, ideally i want to keep the original link and add a button/link in my navbar to show just members new posts.

How could we integrate that, would it need to be a plugin?

Mr-Moo
03-06-2009, 07:06 PM
I'm sorry, I missunderstood your question. When I first read it I thought you wanted to only have members able to view the new posts.

I will have to think about this one a little more as it may require a database query.

My apologies.

Simon Lloyd
03-06-2009, 07:40 PM
Ok, well thanks for trying :)