FEU and Custom Content User Question

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
Alpdog14

FEU and Custom Content User Question

Post by Alpdog14 »

I have been playing around with FEU and CC for a little bit now. I have gotten the groups login working so when someone logins and they are part of a different group they see different content. My Question is: what code do I use if I want different Users to login and they all get unique content for that specific user. I have tried using changing the current group code I have to different variables but nothing seems to be working. Is there a simple solution for this? My current code that works for separate groups login is on a regular content page and its:

{cms_module module=FrontEndUsers} {cms_module module=CustomContent} {if $ccuser->loggedin() && $ccuser->memberof('viewers')} Welcome logged in to Viewing Report {elseif $ccuser->loggedin() && $ccuser->memberof('testing')} Welcome logged in to Testing Center{elseif $ccuser->loggedin()} Welcome user from some other group {else} Anonymous user {/if}

If anyone has any knowledgeable ideas of how or what code to use please reply to this post. Thanks.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: FEU and Custom Content User Question

Post by calguy1000 »

First of all:

1) You don't need the {cms_module module=CustomContent} call.... CustomContent is always available.

2) you can simplify your code with just {$ccuser->memberof('groupname')} (it checks for logged in too

3) you can use {$customcontent_loginname} to check for particular users

put {get_template_vars} into your page template and see what variables are available when you're logged in.
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.
Alpdog14

Re: FEU and Custom Content User Question

Post by Alpdog14 »

Hi calguy, thanks for your quick reply. I tried changing my code in my page to your suggestions and this is what I came up with:

{cms_module module=FrontEndUsers} {if $customcontent_loginname('cabplan')} Welcome Chris {if $customcontent_loginname('tonyvalle')} Welcome Tony {if $customcontent_loginname('Sharon')} Welcome Sharon {if $customcontent_loginname('Alpdog14')} {else if}Welcome Alpdog14 {loggedin()} Welcome Guest {else} Anonymous user {/if}

I do not think its right because I got a huge smarty error message. i think i am using the $customcontent_loginname wrong but not sure what to fix.

also where in my template do i place {get_template_vars}, should i place this first in my template then try using the code? what does {get_template_vars} actually do? does is recognize the variables?
alby

Re: FEU and Custom Content User Question

Post by alby »

Alpdog14 wrote: {cms_module module=FrontEndUsers} {if $customcontent_loginname('cabplan')} Welcome Chris {if $customcontent_loginname('tonyvalle')} Welcome Tony {if $customcontent_loginname('Sharon')} Welcome Sharon {if $customcontent_loginname('Alpdog14')} {else if}Welcome Alpdog14 {loggedin()} Welcome Guest {else} Anonymous user {/if}
After login, FrontEndUsers change the display from login form to Welcome loginname

For your code use:
{if $customcontent_loginname == 'cabplan'}Welcome Chris
{elseif $customcontent_loginname == 'tonyvalle'}Welcome Tony
{elseif $customcontent_loginname == 'Sharon'}Welcome Sharon
.....
{else}Anonymous user
{/if}

Alpdog14 wrote: also where in my template do i place {get_template_vars}, should i place this first in my template then try using the code? what does {get_template_vars} actually do? does is recognize the variables?
Put the code at the end of the template (or after calling module).
That code display all variables that you can use. If you see an Array/Object variable, you can look in this with:
{$name_of_variable|print_r}

Alby
Pierre M.

Re: FEU and Custom Content User Question

Post by Pierre M. »

Alpdog14

Re: FEU and Custom Content User Question

Post by Alpdog14 »

Thanks Pierre M. this link was very helpful. it did have all the things i am actually trying to do. I want new pages for new users. one thing i have a question about is if my client creates new users in FEU and if he has no idea about coding. how can i make it so CMSMS creates a new page specifically for that created user and somehow apply a link to a upload document on that new user page. To give you an idea of what i want CMSMS to do I found this other CMS: http://www.homeinspectionwebsites.com/admin/
in this tool you can click on Report Upload which there you can create a username, password and upload a document which then creates a whole new page behind the scenes for that specific user when that user is ready to login and view their uploaded document. Please let me know if anyone has any advice on how to accomplish this.
Locked

Return to “CMSMS Core”