CMS MADE SIMPLE FORGE

Page Protect Tag

 

[#10171] Assign smarty variable to indicate if user is logged in

avatar
Created By: Robin (Cerulean)
Date Submitted: 2014-08-21 02:15

Assigned To: Fernando Morgado (JoMorg)
Resolution: Fixed
State: Open
Summary:
Assign smarty variable to indicate if user is logged in
Detailed Description:
Nice plugin you've created.

It would be cool if Page Protect assigned a smarty variable to indicate if a
user is logged in, so you can show/hide parts of a template depending.
e.g.

{if $logged_in == "1"}
...show some stuff...
{else}
...show some different stuff...
{/if}

Would be especially useful for hiding things that logged in users don't need to
see.

History

Comments
avatar
Date: 2014-08-23 15:03
Posted By: Fernando Morgado (JoMorg)

Although you can use the {protect} ... whatever content you want protected ...
{/protect} way I can see situations where this can be useful, and was already
playing around with the idea. So there is a pre-release of 1.2 in SVN with a few
more features, including that one.
Thanks for the suggestion. You can do a beta test with the SVN version if you
like, as it should be stable. I'll release it in a few days, after I'm positive
on it being as stable as possible.
      
avatar
Date: 2014-08-26 23:15
Posted By: Robin (Cerulean)

OK, great... but I'm not sure how to download from SVN. Is it possible to
download files via web browser or is it compulsory to install special SVN
software just to download?
      
avatar
Date: 2014-08-27 00:21
Posted By: Robin (Cerulean)

Downloaded the beta files with the simplest tool I could find
(http://downloadsvn.codeplex.com/).
Crazy that SVN doesn't offer browser downloads like Git does.

Version 1.2 looks excellent. The new help file is really useful.

Another idea for a future version:
It would be good to get a little more control over the form/message markup
without having to edit the core plugin file. Maybe some sort of template system
for the logged in/logged out markup? Or perhaps that would introduce too much
complexity.
      
avatar
Date: 2014-08-27 06:17
Posted By: Fernando Morgado (JoMorg)

Version 1.2 has already been released, you can download it the regular way.
There are a few features I want to add in future versions: I'll see if it's
possible to add versatility without much more complexity. Keep in mind this is a
plugin, aiming at simplicity, and it's already getting quite complex as it is :)
. Thanks for the suggestions.
      
Updates

Updated: 2014-08-23 15:03
resolution_id: 6 => 7

Updated: 2014-08-21 02:58
resolution_id: => 6