BetaArchive Logo
Navigation Home Screenshots Image Uploader Server Info FTP Servers Wiki Forum RSS Feed Rules Please Donate
UP: 5d, 5h, 35m | CPU: 41% | MEM: 2057MB of 3983MB used
{The community for beta collectors}

Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ] 
Author Message
 PostPost subject: RSS Feed        Posted: Thu Oct 25, 2007 9:23 am 
Administrator
User avatar
Offline

Joined
Fri Aug 18, 2006 11:47 am

Posts
12392

Location
Merseyside, United Kingdom

Favourite OS
Microsoft Windows 7 Ultimate x64
Hello all,

You might have noticed the addition of an RSS feed to the top of the forum. The feed itself is not new, its been there over 6 months but I guess lack of knowledge of its existence has lead to its virtually nil amount of use.

For that reason I have decided it would be a good idea to make it obvious we had a feed and have provided it in the link on the icon.

Feed away, but leave me some :P

Andy (Admin)

_________________
Image

BetaArchive Discord: https://discord.gg/epK3r6A


Top  Profile  WWW
 PostPost subject:        Posted: Thu Oct 25, 2007 4:38 pm 
Donator
User avatar
Offline

Joined
Thu Mar 15, 2007 5:11 pm

Posts
338

Location
West Sussex, United Kindom
Very nice Andy :)

Although one small thing, If i had of added that, i would of hyperlinked the text as well as the image :P

_________________
|3e|\|

Image
Image
The Number One HTTP Server On The Internet


Top  Profile
 PostPost subject:        Posted: Thu Oct 25, 2007 4:41 pm 
Administrator
User avatar
Offline

Joined
Fri Aug 18, 2006 11:47 am

Posts
12392

Location
Merseyside, United Kingdom

Favourite OS
Microsoft Windows 7 Ultimate x64
Apache wrote:
Very nice Andy :)

Although one small thing, If i had of added that, i would of hyperlinked the text as well as the image :P


Yeah, maybe I should do that to. I'll get on to it.

_________________
Image

BetaArchive Discord: https://discord.gg/epK3r6A


Top  Profile  WWW
 PostPost subject:        Posted: Fri Oct 26, 2007 4:37 am 
Donator
Offline

Joined
Sat Aug 19, 2006 1:25 am

Posts
590

Location
Israel
There's something insecure about the script you used. It's showing private forums even when you're not logged in. That could be a problem.


Top  Profile
 PostPost subject:        Posted: Fri Oct 26, 2007 4:40 am 
Administrator
User avatar
Offline

Joined
Fri Aug 18, 2006 11:47 am

Posts
12392

Location
Merseyside, United Kingdom

Favourite OS
Microsoft Windows 7 Ultimate x64
ppc_digger wrote:
There's something insecure about the script you used. It's showing private forums even when you're not logged in. That could be a problem.


Ah, thanks for pointing that out. I'll have to look in the script and see if there is an option to remove those forums.

_________________
Image

BetaArchive Discord: https://discord.gg/epK3r6A


Top  Profile  WWW
 PostPost subject:        Posted: Fri Oct 26, 2007 5:41 am 
Administrator
User avatar
Offline

Joined
Fri Aug 18, 2006 11:47 am

Posts
12392

Location
Merseyside, United Kingdom

Favourite OS
Microsoft Windows 7 Ultimate x64
I can't see how to make only the public forums appear on the RSS script without making the actual forums private and hidden from view. I don't want to do this, I only want to block them from the feed.


Code:
// Which forum do you want posts from (forum_id)?  specified in the url with "f=".  Defaults to all (public) forums.
$forum_id = ( isset($HTTP_GET_VARS['f']) ) ? intval($HTTP_GET_VARS['f']) : '';
$sql_forum_where = ( !empty($forum_id) ) ? ' AND f.forum_id = ' . $forum_id : ' ';


This is the code that does it but I can't figure out how to put multiple ID's in.

_________________
Image

BetaArchive Discord: https://discord.gg/epK3r6A


Top  Profile  WWW
 PostPost subject:        Posted: Fri Oct 26, 2007 7:49 am 
Donator
Offline

Joined
Sat Aug 19, 2006 1:25 am

Posts
590

Location
Israel
Andy wrote:
I can't see how to make only the public forums appear on the RSS script without making the actual forums private and hidden from view. I don't want to do this, I only want to block them from the feed.


Code:
// Which forum do you want posts from (forum_id)?  specified in the url with "f=".  Defaults to all (public) forums.
$forum_id = ( isset($HTTP_GET_VARS['f']) ) ? intval($HTTP_GET_VARS['f']) : '';
$sql_forum_where = ( !empty($forum_id) ) ? ' AND f.forum_id = ' . $forum_id : ' ';


