Simple Machines Community Forum

General Community => Scripting Help => Aiheen aloitti: paster_cobra - syyskuu 16, 2006, 08:12:48 IP

Otsikko: PLEASE HELP WITH BUTTONS
Kirjoitti: paster_cobra - syyskuu 16, 2006, 08:12:48 IP
I am using Black Rain theme. Can someone please help me change and add buttons?
I would like to change to home button url so that it point to my site home page. Want to add forum and chat buttons. When I try I get a really small button or I get text only not the rollover button. Can some please help me please?

Otsikko: Re: PLEASE HELP WITH BUTTONS
Kirjoitti: samames - syyskuu 19, 2006, 06:03:18 AP
yer i am having the exact same problem except i want to add staff list, chat and main site buttons. Please help us :)
Otsikko: Re: PLEASE HELP WITH BUTTONS
Kirjoitti: paster_cobra - syyskuu 19, 2006, 07:42:42 AP
are you using the same theme as i am? i finally figured it out..let me know
Otsikko: Re: PLEASE HELP WITH BUTTONS
Kirjoitti: samames - syyskuu 19, 2006, 09:48:33 AP
yes i am :)
thanks in advance
Otsikko: Re: PLEASE HELP WITH BUTTONS
Kirjoitti: paster_cobra - syyskuu 19, 2006, 04:58:13 IP
// Show the menu up top.  Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

        echo '<div id="tabs6">';
         echo '<ul><li><a href="', $scripturl, '"><span>'.$txt[103].'</span></a></li>';
       echo '<li><a href="', $scripturl, '?action=help" ><span>', $txt[119], '</span></a></li>';


change to


// Show the menu up top.  Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

  echo '<div id="tabs6">';
echo '<ul><li><a href="http://home page here.com"><span>'.$txt[103].'</span></a></li>';
echo '<li><a href="', $scripturl, '?action=help" ><span>', $txt[119], '</span></a></li>';
echo '<li><a href="http://other page here.com" ><span>button name</span></a></li>';
echo '<li><a href="http://next page.com" ><span>button name</span></a></li>';


AwwLilMaggie: Changed to code boxes
Otsikko: Re: PLEASE HELP WITH BUTTONS
Kirjoitti: Gary - syyskuu 19, 2006, 09:09:37 IP
Find


         echo '<ul><li><a href="', $scripturl, '"><span>'.$txt[103].'</span></a></li>';


replace with


         echo '<ul><li><a href="URL HERE"><span>'.$txt[103].'</span></a></li>';


To add a new button, (lets say after the member list)

Find


   // the [member] list button
   if ($context['allow_memberlist'])
      echo '<li><a href="', $scripturl, '?action=mlist"><span>' , $txt[331] , '</span></a></li>';


add after


   // Hey look I added a new page
      echo '<li><a href="MY URL HERE"><span>PAGE NAME HERE</span></a></li>';


-AwwLilMaggie
Otsikko: Re: PLEASE HELP WITH BUTTONS
Kirjoitti: paster_cobra - syyskuu 19, 2006, 10:44:02 IP
thanks
Otsikko: Re: PLEASE HELP WITH BUTTONS
Kirjoitti: samames - syyskuu 20, 2006, 01:17:47 AP
thnks mate, ill let u know how i get on when i try it later
Otsikko: Re: PLEASE HELP WITH BUTTONS
Kirjoitti: samames - syyskuu 20, 2006, 04:27:00 IP
Thankyou, i did it, no problems... easy :D

Is there anyway i can centralise the buttons?
Thanks :)
Otsikko: Re: PLEASE HELP WITH BUTTONS
Kirjoitti: bayfresh - syyskuu 30, 2006, 08:26:58 IP
Lainaus käyttäjältä: samames - syyskuu 20, 2006, 04:27:00 IP
Thankyou, i did it, no problems... easy :D

Is there anyway i can centralise the buttons?
Thanks :)
Yes, by editing style.css

look for: #tabs6 a {

Place after: position: relative; left: 20px;


Good luck...
Otsikko: Re: PLEASE HELP WITH BUTTONS
Kirjoitti: samames - joulukuu 13, 2006, 07:37:15 AP
LainaaPlace after: position: relative; left: 20px;
sorry,  place what? :)
Otsikko: Re: PLEASE HELP WITH BUTTONS
Kirjoitti: bayfresh - joulukuu 22, 2006, 08:02:04 IP
Lainaus käyttäjältä: samames - joulukuu 13, 2006, 07:37:15 AP
LainaaPlace after: position: relative; left: 20px;
sorry,  place what? :)
This:

position: relative; left: 20px;