Jump to content

Recommended Posts

I am currently making an rss feed to display the latest forum posts that have been made at our SMF forum.  Everything is working fine, the only problem is that I need it to only pull posts from boards that don't require staff access to see.  For example, visit http://www.stormgaming.net/latest_posts.php.  Try clicking on a link to a post.  All the latest posts are in staff only boards and require logging in to see them.  If anyone has any ideas, that would be wonderful.

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/72907-need-help-with-smf-rss-im-making/
Share on other sites

Ok, i just got a mate to check a few things on the SMF forum he runs and this is whet we came up with:

Under each board there is a memberGroups column, it contains numbers that line up with membergroups that can read that board section.

So what you need to do is check that, that column contains the number 0. if it does that means its an open forum that anyone can post in.

i hope thats right, i can't be 100% sure as i do not run a SMF forum to double check what i got told.

--EDIT--

also if you just want to stop it listing staff only boards then

user group 1 is Site Founder

user group 2 is Global Moderator

user group 3 is Moderator

 

this means that if you have forums locked to different user groups they will still be listed.

 

 

Would there be a mysq query with select that would select all records except for certain rows?  For example:

 

mysql_query("SELECT rows FROM table WHERE row1 NOT = $staff_forums");

 

$staffforums would equal a function used to select the ids of the forums with the permissions of staff.

mysql_query("SELECT columns FROM table WHERE column1 NOT IN (forum1,forum2,forum3)");

 

The section in the brackets can be passed as an array, just do this:

mysql_query("SELECT columns FROM table WHERE column1 NOT IN (".implode(",",$unwanted_forum_array).")");

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.