Restricted Content and News

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
ronanski
New Member
New Member
Posts: 7
Joined: Tue Feb 08, 2011 9:09 pm

Restricted Content and News

Post by ronanski »

Hi all,

cms/php details below. I am making a restricted content area for a band website. The content in this area will be viewed by band members.

I have got frontend users working fine with a login page. I have read up on custom content including calguy's pdf 'Hiding private content' and I am ok with this.

However what I cannot figure out is how this works with the news module.

I wish to allow the site editors to create news articles that will only appear on the restricted page. These news articles will fall under a number of different categories which may grow as the editor needs.

Is this possible? My apologies if this has been answered but I have had a long search through the docs and forums.

thanks



CMS Version 1.10.2
News 2.12.3
FrontEndUsers 1.16.8
CustomContent 1.7.3

php 5.3.8
apache/2.2.21
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Restricted Content and News

Post by jmcgin51 »

So what is your question?

On the "restricted" page, simply call the News module {cms_module module='News' category='yourcategory'}.

If the user has permission to be on that page, then he'll see the news. Otherwise, he won't.
mcDavid
Power Poster
Power Poster
Posts: 377
Joined: Tue Mar 31, 2009 8:45 pm
Location: Delft, Netherlands

Re: Restricted Content and News

Post by mcDavid »

Also, add some ccuser logic to your detail template, otherwise it wil be very easy to just change the news id in the URL to view "restricted" news items

Code: Select all

{if $ccuser->memberof("band") || $entry->category == 'public'}
// display news item
{else}
// display "this news-item is for members only" or something
{/if}
ronanski
New Member
New Member
Posts: 7
Joined: Tue Feb 08, 2011 9:09 pm

Re: Restricted Content and News

Post by ronanski »

Thank you for the responses.

to clarify...

there is a news page on the site which deals with general public news.

I wish to also have a restricted page that contains restricted news items. These news items will not be just one category - I wish for the site editors to set up as many restricted categories as they wish and for these news items not to appear on the public news page.

I am unsure of how I would set things up so as the editors can define multiple restricted news categories in future.

thanks for your help
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Restricted Content and News

Post by Dr.CSS »

Fork News to be RNews module that way you have 2 different module to work with, one Restricted one not...
ronanski
New Member
New Member
Posts: 7
Joined: Tue Feb 08, 2011 9:09 pm

Re: Restricted Content and News

Post by ronanski »

Thank you I will investigate what forking is.

If I were to have just one restricted news category that displayed only on the restricted page, how would I make sure that the public news page did not show the restricted news category?

thanks
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Restricted Content and News

Post by Dr.CSS »

You would have to use the category='list,each,category,here' but then for every new category you would have to add it to that tag parameter...

Or do some fancy smarty calls in the News templates to not show that category...
Post Reply

Return to “Modules/Add-Ons”