News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Need some1 to add a extra button/tab to my theme???

Started by kris1903, March 21, 2009, 10:02:21 AM

Previous topic - Next topic

kris1903

Need some1 to add a extra button/tab to my theme???

Need some1 to add an extra button to my theme? any1 do it for me? :D

cme1st2302

I can try an help you out.  Looks like you are running 2.X so attach you subs.php file and I will give it a shot.

Chris
SMF Version: 1.1.11
SimplePortal Version: 2.3.2

Admin

He who waits for perfect conditions sees nothing!!
If you need help adding a button or tab PM me!!

kris1903

thank you. ice attached the subs.php and also the index template. i want it after the home button. Thanks.

The button needs to say "Main Site" and link to "http://www.modified-scotland.com"

cme1st2302

Try the attached file out and see if it works for ya.  You will have to add this line of code into your modifications.english.php file which is located in the default themes language folder.

$txt['main'] = 'Main Site';

Let me know how ya make out,
Chris

SMF Version: 1.1.11
SimplePortal Version: 2.3.2

Admin

He who waits for perfect conditions sees nothing!!
If you need help adding a button or tab PM me!!

kris1903

Dosnt Work.

Right

ive added

'Main Site' => array(
            'title' => $txt['Main Site'],
            'href' => 'http://www.modified-scotland.com',
            'show' => true,
            'sub_buttons' => array(
            ),
         ),


to subs.php

Now what do i do?

Yağız...

Try to replace this: $txt['Main Site'] with this: $txt['main']


Yağız...

Quote from: cme1st2302 on March 21, 2009, 11:31:46 AM
You will have to add this line of code into your modifications.english.php file which is located in the default themes language folder.
$txt['main'] = 'Main Site';
Did you make this change? If not, the button will not appear.

kris1903

ive done the subs.php stuff
now i need to add it to the forum..

the code which makes home, help etc show up is this

echo '<td id="home"><a href="', $scripturl, '?action=forum"><span>' ,$txt['home'], '</span></a></td>';
echo '<td id="help"><a href="', $scripturl, '?action=help"><span>' , $txt['help'] , '</span></a></td>';
if ($context['allow_search'])
echo '<td id="search"><a href="', $scripturl, '?action=search"><span>' , $txt['search'] , '</span></a></td>';
if ($context['allow_calendar'])
echo '<td id="calendar"><a href="', $scripturl, '?action=calendar"><span>' , $txt['calendar'] , '</span></a></td>';


What do i have to add in to get "main Site" button to show?

kris1903

Quote from: Yağız... on March 21, 2009, 11:48:33 AM
Quote from: cme1st2302 on March 21, 2009, 11:31:46 AM
You will have to add this line of code into your modifications.english.php file which is located in the default themes language folder.
$txt['main'] = 'Main Site';
Did you do this change? If not, the button will not appear.

nope, ill go do it, and see if it works


kris1903

I really cant get this to work :'( :'( :'( :'( :'( :'(

If you give me a list o ffiles you need. ill upload them and you can edit them for me? is that ok? thanks 8)

Yağız...

Attach your index.template.php who is located in your theme folder.


Yağız...





Yağız...

Try to change $txt['main'] = 'Main Site'; with $txt['main'] = 'Site';


Advertisement: