FrontEndUsers and CustomContent module help!

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.
wms
Forum Members
Forum Members
Posts: 204
Joined: Mon Feb 13, 2006 7:26 pm

FrontEndUsers and CustomContent module help!

Post by wms »

Hi,

I'm using the latest version of CMSMS, version 1.1.2 of FEU and the latest version of CC.

My problem is, when I log in as a client, it also logs me into the employee area.  How do I set up two different logins?

I created two different templates for client and employee.  The content area for client is below (the employee template is the same, just the group equals employee).







{print showbutton=true script=true}

{title}

{cms_module module=CustomContent}



{content}



You must be logged in to view the content of this page.

{cms_module module=FrontEndUsers}





Thanks,
Last edited by wms on Wed Mar 28, 2007 3:24 pm, edited 1 time in total.
wms
Forum Members
Forum Members
Posts: 204
Joined: Mon Feb 13, 2006 7:26 pm

Re: FrontEndUsers and CustomContent module help!

Post by wms »

Does anyone have any ideas on how to use two separate logins (ie. page for clients, page for emplyees - different user group)?

Thanks,
alby

Re: FrontEndUsers and CustomContent module help!

Post by alby »

wms wrote: Does anyone have any ideas on how to use two separate logins (ie. page for clients, page for emplyees - different user group)?
Try with smarty method (view help of CC)

Alby
wms
Forum Members
Forum Members
Posts: 204
Joined: Mon Feb 13, 2006 7:26 pm

Re: FrontEndUsers and CustomContent module help!

Post by wms »

Looking at the help for CC, it says:

{cms_module module=CustomContent}
{if $customcontent_loggedin}
  Welcome {$customcontent_loginname}
{else}
  You are not authorized to view this data
{/if}

Do I put this in my template?  And how do I determine if they are a client or an employee and what content they see.

Thanks,
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: FrontEndUsers and CustomContent module help!

Post by calguy1000 »

