Author Topic: RSS Feed only for Members  (Read 4763 times)

0 Members and 1 Guest are viewing this topic.

Offline johngay

  • Pre-Newbie
  • Posts: 3
    • View Profile
RSS Feed only for Members
« on: October 16, 2009, 07:29:03 PM »
How do I set permissions for the RSS Feed?

I would like to have only registered users be able to access that capability.

JOhn
« Last Edit: October 16, 2009, 07:58:54 PM by Rembrandt »

Rembrandt

  • Guest
Re: RSS Feed only for Members
« Reply #1 on: October 16, 2009, 07:51:20 PM »
Hello and Welcome to the Forum!
...

search in your Templates/header.html:
Code: [Select]
{if has_rss}
<link rel="alternate" type="application/rss+xml" title="{rss_title}" href="{rss_url}">
{endif has_rss}

and replace:
Code: [Select]
{if user_loggedin}
{if has_rss}
<link rel="alternate" type="application/rss+xml" title="{rss_title}" href="{rss_url}">
{endif has_rss}
{endif user_loggedin}

search in your Templates/footer.html:
Code: [Select]
{if has_rss}
<p align="center">
  <a href="{rss_url}"><img src="{template_url}/images/rss.gif" border="0" width="15" height="15" alt="{rss_title}" /></a>
</p>
{endif has_rss}

and replace:
Code: [Select]
{if user_loggedin}
{if has_rss}
<p align="center">
  <a href="{rss_url}"><img src="{template_url}/images/rss.gif" border="0" width="15" height="15" alt="{rss_title}" /></a>
</p>
{endif has_rss}
{endif user_loggedin}

mfg Andi

Offline johngay

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: RSS Feed only for Members
« Reply #2 on: October 16, 2009, 08:20:27 PM »
Wow, Now that's impressive responsive time.  Thank you very much.

John

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: RSS Feed only for Members
« Reply #3 on: October 16, 2009, 10:21:36 PM »
Andi,

i just have a question before i test it:

does that means, that i have 1st to login to the 4images gallery when i want to receive the RSS feeds?
or
when ppl. knows the url example: http://wallp.ape.rs/rss.php?action=images can access it anyway?

thx and wish you all a nice weekend.
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Rembrandt

  • Guest
Re: RSS Feed only for Members
« Reply #4 on: October 17, 2009, 07:26:14 AM »
Hi!

....
when ppl. knows the url ....

you're right, the code has no functional  :(

mfg Andi

EDIT:

search in rss.php:

@define('RSS_DEFAULT_ITEMS'10);
@
define('RSS_MAX_ITEMS'30);


and replace it with:

if ($user_info['user_level'] >= 2){
@
define('RSS_DEFAULT_ITEMS'10);
@
define('RSS_MAX_ITEMS'30);
}
else{
@
define('RSS_DEFAULT_ITEMS',0);
@
define('RSS_MAX_ITEMS'0);
}


please test it.
« Last Edit: October 17, 2009, 07:53:55 AM by Rembrandt »