Page 1 of 2

Front-End user

Posted: Fri Apr 27, 2007 7:16 am
by stefsegers
Hi all,

I am wondering if it's possible to hide the following info from the FrontEnd User page

- forgot password
- Edit my settings

I have made some users that cannot change anything or send forgot email.

I have made 3 groups which can be used for 3 different pages to login. I hope somebody can help me out?

Stef

Re: Front-End user

Posted: Fri Apr 27, 2007 7:25 am
by alby
stefsegers wrote: I am wondering if it's possible to hide the following info from the FrontEnd User page

- forgot password
- Edit my settings
FrontEnd call module without params "form" display login form ONLY.

Alby

Re: Front-End user

Posted: Fri Apr 27, 2007 7:49 am
by stefsegers
Hi Alby,

Thanks for the reply,

This is that I have in my page. It seems that I only have frontendusers without any call for settings edit etc.

{cms_module module=FrontEndUsers}
{cms_module module=CustomContent}
{if $customcontent_memberof_stagiairs}
Klik hier om verder te gaan



{else}
U dient als stagiar eerst in te loggen voor u verder mag
{/if}

Re: Front-End user

Posted: Fri Apr 27, 2007 8:10 am
by alby
stefsegers wrote: This is that I have in my page. It seems that I only have frontendusers without any call for settings edit etc.
............
Check your login template (Users & Groups -> FrontEnd User Management -> Login template) and delete other link

Alby

Re: Front-End user

Posted: Fri Apr 27, 2007 12:25 pm
by stefsegers
Perfect, this works!

But when I am logged in I still see the "Change my settings" link.

Where can I delete this?

Stef

Re: Front-End user

Posted: Fri Apr 27, 2007 2:33 pm
by alby
stefsegers wrote: Perfect, this works!

But when I am logged in I still see the "Change my settings" link.

Where can I delete this?
Logout template  ;D

Alby

Re: Front-End user

Posted: Fri Apr 27, 2007 2:53 pm
by stefsegers
Hi Alby,

Thanks for the support. I found it!

I still have a nother question but I don't know if I should put it in a new thread?

Anyhow, the problem is that when I try to login to for example, beheer, I get the following problem.
------------
When I login I get: welcome userX  Log out

U need to login bla bla

It looks that login worked but finding out if I am in the right group didnt work out.

After several tries of login log out, it finally works. but when I quit the browser I get into the same problem again.


Here's my code:

{cms_module module=FrontEndUsers} 
{cms_module module=CustomContent} 
{if $customcontent_memberof_beheer}
Klik hier om verder te gaan



{else}
U dient als beheerder eerst in te loggen voor u verder mag
{/if}

I also UN chekced the Use in cache radio button on the options of the page.

Any tips for this problem?


Stef

Re: Front-End user

Posted: Fri Apr 27, 2007 3:06 pm
by alby
stefsegers wrote: Hi Alby,

Thanks for the support. I found it!

I still have a nother question but I don't know if I should put it in a new thread?

Anyhow, the problem is that when I try to login to for example, beheer, I get the following problem.
------------
When I login I get: welcome userX  Log out

U need to login bla bla

It looks that login worked but finding out if I am in the right group didnt work out.

After several tries of login log out, it finally works. but when I quit the browser I get into the same problem again.


Here's my code:

{cms_module module=FrontEndUsers} 
{cms_module module=CustomContent} 
{if $customcontent_memberof_beheer}
Klik hier om verder te gaan



{else}
U dient als beheerder eerst in te loggen voor u verder mag
{/if}

I also UN chekced the Use in cache radio button on the options of the page.

Any tips for this problem?
Correct sintax is:

Code: Select all

{cms_module module=CustomContent}
{if $customcontent_loggedin > 0}
  {if isset($customcontent_memberof_beheer)}
<a href="index.php?page=beheer-huisvesting-planning">Klik hier om verder te gaan</a><br />
<br />
  {else}
<h1>U dient als beheerder eerst in te loggen voor u verder mag</h1>
  {/if}
{/if}
Alby