{if $customcontent_loggedin > 0}
  {* we're logged in as somebody *}
  {if isset($customcontent_memberof_employees) }
      Welcome employee
  {elseif isset($customcontent_memberof_client) }
      Welcome Client
  {else}
      You're logged in, but not a client or an employee..... who are you
  {/if}
{/if}
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.
wms
Forum Members
Forum Members
Posts: 204
Joined: Mon Feb 13, 2006 7:26 pm

Re: FrontEndUsers and CustomContent module help!

Post by wms »

Thanks so much for the reply.

Do I put this in my template like this:

{cms_module module=FrontEndUsers}  0}
  {* we're logged in as somebody *}
  {if isset($customcontent_memberof_employees) }
      Welcome employee
  {elseif isset($customcontent_memberof_client) }
      Welcome Client
  {else}
      You're logged in, but not a client or an employee..... who are you
  {/if}
{/if}


Thanks,
wms
Forum Members
Forum Members
Posts: 204
Joined: Mon Feb 13, 2006 7:26 pm

Re: FrontEndUsers and CustomContent module help!

Post by wms »

Ok..I got it down to this time my template:

{if $customcontent_loggedin > 0}
 
  {if isset($customcontent_memberof_employees) }
      {content}
  {elseif isset($customcontent_memberof_client) }
      {content}
  {else}
      You're logged in, but not a client or an employee..... who are you?
  {/if}
{/if}

Where do I put the FEU for the login stuff?

Thanks,
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: FrontEndUsers and CustomContent module help!

Post by calguy1000 »

Put the {cms_module module='FrontEndUsers'} tag anywhere you want.  it's smart.  If the user isn't logged in, it'll display a login form.  If the user is logged in, it'll display links for change settings, and logout actions.

It can be inside this logic, or outside of it.  it doesn't matter.
wms wrote: Ok..I got it down to this time my template:

{if $customcontent_loggedin > 0}
 
  {if isset($customcontent_memberof_employees) }
      {content}
  {elseif isset($customcontent_memberof_client) }
      {content}
  {else}
      You're logged in, but not a client or an employee..... who are you?
  {/if}
{/if}

Where do I put the FEU for the login stuff?

Thanks,
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.
wms
Forum Members
Forum Members
Posts: 204
Joined: Mon Feb 13, 2006 7:26 pm

Re: FrontEndUsers and CustomContent module help!

Post by wms »

I'm so confused now....it just doesn't seem to be working.  Still when I log in as a client, I  don't get the content I'm supposed to.

Ex.  When I log in as client...I get the standard Welcome Client message on both client & employee pages.  Here is what is in my template:


     
        {print showbutton=true script=true}




{title}

{cms_module module=FrontEndUsers}

{if $customcontent_loggedin > 0}
 
  {if isset($customcontent_memberof_employees) }
      {content}
  {elseif isset($customcontent_memberof_client) }
      {content}
  {else}
      Who are you anyways?
  {/if}
{/if}

 


 
 


Any help would be great.


Thanks,
alby

Re: FrontEndUsers and CustomContent module help!

Post by alby »

wms wrote: I'm so confused now....it just doesn't seem to be working.  Still when I log in as a client, I  don't get the content I'm supposed to.

Ex.  When I log in as client...I get the standard Welcome Client message on both client & employee pages.  Here is what is in my template:


     
        {print showbutton=true script=true}




{title}

{cms_module module=FrontEndUsers}

{if $customcontent_loggedin > 0}
 
  {if isset($customcontent_memberof_employees) }
      {content}
  {elseif isset($customcontent_memberof_client) }
      {content}
  {else}
      Who are you anyways?
  {/if}
{/if}

 


 
 


Any help would be great.
{content} is same for client and employees.
Try with:

Code: Select all

{if $customcontent_loggedin > 0}
   {if isset($customcontent_memberof_employees) }
      {content block=employees}
   {elseif isset($customcontent_memberof_client) }
      {content block=client}
   {else}
       {content}
   {/if}
{/if}
and edit, in your page, content client and employees

Alby
wms
Forum Members
Forum Members
Posts: 204
Joined: Mon Feb 13, 2006 7:26 pm

Re: FrontEndUsers and CustomContent module help!

Post by wms »

Thanks so much for the responses.  It totally makes sense...but (I'm real sorry there is a 'but') it still doesn't seem to work.

I now have this in my template:

{cms_module module=FrontEndUsers}
{if $customcontent_loggedin > 0}
  {if isset($customcontent_memberof_employees) }
      {content block=employees-access}                                  <-------- page-alias
  {elseif isset($customcontent_memberof_client) }
      {content block=client-access}                                        <-------- page-alias
  {else}
      {content}
  {/if}
{/if}

When I log in I just get the default "Welcome Client" or Employee appearing on both section.

If you want to check it out to see what it is doing, please goto: http://linkprotection.ca/index.php and select either the Client or Employee Access page.

Login info for client:
username:  client
password:  lpmlpm

Login info for employee:
username:  employee
password:  lpmlpm

Any help would be just great.  I'm totally lost on why this isn't working.  I have a client that will need this very very soon to be functional.

Thanks so much,
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: FrontEndUsers and CustomContent module help!

Post by RonnyK »

I just tried and get the correct answer:

client: "welcome client"
employee: "welcome employee"

Ronny
wms
Forum Members
Forum Members
Posts: 204
Joined: Mon Feb 13, 2006 7:26 pm

Re: FrontEndUsers and CustomContent module help!

Post by wms »

Yeah you get the Welcome Client or Employee....but these are just default responses from the CC module I'm guessing because my client-access and employee-access pages has content in it that's not "Welcome Client".

And if you log in as client and then go into the Employee Access page, you will see Welcome Client or vice versa.

???
wms
Forum Members
Forum Members
Posts: 204
Joined: Mon Feb 13, 2006 7:26 pm

Re: FrontEndUsers and CustomContent module help!

Post by wms »

...any ideas?

I'm still can't get the two logins to work.

Thanks,
alby

Re: FrontEndUsers and CustomContent module help!

Post by alby »

wms wrote: ...any ideas?

I'm still can't get the two logins to work.
Try with:

Code: Select all

{if $customcontent_loggedin > 0}
   {if $customcontent_memberof_employees > 0}  <-----
      {content block=employees-access}
   {elseif $customcontent_memberof_client > 0}  <-----
      {content block=client-access}
   {else}
       {content}
   {/if}
{/if}

{get_template_vars}   <-----
and look for variables result

Alby
Post Reply

Return to “CMSMS Core”