Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: Miles Marshall - lokakuu 20, 2008, 07:45:51 IP

Otsikko: Adding a Donate button to header!
Kirjoitti: Miles Marshall - lokakuu 20, 2008, 07:45:51 IP
How do I add a donate button to the header like shown in the below picture
Otsikko: Re: Adding a Donate button to header!
Kirjoitti: vbgamer45 - lokakuu 20, 2008, 09:30:48 IP
You would add it to the index.template.php of your theme in the template_above function.
Otsikko: Re: Adding a Donate button to header!
Kirjoitti: Miles Marshall - lokakuu 21, 2008, 01:48:41 IP
So do  a search for theme_above. Then add the paypal code they give me in the spot? I'm afraid i'll brake somthing
Otsikko: Re: Adding a Donate button to header!
Kirjoitti: [SiNaN] - lokakuu 25, 2008, 06:19:32 AP
index.template.php

Find:

// If the user is logged in, display stuff like their name, new messages, etc.

Replace:

echo '
<div style="float: right;">
PAYPAL CODES HERE
</div>';

// If the user is logged in, display stuff like their name, new messages, etc.
Otsikko: Re: Adding a Donate button to header!
Kirjoitti: vwf - lokakuu 25, 2008, 03:35:44 IP
Lainaus käyttäjältä: [SiNaN] - lokakuu 25, 2008, 06:19:32 AP
index.template.php

Find:

// If the user is logged in, display stuff like their name, new messages, etc.

Replace:

echo '
<div style="float: right;">
PAYPAL CODES HERE
</div>';

// If the user is logged in, display stuff like their name, new messages, etc.


You are a genius [SiNaN], you helped me too except I didn't add a donate button, I added an ad banner.
Thanks!

http://verizonwirelessforum.com
Otsikko: Re: Adding a Donate button to header!
Kirjoitti: chrisg2010 - lokakuu 25, 2008, 08:27:26 IP
It would be ALOT easier to use the Ad modification ;) It has that spot along with 12 other spots.
Otsikko: Re: Adding a Donate button to header!
Kirjoitti: vwf - lokakuu 25, 2008, 08:45:55 IP
Lainaus käyttäjältä: chrisg2010 - lokakuu 25, 2008, 08:27:26 IP
It would be ALOT easier to use the Ad modification ;) It has that spot along with 12 other spots.

I would've but I can't get the ad mod to install correctly.
Otsikko: Re: Adding a Donate button to header!
Kirjoitti: chrisg2010 - lokakuu 25, 2008, 08:48:36 IP
What kind of error do you get? I installed it on my forum fine. I am just having trouble installing it on my new skin. :P
Otsikko: Re: Adding a Donate button to header!
Kirjoitti: vwf - lokakuu 25, 2008, 09:11:48 IP
It
Lainaus käyttäjältä: chrisg2010 - lokakuu 25, 2008, 08:48:36 IP
What kind of error do you get? I installed it on my forum fine. I am just having trouble installing it on my new skin. :P

It installs fine for me too, but it's not showing up under my Configuration panel.
Otsikko: Re: Adding a Donate button to header!
Kirjoitti: aspenangler - heinäkuu 06, 2011, 02:57:35 IP
Is that the same place that it would be added in the Babylon theme? This is what I have:


// If the user is logged in, display stuff like their name, new messages, etc.
   if ($context['user']['is_logged'])
   {
      echo '
                     ', $txt['hello_member'], ' <b>', $context['user']['name'], '</b>';