protectedPages/custom page content

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

protectedPages/custom page content

Post by calguy1000 »

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.
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.
User avatar
Silmarillion
Dev Team Member
Dev Team Member
Posts: 483
Joined: Sun Jan 02, 2005 9:10 pm

Re: protectedPages/custom page content

Post by Silmarillion »

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
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.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: protectedPages/custom page content

Post by calguy1000 »

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?
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.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: protectedPages/custom page content

Post by Ted »

Modules can't register new plugins currently.

So much to do...
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: protectedPages/custom page content

Post by calguy1000 »

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.
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.
Post Reply

Return to “Modules/Add-Ons”