Re: Front-End user

Posted: Fri Apr 27, 2007 6:28 pm
by stefsegers
Hey Alby,

It still doesnt' work. When I copy paste your code I get a blank page without the login.

I saw that you left out the FrontEndUsers. But I need this on my page to login.

Maybe I am wrong all about it, but I need a page with login and when your login is successfull I would like to (automaticly) continue to the next page (2 for example).

So I made page A and page A sub

on page A, I placed the FrontEndUsers and CustomContent with the link to the next page.

Maybe I did this wrong and there's a better way?

For now also user can login but if this users is on the page that's not for him he still doesn't get the click here to continue link.

That fact is that I have 4 different pages for 4 different usersgroups. Every group has his own page. So I made a page A for login and when login is successfull a link to A sub (which doesn't work every time.

Stef

Re: Front-End user

Posted: Fri Apr 27, 2007 8:49 pm
by alby
stefsegers wrote: I saw that you left out the FrontEndUsers. But I need this on my page to login.
My mistake with copy and paste :-\

stefsegers wrote: Maybe I am wrong all about it, but I need a page with login and when your login is successfull I would like to (automaticly) continue to the next page (2 for example).

So I made page A and page A sub

on page A, I placed the FrontEndUsers and CustomContent with the link to the next page.

Maybe I did this wrong and there's a better way?
In Preferences (in Frontend User Management) there is a field:
PageID/Alias to jump to after login *
NOTE *:
* The following macros can be used in these fields: {$username},{$group}. When using the {$group} macro, the system will subsitute the name of the first member group that the user belongs to, and will redirect to that page.

Add new pages with alias $group (ex: beheer)  8) but no responsability if not working  ::)

Alby

Re: Front-End user

Posted: Sat Apr 28, 2007 6:38 am
by stefsegers
Hey Alby,

Still a little confused
alby wrote:
In Preferences (in Frontend User Management) there is a field:
PageID/Alias to jump to after login *
NOTE *:
* The following macros can be used in these fields: {$username},{$group}. When using the {$group} macro, the system will subsitute the name of the first member group that the user belongs to, and will redirect to that page.

Add new pages with alias $group (ex: beheer)  8) but no responsability if not working  ::)
I have 4 groups and each group can login into it own page.
For what I see it looks like I can login to a page automaticly after a good login. But every groups has it's own page after succesfull login.

Maybe I explained it wrong?
www.stagedesk.nl is the website I am telling about.

As you can see there are 4 pages on Home that go to a login page. (1 is hidden in the left)
After a succesfull login (ex: Bewoners login -> username: bewoner pw: toegang) you get a link to continue, if it works right.
If you login as another user (stagiair/toegang) on that same page you should get an error that this page is only available for bewoner. The same is for the stagiair login and the other groups on there own pages.

As you can see it works after several times trying.

Stef

Re: Front-End user

Posted: Sat Apr 28, 2007 7:58 am
by alby
stefsegers wrote: Hey Alby,

Still a little confused
alby wrote:
In Preferences (in Frontend User Management) there is a field:
PageID/Alias to jump to after login *
NOTE *:
* The following macros can be used in these fields: {$username},{$group}. When using the {$group} macro, the system will subsitute the name of the first member group that the user belongs to, and will redirect to that page.

Add new pages with alias $group (ex: beheer)  8) but no responsability if not working  ::)
I have 4 groups and each group can login into it own page.
For what I see it looks like I can login to a page automaticly after a good login. But every groups has it's own page after succesfull login.

Maybe I explained it wrong?
www.stagedesk.nl is the website I am telling about.

As you can see there are 4 pages on Home that go to a login page. (1 is hidden in the left)
After a succesfull login (ex: Bewoners login -> username: bewoner pw: toegang) you get a link to continue, if it works right.
If you login as another user (stagiair/toegang) on that same page you should get an error that this page is only available for bewoner. The same is for the stagiair login and the other groups on there own pages.

