Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
RSS function displaying unapproved news

 
Reply to topic    Forum Index » Bugs and errors View previous topic
View next topic
RSS function displaying unapproved news
Author Message
x-byte



Joined: 14 Nov 2005
Posts: 170

Post RSS function displaying unapproved news Reply with quote
I just noticed that the RSS function is publishing the unapproved news. How to stop this from happening?





Using: 2.5
Sat Dec 17, 2005 6:58 pm View user's profile Send private message Visit poster's website
Guest








Please login to hide the ads.

FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2801
Location: Germany

Post Reply with quote
I don't have the possibility to look at the code right now.



It has something to do with "hidden". (Search in show.news.php for "hidden" to see an example)



I try to solve this problem tomorrow evening. Smile
Sat Dec 17, 2005 8:35 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2801
Location: Germany

Post Reply with quote
Well, I just had a look in show.news.php and the code in question is this:

Code:
   if (!$is_logged_in or $is_logged_in and $member['level'] == 4){

      $where[] = 'hidden = 0';

      $where[] = 'and';

   }




I guess, you only see the unapproved news because you are logged in. Ask someone who isn't logged in if he can see the unapproved news.

Or try to change the code above to

Code:
   if (!$is_logged_in or $is_logged_in and $member['level'] >= 1){

      $where[] = 'hidden = 0';

      $where[] = 'and';

   }

Sun Dec 18, 2005 9:22 pm View user's profile Send private message
x-byte



Joined: 14 Nov 2005
Posts: 170

Post Reply with quote
Hmm.. it's the RSS that is sending out news that isn't approved.
Mon Dec 19, 2005 1:42 am View user's profile Send private message Visit poster's website
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2801
Location: Germany

Post Reply with quote
I just tested it and it's exactly as I thought. Nobody sees the unapproved news in the RSS feed but those who are logged in.



And to let nobody see them (even those who are logged in) please change the code as I told you in the post above.



It perfectly worked for me.
Mon Dec 19, 2005 6:25 pm View user's profile Send private message
x-byte



Joined: 14 Nov 2005
Posts: 170

Post Reply with quote
FI-DD wrote:
I just tested it and it's exactly as I thought. Nobody sees the unapproved news in the RSS feed but those who are logged in.



And to let nobody see them (even those who are logged in) please change the code as I told you in the post above.



It perfectly worked for me.


Ok. Thanks for clearing it out. When I think of it, it's great. Then you get a feed whenever an article needs approval. Smile
Mon Dec 19, 2005 9:01 pm View user's profile Send private message Visit poster's website
Display posts from previous:    
Reply to topic    Forum Index » Bugs and errors All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.