[x] Contributions
Due Date: Feb 29
February Goal: 50.00
Gross Amount: 0.00
PayPal Fees: 0.00
Net Balance: 0.00
Below Goal: 50.00
Site Currency: USD
 0%

[x] Main Menu

[x] User Info

Welcome Anonymous

Nickname
Password

Membership:
Latest: GalloInfligo
New Today: 0
New Yesterday: 0
Overall: 13

People Online:
Members: 0
Visitors: 1
Total: 1
Who Is Where:
 Visitors:
01: Support Forums

Staff Online:

No staff members are online!

[x] Preview theme
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.

[x] Shopping Cart
Your cart is empty.

[ Browse ]

Login form in Header

Author Message
rlgura
Site Admin


Joined: Dec 13, 2007
Posts: 25
Location: Cleveland, OH USA

PostPost subject: Login form in Header
Posted: Sat Jun 20, 2009 2:05 am
Reply with quote

[Thanks to DJDevon for compiling this info]

Add to header.html where you want the login form.

Array:
<!-- IF S_IS_USER -->
{WELCOME}
<!-- ELSE -->
<form action="" method="post" enctype="multipart/form-data" accept-charset="utf-8">
	<input type="text" class="headerlogin" id="ulogin" name="ulogin" size="14" maxlength="25" />
	<input type="password" class="headerlogin" id="user_password" name="user_password" size="8" maxlength="15" />
	<input type="submit" value="Login" /></form>
<!-- ENDIF -->

Add the global for userinfo in function themeheader() in theme.php
It should look something like this:
Array:
function themeheader() {
	global $slogan, $sitename, $banners, $mainindex, $adminindex, $cpgtpl, $site_logo, $CPG_SESS, $userinfo;

and assign the WELCOME variable in theme.php
This will show a welcome message if someone is already logged in.
Array:
'WELCOME'      => is_user() ? 'Welcome '.$userinfo['username'] : 'Welcome '._ANONYMOUS,

_________________
Site Admin - Great Lakes Web Designs
Theme Designer - WebSite Guru Designs
Site Admin - Families with Food Allergies
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page    Forum Index Dragonfly Theming Tips & Tricks
Page 1 of 1
All times are GMT



Jump to:  


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster
Interactive software released under GNU GPL, Code Credits, Privacy Policy