creating a session in the front end

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.
Post Reply
scotch33
Dev Team Member
Dev Team Member
Posts: 285
Joined: Tue Feb 14, 2006 9:56 pm

creating a session in the front end

Post by scotch33 »

I have a site that has a login area that is (for reasons not relavant here) not part of CMSMS.

However, once the user is logged in, they occasionally move into the pages that are controlled by CMSMS.  In the pages there are two elements i would like to hide to logged in users (the login form and the register button - both html in the template and not controlled by cmsms)

I have created a user tag {session} which I am calling at the top of the template as follows -

session_start();
$showstuff ="yes";
if ($_SESSION['hav_logged_in'] == 'true') {
$showstuff = "no";
}

the idea being that I can then create smarties to show the html elements accordingly using the $showstuff variable as a control.

However, the session is not working.

Can anyone help on this?  Is there a CMSMS frontend session that is part of the system which could be creating the issue?

thanks

John
Pierre M.

Re: creating a session in the front end

Post by Pierre M. »

Hello,

you haven't found the FrontEnd Users (FEU) module yet, have you ?
Nor CustomContent ? Which could integrate calls to your other system's content.

Pierre M.
scotch33
Dev Team Member
Dev Team Member
Posts: 285
Joined: Tue Feb 14, 2006 9:56 pm

Re: creating a session in the front end

Post by scotch33 »

hi,

yes I have, and have used it on a number of sites over the past couple of years - its not appropriate for this site - thus my question as above.  Thanks for the tip - but FEU is no use to me on this one - unless it can be used as a way of simply opening a session that will allow me to refer to my existing session as created in the external system I am using.

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

Re: creating a session in the front end

Post by calguy1000 »

Have you looked at the smarty manual at http://smarty.php.net/manual/en
smarty has access to all of the variables you can get in php.

Also, CMS Made Simple does a session_start() automatically.
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.
scotch33
Dev Team Member
Dev Team Member
Posts: 285
Joined: Tue Feb 14, 2006 9:56 pm

Re: creating a session in the front end

Post by scotch33 »

thanks!  Will take a look.
beamer

Re: creating a session in the front end

Post by beamer »

Hi,

Did you get this problem resolved?  I'm having the exact same issue and am having no success in resolving it.

Ideas greatfully accepted!!

Thanks!
beamer

Re: creating a session in the front end

Post by beamer »

Post Reply

Return to “CMSMS Core”