As you can see it works after several times trying.
Trick in Preferences explains:
- a login page only for all groups
- if login with bewoner-toegang you are redirect (automatic) in page huurdersprocedure (no link necessary or mistake login page)
  if login with stagiair-toegang you are redirect (in automatic) in page stagiair-gegevens
  .......

but you can use the method that you want  ;D

Alby

Re: Front-End user

Posted: Sun Apr 29, 2007 8:17 am
by stefsegers
Hi Alby,

I get the point. It seems that I only have to make 1 loginpage and set it to forward to the desired page depending on the user/group.

So now I made a loginpage and entereed the following info:

Loginpagina

{cms_module module=FrontEndUsers}
{cms_module module=CustomContent}

{if $customcontent_memberof_bewoners}
Klik hier om verder te gaan

{if $customcontent_memberof_stagiars}
Klik hier om verder te gaan

{if $customcontent_memberof_beheer}
Klik hier om verder te gaan

{if $customcontent_memberof_bedrijven}
Klik hier om verder te gaan

{else}
U dient eerst in te loggen voor u verder mag
{/if}


------------

When I save I get all kinds of errors. When I try to see what the age looks like I get the following error
string(134) "Smarty error: [in content:content_en line 20]: syntax error: unclosed tag {if} (opened line 12). (Smarty_Compiler.class.php, line 320)"

Also what info do I need to enter at the setting tab of FrontEndUsers to automaticly forward to the page of the user? (PageID/alias to show after login?

(sorry for all my questions but I am a newbie on PHP and CMS)
Stef

Re: Front-End user

Posted: Sun Apr 29, 2007 1:02 pm
by alby
stefsegers wrote: I get the point. It seems that I only have to make 1 loginpage and set it to forward to the desired page depending on the user/group.
OK, but trick was an other method. Follow me:

1. Login page:
{cms_module module=FrontEndUsers}


2. Four templates (ex: XXXXX-template) same code of your page template (and stylesheet associations) but replace:
{content}
with:
{cms_module module=CustomContent}
{if $customcontent_loggedin > 0}
  {if isset($customcontent_memberof_XXXXX)}
    {content}
  {else}
    U dient eerst in te loggen voor u verder mag
  {/if}
{/if}

where XXXXX is:
bewoners
stagiars
beheer
bedrijven


3. Four page with alias:
bewoners-access
stagiars-access
beheer-access
bedrijven-access
with RELATIVE template (ex: bewoners-access with bewoners-template)

Point 2 and 3 are important for denied access directly page (ex: I see http://www.stagedesk.nl/index.php?page=stagiair-vinden without registration)


4. In Preferences (in Frontend User Management) in field PageID/Alias to jump to after login insert:
{$group}-access


5. In Preferences (in Frontend User Management) in field PageID/Alias to jump to after logout insert:
home (or other default page)


6. For every page under a group, use relative template. Now a login (in login page) in group beheer will be redirect automatically in page beheer-access (no link necessary)


For your method: for every open if tag there is a close if tag {/if} or {elseif} or {else}
Therefore:

Code: Select all

{cms_module module=FrontEndUsers} 
{cms_module module=CustomContent} 

{if isset($customcontent_memberof_bewoners)}
  <a href="index.php?page=huurdersprocedure">Klik hier om verder te gaan</a>

{elseif isset($customcontent_memberof_stagiars)}
  <a href="index.php?page=stagiair-gegevens">Klik hier om verder te gaan</a>

{elseif isset($customcontent_memberof_beheer)}
  <a href="index.php?page=beheer-huisvesting-planning">Klik hier om verder te gaan</a>

{elseif isset($customcontent_memberof_bedrijven)}
  <a href="index.php?page=stagiair-vinden">Klik hier om verder te gaan</a>

{else}
  <h1>U dient eerst in te loggen voor u verder mag</h1>

{/if}
Alby

Re: Front-End user

Posted: Tue May 01, 2007 7:07 pm
by stefsegers
Hey alby,

I'll hope to make it work. I am going to try it the end of this week and will keep you posted

Stef