I would LOVE the ability to display only certain content on a page to authorized users
i.e:
{if currentGroup=someauthorizedgroup}
You are allowd to see this stuff
{endif}
{if currentGroup=someothergroup}
Some Other Content
{endif}
the protectedPages stuff is almost there, we just need the ability to put this type of expression onto the page.... hope somebody can help with this.
protectedPages/custom page content
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
protectedPages/custom page content
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
- Silmarillion
- Dev Team Member
- Posts: 483
- Joined: Sun Jan 02, 2005 9:10 pm
Re: protectedPages/custom page content
Hi Calguy1000
I reallt do not know if this is possible, seems to be a smarty thing, and I'm not that well into smarty. If someone can point me to some source stating that it is possible I'll be happy to look into implementing this in the PPages module.
Best regards
Morten/Silmarillion
I reallt do not know if this is possible, seems to be a smarty thing, and I'm not that well into smarty. If someone can point me to some source stating that it is possible I'll be happy to look into implementing this in the PPages module.
Best regards
Morten/Silmarillion
calguy1000 wrote: I would LOVE the ability to display only certain content on a page to authorized users
i.e:
{if currentGroup=someauthorizedgroup}
You are allowd to see this stuff
{endif}
{if currentGroup=someothergroup}
Some Other Content
{endif}
the protectedPages stuff is almost there, we just need the ability to put this type of expression onto the page.... hope somebody can help with this.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: protectedPages/custom page content
I've been doing some reading, and thinking and think that we are almost there.
I am wondering if it would be possible to modify the UserId module to register some smarty plugins, or to assign some variables so that we could do something like
{$currentuser->ingroup p1="specialusers" assign="valid"}
{if $valid == 1 }
You're Special
{/if}
What do you think wishy?
I am wondering if it would be possible to modify the UserId module to register some smarty plugins, or to assign some variables so that we could do something like
{$currentuser->ingroup p1="specialusers" assign="valid"}
{if $valid == 1 }
You're Special
{/if}
What do you think wishy?
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: protectedPages/custom page content
Modules can't register new plugins currently.
So much to do...
So much to do...
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: protectedPages/custom page content
I modified the UserID module and added a
$this->smarty->register_object( "user_id", $this );
into the DoAction method.
I put
{cms_module module="UserID"} into the top of my template, and then then put code like this into my page
{if $UserID->function( param1, param2 ) }
{/if}
but all I got was a smarty error of:
Fatal error: Call to a member function on a non-object in /var/www/html/cms/tmp/templates_c/%%28^288^2881AF93%%db%3Atesting.php on line 33
was wondering if anybody had any insights as to what I can do to fix this.
$this->smarty->register_object( "user_id", $this );
into the DoAction method.
I put
{cms_module module="UserID"} into the top of my template, and then then put code like this into my page
{if $UserID->function( param1, param2 ) }
{/if}
but all I got was a smarty error of:
Fatal error: Call to a member function on a non-object in /var/www/html/cms/tmp/templates_c/%%28^288^2881AF93%%db%3Atesting.php on line 33
was wondering if anybody had any insights as to what I can do to fix this.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.