Problem placing LOGIN_FORM in Hardwired Theme Problem placing LOGIN_FORM in Hardwired Theme
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Problem placing LOGIN_FORM in Hardwired Theme

Started by Mimer, October 22, 2007, 03:55:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mimer

Hi

I'm in the proces of adapting the Hardwired Theme to the MOD pack.
Everything is in place except the login form (and a few pictures).

Right now I have both the original login button and the login form.
http://fjotte.dk/gal_da/index.php

From template.html:
    <td class="gallery">
      <div align="right" class="topmenu"> {SYS_MENU} </div>
      <div align="left" class="topmenu">{SUB_MENU}</div>
      <div align="right" class="topmenu"> {LOGIN_FORM} </div> <br />
      <div align="center"> {LANGUAGE_SELECT_FLAGS} </div>
      <div align="center"> {THEME_SELECT_LIST} {LANGUAGE_SELECT_LIST} </div> <br />
      {ADMIN_MENU} {GALLERY}</td>


Sometimes when I use login form I get this error:
Error
You are already logged in !


If I completely remove the code for the original login button everything messes up.

From theme.php:
<!-- BEGIN login -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleft" src="themes/hardwired/images/buttonleft.gif" width="17" height="25" border="0" alt="" /></td>
                                       <td style="background: url(themes/hardwired/images/buttoncenter.gif);">
                                                <a href="{LOGIN_TGT}" title="{LOGIN_LNK}">{LOGIN_LNK}</a>
                                        </td>
                                        <td><img name="buttonright" src="themes/hardwired/images/buttonright.gif" width="7" height="25" border="0"  alt="" /></td>
<!-- END login -->
<!-- BEGIN logout -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleftout" src="themes/hardwired/images/buttonleftout.gif" width="17" height="25" border="0" alt="" /></td>
                                        <td style="background: url(themes/hardwired/images/buttoncenter.gif);">
                                                <a href="{LOGOUT_TGT}" title="{LOGOUT_LNK}">{LOGOUT_LNK}</a>
                                        </td>
                                        <td><img name="buttonright" src="themes/hardwired/images/buttonright.gif" width="7" height="25" border="0" alt="" /></td>
<!-- END logout -->


(I only removed the login part)

I would like to keep the original button and have the two fields placed beside it in the Top menu (that is {SYS_MENU}).

Can any one give me a clue where to start?

Mimer  8)

Coppermine install: http://fjotte.dk/gal_da/
Forum install: Not bridged
Coppermine version: cpg1.4.13
Forum version: Not bridged
Test user account: tester / tester

Stramm

The loginform only appeares if a user isn't logged in. Otherwise a 'welcome user' message is displayed. Therefore you can't use it anymore when logged in.

A 'Error you're already logged in' can appeare only if the login link in menu is kinda hardcoded and doesn't blend out when logged in. If that is what you mean, then this is nothing the modpack does.

And it's intended that you have both, the loginform and the button (check my demo).

Mimer

Quote from: Stramm on October 22, 2007, 04:38:43 PM
The loginform only appeares if a user isn't logged in. Otherwise a 'welcome user' message is displayed. Therefore you can't use it anymore when logged in.

Sure, I understand that. That's not what I ment.
I just want to adapt the Hardwire theme to the MOD pack.

When I said  "keep the original button" I ment the layout of the button from Hardwired theme, not keep it when logged in.

I've browsed the theme, the modpack and cpg for the login-button on the login form, I guess it's coded.

Where do I find the code for the login form?
Not to hardcode but to understand how to change the Hardwired theme.

Mimer  8)

Stramm

look for the function loginForm in include/themes.inc.php. Copy it to your theme.php and there modify it to your needs

Mimer

Great, thanks.

I'm almost finished fitting the Hardwired theme for the MOD pack.

Should I post in a new thread when ready?

Mimer  8)

Stramm