News:

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

Main Menu

google pub

Started by guxo, April 26, 2006, 04:29:34 PM

Previous topic - Next topic

guxo

i would like to get a banner from googleads on my forum..
does anyone know how..
i want to get that adv on index.template.php file... next to de logo.
logo on the left, google banner on the right.

jerm

your post makes it sound like you dont have a google adsense account
if not
www.google.com/adsense

if you do, you put your code in here
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="catbg" height="32">';

if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">', $context['forum_name'], '</span>';
else
echo '
<img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" />';

echo '
</td>
</tr>
</table>';

guxo

i've try that already.. but i get an error message when i reload the website.

jerm

post the code you used, and a few lines before and after. it would help us solve your problem

guxo

// This part is the logo and forum name.  You should be able to change this to whatever you want...
   echo '
               <img src="', $settings['images_url'], '/logo.png" width="400" style="float: left;" alt="" />
               <span style="font-family: Georgia, sans-serif; font-size: xx-large;"></span>';
               <script type="text/javascript"><!--
                  google_ad_client = "pub-5286508376448014";
                  google_ad_width = 468;
                  google_ad_height = 60;
                  google_ad_format = "468x60_as";
                  google_ad_type = "text_image";
                  google_ad_channel ="";
                  google_color_border = "336699";
                  google_color_bg = "FFFFFF";
                  google_color_link = "0000FF";
                  google_color_url = "008000";
                  google_color_text = "000000";
               //--></script>
               <script type="text/javascript"
                 src="hxxp:pagead2.googlesyndication.com/pagead/show_ads.js [nonactive]">
               </script>

vbgamer45

You didn't have your google code inside the echo statement
It should look like this
  echo '
               <img src="', $settings['images_url'], '/logo.png" width="400" style="float: left;" alt="" />
               <span style="font-family: Georgia, sans-serif; font-size: xx-large;"></span>
               <script type="text/javascript"><!--
                  google_ad_client = "pub-5286508376448014";
                  google_ad_width = 468;
                  google_ad_height = 60;
                  google_ad_format = "468x60_as";
                  google_ad_type = "text_image";
                  google_ad_channel ="";
                  google_color_border = "336699";
                  google_color_bg = "FFFFFF";
                  google_color_link = "0000FF";
                  google_color_url = "008000";
                  google_color_text = "000000";
               //--></script>
               <script type="text/javascript"
                 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
               </script>';
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

jerm

this line
    <img src="', $settings['images_url'], '/logo.png" width="400" style="float: left;" alt="" />
should look like this:
    <img src="', $settings['images_url'], '"/logo.png" width="400" style="float: left;" alt="" />

guxo

QuoteTemplate Parse Error!
There was a problem loading the /Themes/default/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.


it does not work..

// This part is the logo and forum name.  You should be able to change this to whatever you want...
echo '
<img src="', $settings['images_url'], '"/logo.png" width="400" style="float: left;" alt="" />
<span style="font-family: Georgia, sans-serif; font-size: xx-large;"></span>'
                <script type="text/javascript"><!--
                  google_ad_client = "pub-5286508376448014";
                  google_ad_width = 468;
                  google_ad_height = 60;
                  google_ad_format = "468x60_as";
                  google_ad_type = "text_image";
                  google_ad_channel ="";
                  google_color_border = "336699";
                  google_color_bg = "FFFFFF";
                  google_color_link = "0000FF";
                  google_color_url = "008000";
                  google_color_text = "000000";
              //--></script>
                <script type="text/javascript"
                  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
                </script>';



i'm usig SMF 1.0.7

guxo

Quote from: electrohome on April 27, 2006, 01:38:53 PM
this line
    <img src="', $settings['images_url'], '/logo.png" width="400" style="float: left;" alt="" />
should look like this:
    <img src="', $settings['images_url'], '"/logo.png" width="400" style="float: left;" alt="" />

it does not work like that..

Beth182005

sorry for interrupting,but what about having it toward the bottom and not in the them?i mean i'm getting a look like forum.bryandattiloonline.net [nofollow] and i don't want mine at the top,mine at the lower buttom like inbetween where it shows what users are online and the little boarder that says the well whatever.

sorry if i'm in the wrong place.

vbgamer45

Find </span>'
Change it to </span>
You had an extra ' in the code.

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

mrloo2k4

I think I messed up by using the code.  can someone help me with this? If you want to have a look at my site, here it is:  www.ofwportal.com/forum

thanks for the help

Leipe Po

There is only one thing more importend to me then coding:
My Girlfriend

Microsoft - "You've got questions.  We've got dancing paperclips."

mrloo2k4

it doesn't look nice.  I used to have a logo instead of that OFW Community Forum.

What I'd like to do is logo at the left and beside it is the Google Ads.

And when I open a PHP file in a notepad, the language is mixed up.  is there an editor specifically for PHP?

thanks for the help.

Leipe Po

i reccommend notepad, notepad++ or context, if it doesnt look good in notepad, open it in wordpad.
There is only one thing more importend to me then coding:
My Girlfriend

Microsoft - "You've got questions.  We've got dancing paperclips."

mrloo2k4

wordpad is much better.

going back to the main topic, how do I make the logo at the left and beside it is the Google Ads?

Advertisement: