forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 modpack by Stramm => Topic started by: Mimer on October 22, 2007, 03:55:40 pm

Title: Problem placing LOGIN_FORM in Hardwired Theme
Post by: Mimer on October 22, 2007, 03:55:40 pm
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 (http://fjotte.dk/gal_da/index.php)

From template.html:
Code: [Select]
    <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:
Code: [Select]
Error
You are already logged in !


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

From theme.php:
Code: [Select]
<!-- 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
Title: Re: Problem placing LOGIN_FORM in Hardwired Theme
Post by: 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.

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).
Title: Re: Problem placing LOGIN_FORM in Hardwired Theme
Post by: Mimer on October 28, 2007, 12:32:52 am
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)
Title: Re: Problem placing LOGIN_FORM in Hardwired Theme
Post by: Stramm on October 29, 2007, 09:59:08 am
look for the function loginForm in include/themes.inc.php. Copy it to your theme.php and there modify it to your needs
Title: Re: Problem placing LOGIN_FORM in Hardwired Theme
Post by: Mimer on October 29, 2007, 01:51:31 pm
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)
Title: Re: Problem placing LOGIN_FORM in Hardwired Theme
Post by: Stramm on October 29, 2007, 02:50:37 pm
yes, as usual ;)