ShoeLace1291 Posted October 12, 2007 Share Posted October 12, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/72907-need-help-with-smf-rss-im-making/ Share on other sites More sharing options...
GamingWarrior Posted October 12, 2007 Share Posted October 12, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/72907-need-help-with-smf-rss-im-making/#findComment-367729 Share on other sites More sharing options...
ShoeLace1291 Posted October 12, 2007 Author Share Posted October 12, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/72907-need-help-with-smf-rss-im-making/#findComment-367793 Share on other sites More sharing options...
Cagecrawler Posted October 12, 2007 Share Posted October 12, 2007 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).")"); Quote Link to comment https://forums.phpfreaks.com/topic/72907-need-help-with-smf-rss-im-making/#findComment-367802 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.