login/logout? [Mostly SOLVED]
Posted: Mon Feb 18, 2008 7:17 pm
Hello, so i am using the lastest CMSMS Have the lastest FEU and CustomContent installed and everything is working great but i tried to make a "simple" link and a bar that would show LogIN when not and Logout when logged in, thats the easy part. The part I'm having trouble with is where the LogIN links to the page that i have the FEU loacted, which works, and the logout that just logs the user off and reloads page. No luck with that side. I'll post the code...
Start at the location of link
global_content 'Login_bar'
Login template-----{cms_module module=FrontEndUsers form=login}
global_content 'Login_if1'
I have read the forums backwards and forwards and have not spotted anything like this to work off of, I can't think of an easier way to do this, I'm just stuck at the moment. I think it's mostly working but i just can't get the "LogOut" link that shows up in the page with {cms_module module=FrontEndUsers} when logged in... any help would be great... thanls all and have a great day
Start at the location of link
Code: Select all
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>{global_content name='Login_bar'}</td>
<td>{$startform}{$label}: {$inputbox}<input name="submit" value="{$submittext}" type="submit" onmousedown="javascript:toggleDiv('hideMe3')"/>{if isset($hidden)}{$hidden}{/if}{$endform}</td>
</tr>
</table>
Code: Select all
<a href="http://sjrmc.org/St_Joe_Core/index.php?page=login" target="_self" onmousedown="javascript:toggleDiv('hideMe3')"><font style="font: bold 14px Georgia, 'Times New Roman', Times, serif; color: #FFFFFF;"><strong>Account/</strong></font></a>
{cms_module module=CustomContent}
{if $ccuser->loggedin()}
{cms_module module=FrontEndUsers form=login}
{else}
<a href="http://sjrmc.org/St_Joe_Core/index.php?page=login" target="_self" onmousedown="javascript:toggleDiv('hideMe3')"><font style="font: bold 14px Georgia, 'Times New Roman', Times, serif; color: #FFFFFF;"><strong>LogIN</strong></font></a><font style="font: bold 14px Georgia, 'Times New Roman', Times, serif; color: #FFFFFF;"><strong> |</strong></font>
{/if}
Code: Select all
{global_content name='Login_if1'}
Code: Select all
{cms_module module=CustomContent}
{if $ccuser->loggedin()}
<!-- Logout form template -->
{$startform}
{$link_logout}
{$endform}
<!-- Logout form template -->
{else}
<!-- Logout form template -->
<a target="_self" href="index.php?page=registration" onmousedown="javascript:toggleDiv('hideMe3')"><font style="color: #006699"><strong>New User Registration</strong></font></a>
<div class="hr"></div>
<font size="-2">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="70%">
{$startform}
{if $error}
{$error}<br/>
{/if}
<p>{$prompt_username}:{$input_username}<br/>{$prompt_password}:
{$input_password}<br/>
{if isset($captcha)}
{$captcha_title}: <br/>{$input_captcha}<br/>
{$captcha}<br/>
<a href="http://sjrmc.org/St_Joe_Core/index.php?page=why-do-you-need-to-enter-in-this-code" target="_self" onmousedown="javascript:toggleDiv('hideMe3')">Why do you need to enter in this code?</a><br/>
{/if}
{if isset($input_rememberme)}
{$input_rememberme} {$prompt_rememberme}<br/>
{/if}
{$input_submit}<br/>
{$link_forgot}<br/>{$link_lostun}</p>
{$endform}
</font>
</td>
<td width="30%">
<img src="../Core_images/Welcome.png" width="144" height="200" alt="Welcome" />
</td>
</tr>
</table>
<!-- Logout form template -->
{/if}