Page 1 of 1

How do I password protect pages? [solved]

Posted: Sun Apr 06, 2008 6:26 pm
by davids355
I have already installed the front end users module.

I have created some users.

I am just wondering is it possible to password protect certain pages so that only logged in users can view them??

Many thanks in advance

Dave

Re: How do I password protect pages?

Posted: Sun Apr 06, 2008 6:41 pm
by RonnyK
Use CustomContent as well.
There are good videos in the visual help to show the working combination.

Ronny

Re: How do I password protect pages?

Posted: Sun Apr 06, 2008 6:53 pm
by leslie894
Calguy has also posted a very useful thread inTips and Tricks regarding "private" content:

http://forum.cmsmadesimple.org/index.ph ... 689.0.html

Re: How do I password protect pages?

Posted: Sun Apr 06, 2008 7:22 pm
by musicscore
Don't use the print button on an page the is protected by CustomContent module.
The printingpage does show the protected content (at lease on my pages).
I put the printbutton in the protected content area so only the logged-in users can use the printbutton.

Maybe you can see this as a bug and maybe the next version will solve this problem.

Musicscore

Re: How do I password protect pages?

Posted: Mon Apr 07, 2008 7:55 am
by davids355
Thanks guys, extremely helpful!!! Got it working now:)

Re: How do I password protect pages?

Posted: Wed Apr 09, 2008 4:30 pm
by Pierre M.
Hello,

@David : please prefix your first post with [solved]. It helps sorting out solutions and open issues.
musicscore wrote: Maybe you can see this as a bug and maybe the next version will solve this problem.
sorry to be off topic , but :
There is no protected/unprotected "print button" issue, because there is no "print button issue" : don't use {print}, the only "print button" is the browser's one. The (user behind the) browser is free to render/preview/print/convert the content it has downloaded via http. There is no need to mess the HTML content with ugly hacks that work less reliably than the browser.
(no offense to the {print} author ;)

Pierre M.

Re: How do I password protect pages?

Posted: Thu Apr 10, 2008 10:15 am
by musicscore
The printbutton of the browser (mie & ff) prints te complete page, not just the content.
If you only want to print the content and not the menu, the header etc. you have to use the {print} tag.
But when you use the {print} tag, the custom content is always printed, even if you are not logged-in.

Musicscore

Re: How do I password protect pages?

Posted: Thu Apr 10, 2008 1:17 pm
by leslie894
FEUsers and CustomContent is an add-on module as ooposed to Core functionality so we can't expect every older module to work properly with them. What we can hope for is that module authors will see the need to update these older modules so they do integrate with FEU and CC.

In the meantime, find a way to recognize the custom content on your pages and modify the print template so that it only prints the custom content when it is appropriate. If that's not possible only display the print option to logged in users.

Pierre, the {print} tag may not be the best but it does provide a necessary function. On my school site, people will want to print out information but do not want the header and navigation information that the browser's print function invariably includes.

Re: How do I password protect pages?

Posted: Mon Apr 14, 2008 1:54 pm
by Pierre M.
Hello again,
musicscore wrote: The printbutton of the browser (mie & ff) prints te complete page, not just the content.
True. I hadn't tried subpage selection before print. I wish my browser could provide a right-click "print selection" option. It already has a "show source of selection" so there is hope for next version or a plugin.
musicscore wrote: If you only want to print the content and not the menu, the header etc. you have to use the {print} tag.
leslie894 wrote: On my school site, people will want to print out information but do not want the header and navigation information that the browser's print function invariably includes.
You don't have to use {print} for this. It is builtin CSS and browsers. It is the media=print stylesheet attribute. I put display:none to all navigation elements (headers, menus...) in my print stylesheets. Try it : this is why I think {print} is no more relevant.

Pierre M.

Re: How do I password protect pages?

Posted: Mon Apr 14, 2008 10:17 pm
by leslie894
Pierre M. wrote: You don't have to use {print} for this. It is builtin CSS and browsers. It is the media=print stylesheet attribute. I put display:none to all navigation elements (headers, menus...) in my print stylesheets. Try it : this is why I think {print} is no more relevant.
Thanks Pierre. Sorting out the print template has been on my to do list but it sounds like I'd be better off learning a little more about CSS. I've been vaguely aware of the ability to have different CSS for different media but never really looked into it. Will do so now.

Re: How do I password protect pages? [solved]

Posted: Tue Apr 15, 2008 4:35 pm
by marties
An easier way to create a print css :

make a copy of your actual css,
rename it to print.css
then refer only to this css in your xhtml template
then slowly add at the bottom of this css the rules needed to make the header/menus/... disappear or change