Overall_Header.tpl

This forum is now closed. Please ask all styles-related questions in the phpBB 3.0 Styles Support & Discussion Forum.
Hellspawn
Registered User
Posts: 74
Joined: Thu Nov 13, 2003 7:15 am
Contact:

Post by Hellspawn » Sun Nov 16, 2003 2:46 am

well.. I have a little problem

I made all the buttons (in Spanish of course) which would be:
FAQ
Search
Members
Usergroups
Profile
PMs
Log Out
Log In
Register

My problem lies in the Log in/Log out buttons. They are both bound to the same variable (U_LOGIN_LOGOUT) and I want to set the mainmenu to display the "Log in" button when the user is not logged, and the "Log out" button when the user is logged (of course... DOH!!! :D)... Well, that's why I wanted to add a table to specify who is logged in that moment, and if he or she has pms (because those facts are out with the graphic buttons).

How can I do to bind both buttons??

I was thinking something like this: in the switch "user logged out" insert a codeline with the LOG_IN variable (asigned to the "Log in" button), and asign the "Log out" button to the "LOGIN_LOGOUT" variable... but I guess that I would still have the "Log out" button visible even if the user was not logged.

So.. again.. i'm in your hands
:)

Thx in advance,...
Signature reset.
:evil:

User avatar
Arty
Former Team Member
Posts: 16654
Joined: Wed Mar 06, 2002 2:36 pm
Name: Vjacheslav Trushkin
Contact:

Post by Arty » Sun Nov 16, 2003 9:33 am

<!-- BEGIN switch_user_logged_in -->
here will be code for logout button
<!-- END switch_user_logged_in -->
<!-- BEGIN switch_user_logged_out -->
here will be login button
<!-- END switch_user_logged_out -->
Vjacheslav Trushkin / Arty.
Free phpBB 3.1 styles | New project: Iconify - modern SVG framework

Hellspawn
Registered User
Posts: 74
Joined: Thu Nov 13, 2003 7:15 am
Contact:

Post by Hellspawn » Sun Nov 16, 2003 4:24 pm

Using which variable?
Signature reset.
:evil:

User avatar
Arty
Former Team Member
Posts: 16654
Joined: Wed Mar 06, 2002 2:36 pm
Name: Vjacheslav Trushkin
Contact:

Post by Arty » Sun Nov 16, 2003 5:15 pm

{U_LOGIN_LOGOUT} and {L_LOGIN_LOGOUT}.

It is different if user logged in or not and those switches allow you to show different buttons
Vjacheslav Trushkin / Arty.
Free phpBB 3.1 styles | New project: Iconify - modern SVG framework

Hellspawn
Registered User
Posts: 74
Joined: Thu Nov 13, 2003 7:15 am
Contact:

Post by Hellspawn » Sun Nov 16, 2003 5:38 pm

ok
Ill try that one
Signature reset.
:evil:

Hellspawn
Registered User
Posts: 74
Joined: Thu Nov 13, 2003 7:15 am
Contact:

Post by Hellspawn » Sun Nov 16, 2003 10:36 pm

Well, I'm working on all the things u said.. but now I have a little problem..

I've been reading and reading through the variables list and I cannot find one that simply shows the nickname of the user who is logged in (I dont want the list of logged in users.. I just want to add a little text that says "HI {USERNAME}" above the LAST_VISIT_DATE and CURRENT_TIME variables)

Is there a variable to do that?
Signature reset.
:evil:

User avatar
Arty
Former Team Member
Posts: 16654
Joined: Wed Mar 06, 2002 2:36 pm
Name: Vjacheslav Trushkin
Contact:

Post by Arty » Sun Nov 16, 2003 10:40 pm

in includes/page_header.php find this:

Code: Select all

$template->assign_vars(array(
and add after it:

Code: Select all

'USERNAME' => $userdata['username'],
then you can use {USERNAME} in templates.
Vjacheslav Trushkin / Arty.
Free phpBB 3.1 styles | New project: Iconify - modern SVG framework

Hellspawn
Registered User
Posts: 74
Joined: Thu Nov 13, 2003 7:15 am
Contact:

Post by Hellspawn » Sun Nov 16, 2003 10:57 pm

Worked NICE!!

Time to go on with the rest of it
Thx
Signature reset.
:evil:

Hellspawn
Registered User
Posts: 74
Joined: Thu Nov 13, 2003 7:15 am
Contact:

Post by Hellspawn » Sun Nov 16, 2003 11:13 pm

More problems to come...

I'm working on the header, and I changed all the buttons, but i cant make the cellpic gif to appear.. so i have all buttons standing by themselves, with no stripe as a background...

if u dont understand what im saying, u can go to www.p4ad.com.ar to see it for yourself..

I'll keep working on the last thing to do meanwhile..

Thx a lot for all the help, buddy.. If I lived there I'd certainly asked u out :D :D :D


edit1: Yes, I'm a sucker.. cellpic didnt work cause the link was wrong .. fixed it already (which does not look so cool, but i have to change the logo now.. so in a little while it will be cooler than that)
Signature reset.
:evil:

Hellspawn
Registered User
Posts: 74
Joined: Thu Nov 13, 2003 7:15 am
Contact:

Post by Hellspawn » Sun Nov 16, 2003 11:31 pm

Man.. U've done it again..

Now it's perfect (i have many things left to mod, but they are all "image" related, so all i have to do is start working on that...

Thx again, mr. alien, U've been VERY helpful.
Signature reset.
:evil:

User avatar
Tia
Registered User
Posts: 141
Joined: Mon May 19, 2003 4:21 am

change 1 line to 2?

Post by Tia » Tue Nov 18, 2003 5:06 am

Hi, this topic has been very helpful thus far but I need some further info...

I used the appropriate code supplied on page one to create the following:
-move Site Title & Description under Logo
-move FAQ-thru-Login under Site Description on 1 line

First question...
But I'd like to add a second line to move Profile-thru-Login under FAQ-thru-Usergroups. (as it is here on this forum) How would I go about doing this?

Thanks in advance. :wink:

The Other Guy
Registered User
Posts: 33
Joined: Mon Mar 24, 2003 3:55 am
Location: Here
Contact:

Post by The Other Guy » Tue Nov 18, 2003 5:06 am

You can also use the <!-- BEGIN/END switch_user_logged_in/out --> stuff to change whether Register and Profile show or not.
Er... yeah.

User avatar
Tia
Registered User
Posts: 141
Joined: Mon May 19, 2003 4:21 am

Post by Tia » Wed Nov 19, 2003 9:00 am

Can anyone help? I'd also like to be able to get rid of the text: "Site Name & Description"
Thanks,
:?

User avatar
Arty
Former Team Member
Posts: 16654
Joined: Wed Mar 06, 2002 2:36 pm
Name: Vjacheslav Trushkin
Contact:

Post by Arty » Wed Nov 19, 2003 9:06 am

in overall_header.tpl replace everything after <body> with this:

Code: Select all

<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}" />

<a name="top"></a>

<table width="100%" cellspacing="0" cellpadding="10" border="0" align="center"> 
	<tr> 
		<td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0">
			<tr> 
				<td align="center"><a href="{U_INDEX}"><img src="templates/subSilver/images/logo_phpBB.gif" border="0" alt="{L_INDEX}" vspace="1" /></a></td>
			</tr>
			<tr>
				<td align="center" valign="middle"><span class="gensmall"><br /></span><span class="maintitle">{SITENAME}</span><br /><span class="gen">{SITE_DESCRIPTION}</span><br /><span class="gensmall"><br /></span></td>
			</tr>
			<tr>
				<td align="center" valign="middle"><table cellspacing="0" cellpadding="2" border="0">
					<tr> 
						<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;nbsp;<a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu">&nbsp;nbsp; &nbsp;nbsp;<a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a>&nbsp;nbsp; &nbsp;nbsp;<a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a>&nbsp;nbsp; &nbsp;nbsp;<a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>&nbsp;nbsp; 
						<!-- BEGIN switch_user_logged_out -->
						&nbsp;nbsp;<a href="{U_REGISTER}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_register.gif" width="12" height="13" border="0" alt="{L_REGISTER}" hspace="3" />{L_REGISTER}</a></span>&nbsp;nbsp;
						<!-- END switch_user_logged_out -->
						</td>
						<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;nbsp;<a href="{U_PROFILE}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a>&nbsp;nbsp; &nbsp;nbsp;<a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a>&nbsp;nbsp; &nbsp;nbsp;<a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a>&nbsp;nbsp;</span></td>
					</tr>
				</table></td>
			</tr>
		</table>

		<br />

Vjacheslav Trushkin / Arty.
Free phpBB 3.1 styles | New project: Iconify - modern SVG framework

User avatar
Tia
Registered User
Posts: 141
Joined: Mon May 19, 2003 4:21 am

Post by Tia » Thu Nov 20, 2003 2:23 am

Ut oh... that created a few problems...

It still center displays the Site Name & Description as well as the FAQ-thru-LOGIN links and images in one row but now there's text in between them.

Looks like this:

Site Name
Site Description
nbsp;FAQ nbsp; nbsp;Search nbsp; nbsp;Memberlist nbsp; nbsp;Usergroups nbsp; nbsp;Register nbsp; nbsp;Profile nbsp; nbsp;Log in to check your private messages nbsp; nbsp;Log in nbsp;

I replaced the previous code with the code above provided. What may have happened?

Thanks for your help,
:wink:

Locked

Return to “[2.0.x] Styles Development & Discussion”