This is the code that does it but I can't figure out how to put multiple ID's in.

You can add an OR clause to the SQL string, for example:
Code:
// Which forum do you want posts from (forum_id)?  specified in the url with "f=".  Defaults to all (public) forums, as specified in $all_forums_where.
$all_forums_where = '( f.forum_id = 1 OR f.forum_id = 2 OR f.forum_id = 3 )';
$forum_id = ( isset($HTTP_GET_VARS['f']) ) ? intval($HTTP_GET_VARS['f']) : '';
$sql_forum_where = ( !empty($forum_id) ) ? ' AND f.forum_id = ' . $forum_id : ' AND ' . $all_forums_where;


Top  Profile
 PostPost subject:        Posted: Fri Oct 26, 2007 8:01 am 
Administrator
User avatar
Offline

Joined
Fri Aug 18, 2006 11:47 am

Posts
12392

Location
Merseyside, United Kingdom

Favourite OS
Microsoft Windows 7 Ultimate x64
ppc_digger wrote:
Andy wrote:
I can't see how to make only the public forums appear on the RSS script without making the actual forums private and hidden from view. I don't want to do this, I only want to block them from the feed.


Code:
// Which forum do you want posts from (forum_id)?  specified in the url with "f=".  Defaults to all (public) forums.
$forum_id = ( isset($HTTP_GET_VARS['f']) ) ? intval($HTTP_GET_VARS['f']) : '';
$sql_forum_where = ( !empty($forum_id) ) ? ' AND f.forum_id = ' . $forum_id : ' ';


This is the code that does it but I can't figure out how to put multiple ID's in.

You can add an OR clause to the SQL string, for example:
Code:
// Which forum do you want posts from (forum_id)?  specified in the url with "f=".  Defaults to all (public) forums, as specified in $all_forums_where.
$all_forums_where = '( f.forum_id = 1 OR f.forum_id = 2 OR f.forum_id = 3 )';
$forum_id = ( isset($HTTP_GET_VARS['f']) ) ? intval($HTTP_GET_VARS['f']) : '';
$sql_forum_where = ( !empty($forum_id) ) ? ' AND f.forum_id = ' . $forum_id : ' AND ' . $all_forums_where;


What about AND because it needs to do it for all of them in one go.

_________________
Image

BetaArchive Discord: https://discord.gg/epK3r6A


Top  Profile  WWW
 PostPost subject:        Posted: Fri Oct 26, 2007 8:18 am 
Donator
Offline

Joined
Sat Aug 19, 2006 1:25 am

Posts
590

Location
Israel
Andy wrote:
What about AND because it needs to do it for all of them in one go.

It will. The WHERE clause tells the SQL server to check each row. By using an OR clause, every row that matches either forum_id is accepted and passed to the feed.


Top  Profile
 PostPost subject:        Posted: Fri Oct 26, 2007 8:18 am 
Administrator
User avatar
Offline

Joined
Fri Aug 18, 2006 11:47 am

Posts
12392

Location
Merseyside, United Kingdom

Favourite OS
Microsoft Windows 7 Ultimate x64
ppc_digger wrote:
Andy wrote:
What about AND because it needs to do it for all of them in one go.

It will. The WHERE clause tells the SQL server to check each row. By using an OR clause, every row that matches either forum_id is accepted and passed to the feed.


Nice. I'll give it a go now. Thanks.

_________________
Image

BetaArchive Discord: https://discord.gg/epK3r6A


Top  Profile  WWW
 PostPost subject:        Posted: Fri Oct 26, 2007 8:31 am 
Administrator
User avatar
Offline

Joined
Fri Aug 18, 2006 11:47 am

Posts
12392

Location
Merseyside, United Kingdom

Favourite OS
Microsoft Windows 7 Ultimate x64
There we go :) Seems OK now. Thanks ppc_digger, greatly appreciated!

_________________
Image

BetaArchive Discord: https://discord.gg/epK3r6A


Top  Profile  WWW
 PostPost subject:        Posted: Fri Oct 26, 2007 2:38 pm 
Donator
Offline

Joined
Sat Aug 19, 2006 1:25 am

Posts
590

Location
Israel
Andy wrote:
Thanks ppc_digger, greatly appreciated!

Any time.


Top  Profile
 PostPost subject:        Posted: Sat Oct 27, 2007 12:37 pm 
Is there a way to remove feeds from IE?


Top
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ] 




Who is online

Users browsing this forum: No registered users and 3 guests


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

Search for:
Jump to:  

All views expressed in these forums are those of the author and do not necessarily represent the views of the BetaArchive site owner.

Powered by phpBB® Forum Software © phpBB Group

Copyright © 2006-2018

 

Sitemap | XML | RSS