News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Edit menu bar

Started by shade3134, June 24, 2010, 03:36:05 AM

Previous topic - Next topic

shade3134

How do I edit the menu bar? I want to change the list and order to "News, Forum, Lyrics, Messages, Profile, Seach, Login/Logout".

I'm looking at the index.template.php but don't know what to do.

I'm using SMF 2.0 RC3

Kill Em All

It has chanced in 2.0. In your Sources directory, look in your Subs.php


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

shade3134

I see. I looked for my sources directory but can't find it. My theme is 'Custom theme based on default'. Eitherway, I can't find it under the default theme either. Where is it?

Kill Em All

You aren't looking in your Sources directory then....

the Sources directory isn't in the Themes folder, its in the root of your SMF install.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

CapadY

/sourses/subs.php nearly at the bottom of that file.
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

PurpleCrow

SMF 2.0 RC3

Looking for staff!

Forums Galore, a brand new Admin Forum is looking for staff to help with the launch. Send me a PM or sign up to Forums Galore if you're interested!

Add your forum to the Forums Galore Community Showcase

shade3134

Thanks everyone! However the buttons aren't showing up yet when I hover or click them, they link me to the appropriate area. It's just that I can't see them:

$buttons = array(
'News' => array(
'title' => $txt['News'],
'href' => 'http://sofarhome.com',
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
// 'target' => '_blank',
),
'Forum' => array(
            'title' => $txt['Forum'],
            'href' => 'http://sofarhome.com/chat',
            'show' => true,
            'sub_buttons' => array(
            ),
         ),
'Lyrics' => array(
            'title' => $txt['Lyrics'],
            'href' => 'http://sofarhome.com/lyrics',
            'show' => true,
            'sub_buttons' => array(
            ),
         ),


Also, how do I spread them out and up their scale?

shade3134

You can view my forum: www.sofarhome.com/chat

And scroll your cursor in the menu bar area and you'll notice there's invisible links. Hmmm...Anyone know what's going on?

shade3134

Bump. Come on, someone here has to know.  :(

CapadY

Look what happens if you empty your forum cache.
Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

Kill Em All

Might want to try clearing your browsers cookies and cache to.

And please do not bump your topics less than 24 hours old, we are all volunteers here.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

shade3134

Sorry about the bump. I cleared my cache and it still looks like this:


Kill Em All

Please attach your Subs.php so we can take a look at it. :)


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

JBlaze

Clear your forum cache (Admin -> Maintenance -> Routine -> Empty cache) as well and make sure you added $txt['Links'] to ./Themes/default/languages/Modifications.{your_lang}.php
Jason Clemons
Former Team Member 2009 - 2012

shade3134

I somehow got the first button to work:



And I've cleared my forum as well as browser cache a bazillion times. lol

See the highlighted invisible button at the back? What is that and how do I remove that?


Here's my subs attachment:




JBlaze

Did you read the second part of my post?

Did you add $txt['Lyrics'] = 'Lyrics'; to ./Themes/default/languages/Modifications.english.php ?
Jason Clemons
Former Team Member 2009 - 2012

shade3134

No, sorry. I've give that a try.

shade3134

Am I supposed to place it underneath:

// Important! Before editing these language files please read the text at the top of index.english.php.
$txt['no_icon'] = 'No icon set';


If so this is what I did:

<?php
// Version: 2.0 RC3; Modifications

// Important! Before editing these language files please read the text at the top of index.english.php.
$txt['no_icon'] = 'No icon set';
$txt['Lyrics'] = 'Lyrics';   
?>


Uploaded, refreshed and nothing.

JBlaze

OK, I'll outline it for you.

1. Add $txt['Lyrics'] = 'Lyrics'; on the line before the closing ?>
2. Go to Admin -> Maintenance -> Routine -> Empty file cache
3. Check your menu.
Jason Clemons
Former Team Member 2009 - 2012

shade3134

It is on the line before ?> right? On the same line? Because it is on the line before..

JBlaze

Code (find) Select
?>
Code (replace with) Select
$txt['Lyrics'] = 'Lyrics';
?>
Jason Clemons
Former Team Member 2009 - 2012

shade3134

Hmmm...That's exactly how my code look:

<?php
// Version: 2.0 RC3; Modifications

// Important! Before editing these language files please read the text at the top of index.english.php.
$txt['no_icon'] = 'No icon set';
$txt['Lyrics'] = 'Lyrics';   
?>

JBlaze

Yea, so save it, then clear the forum cache. And voila!
Jason Clemons
Former Team Member 2009 - 2012

shade3134

The bar still isn't showing up. And I did the Admin> Maintenance thing.

Here's a link to my forum: http://sofarhome.com/chat/index.php

See?  :(

Antechinus

Look under server settings in your admin and see what language it says.

shade3134

#25
Doesn't say language anywhere in there:



Here is what shows under my SSI_Examples.php:


Antechinus

Sorry, I was thinking of 1.1.x. In 2.0 it's under Configuration > Languages > Settings.

shade3134


Acans

"The Book of Arantor, 17:3-5
  And I said unto him, thy database query shalt always be sent by the messenger of $smcFunc
  And $smcFunc shall protect you against injections and evil
  And so it came to pass that mysql_query was declared deprecated and even though he says he is not
  dead yet, the time was soon to come to pass when mysql_query shall be gone and no more

shade3134


shade3134

I DID IT!!! Hahahaha. It was admin.english.php AND modifications.english.php.

I downloaded the admin.english.php file to my desktop by accident and decided to open it and I saw the list!! And included the code I needed.

How do I increase the font-size of these menu buttons and spread them out?

Kill Em All

In your index.css look for:

.dropmenu a
{


add after that:
font-size: 15pt

just change 15 to whatever number you want.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

shade3134

Thanks that worked! But how to do I decrease the space between the menu bar and my banner?


Kill Em All

Can you please attach your index.template.php.

From what I can tell, it should be as simple as a line or two of code being cut. :)


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

shade3134


Kill Em All

Ah, sorry. The div tag that is contained there holds important parts of the forum such as if its in maintenance mode and such.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

shade3134

So what do I do? I forgot the setting I adjusted to get it that way. It was something relating to the space around the banner...hmm..

Kill Em All



My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

shade3134

I'm not sure what that is. But how do I compare my .php files with old ones? Like an easy way to see differences. I could find out that way...Because initially I couldn't get the banner to fit so I made space between it and the main index. It's killing me not knowing which code it is.... :-\

xenovanis

Quote from: shade3134 on June 26, 2010, 04:23:53 AM
I'm not sure what that is. But how do I compare my .php files with old ones? Like an easy way to see differences. I could find out that way...Because initially I couldn't get the banner to fit so I made space between it and the main index. It's killing me not knowing which code it is.... :-\

ConTEXT can help you comparing php files.
"Insanity: doing the same thing over and over again and expecting different results."

Advertisement: