News:

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

Main Menu

Google AdSense in SMF, various positions...

Started by Moonray, September 25, 2005, 11:46:56 PM

Previous topic - Next topic

ɔɔɔɔɔɔuɥoɾ

their are several ways to add ads, like some of the ad mods here or even portal blocks (html blocks)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

xpubstargamingx

Quote from: JohnCcCcCc on August 12, 2010, 01:37:49 PM
their are several ways to add ads, like some of the ad mods here or even portal blocks (html blocks)

I don't know how to install any of the Ad Mods, I am looking to just add the script to my index.template.php if possible. Realy whatever will help me receive the most impressions on my forums.

ɔɔɔɔɔɔuɥoɾ

Well if you want to do it manually then you need to tell us where you want the ad to be placed.


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

xpubstargamingx

Quote from: JohnCcCcCc on August 12, 2010, 01:59:29 PM
Well if you want to do it manually then you need to tell us where you want the ad to be placed.

I am thinking here if possible...





ɔɔɔɔɔɔuɥoɾ

Your running SMF 1.1 or SMF 2 RC3 core theme ?


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

xpubstargamingx

Quote from: JohnCcCcCc on August 12, 2010, 02:33:43 PM
Your running SMF 1.1 or SMF 2 RC3 core theme ?

I am using SMF 1.1.11

Default-copy (1.1.5) Theme

Any help would be greatly appreciated. Thanks in advance to anyone that offers help.

ɔɔɔɔɔɔuɥoɾ

Quote from: xpubstargamingx on August 14, 2010, 12:52:34 AM
Quote from: JohnCcCcCc on August 12, 2010, 02:33:43 PM
Your running SMF 1.1 or SMF 2 RC3 core theme ?

I am using SMF 1.1.11

Default-copy (1.1.5) Theme

Any help would be greatly appreciated. Thanks in advance to anyone that offers help.

Would you like it for guests only or for everybody?


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

xpubstargamingx

Quote from: JohnCcCcCc on August 14, 2010, 12:01:13 PM
Quote from: xpubstargamingx on August 14, 2010, 12:52:34 AM
Quote from: JohnCcCcCc on August 12, 2010, 02:33:43 PM
Your running SMF 1.1 or SMF 2 RC3 core theme ?

I am using SMF 1.1.11

Default-copy (1.1.5) Theme

Any help would be greatly appreciated. Thanks in advance to anyone that offers help.

Would you like it for guests only or for everybody?

I would like for the Ads to show for everyone that visits the forum.

ɔɔɔɔɔɔuɥoɾ

#308
Index.template.php
Code (find) Select

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

Code ( Add after) Select

            echo '<div id= "floatright">
    Some ad code goes here
    </div>';


Also, add the following class to style.css

#floatright
{
    float:right;
}


That's for the ad at the top, although is says find "// If the user is logged in" it will still display for guests as its before the if statement. :)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

xpubstargamingx

#309
Quote from: JohnCcCcCc on August 14, 2010, 12:23:13 PM
Index.template.php
Code (find) Select

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

Code ( Add after) Select

            echo '<div id= "floatright">
    Some ad code goes here
    </div>';


Also, add the following class to style.css

#floatright
{
    float:right;
}


That's for the ad at the top, although is says find "// If the user is logged in" it will still display for guests as its before the if statement. :)

I keep getting this error, sorry I really have no idea what I am doing.

Parse error: syntax error, unexpected T_ELSE in .../Themes/Default-copy/index.template.php  on line 256

247:
248: {
249: echo '
250: <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
251: <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
252:
253: }
254:
255: // Otherwise they're a guest - send them a lovely greeting...

256: else

257: echo $txt['welcome_guest'];
258:
259: // Now, onto our second set of info, are they logged in again?
260: if ($context['user']['is_logged'])


Now I cannot even access my forums... :'(

ɔɔɔɔɔɔuɥoɾ

Attach Index.template.php, I can add it for you :)


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

xpubstargamingx

Quote from: JohnCcCcCc on August 14, 2010, 12:52:06 PM
Attach Index.template.php, I can add it for you :)

I just lost everything, my theme is completely gone... :'(

ɔɔɔɔɔɔuɥoɾ

#312
Ok don't panic, you probably have a backup you don't even know about.

Look for Index.template.php~, attach that.

Upon further reading, I assume your editing from the theme editor within the forum.

Please access the files using a FTP client.
How do I use FTP? / What is FTP?



To access your forum temporarily use a default theme

yourforum.com/index.php?theme=1


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

xpubstargamingx

Quote from: JohnCcCcCc on August 14, 2010, 01:00:10 PM
Ok don't panic, you probably have a backup you don't even know about.

Look for Index.template.php~, attach that.

Upon further reading, I assume your editing from the theme editor within the forum.

Please access the files using a FTP client.
How do I use FTP? / What is FTP?

Thanks for offering the help, but I have no idea what you are asking me to do about locating the index.template.php and attaching it.

ɔɔɔɔɔɔuɥoɾ

To access your forum temporarily use the default theme

yourforum.com/index.php?theme=1


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

xpubstargamingx

Quote from: JohnCcCcCc on August 14, 2010, 01:04:35 PM
To access your forum temporarily use the default theme

yourforum.com/index.php?theme=1

Do you have AIM?

My username is the same if so.

ɔɔɔɔɔɔuɥoɾ

No, I do not use AOL.

Did you try to access your forum as stated above?


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

xpubstargamingx

Quote from: JohnCcCcCc on August 14, 2010, 01:08:05 PM
No, I do not use AOL.

Did you try to access your forum as stated above?

Yes I am there.

ɔɔɔɔɔɔuɥoɾ

No, I do not use AOL.

Did you try to access your forum as stated above?


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

xpubstargamingx

Quote from: JohnCcCcCc on August 14, 2010, 01:14:47 PM
No, I do not use AOL.

Did you try to access your forum as stated above?

Yes I am there. What next?

Advertisement: