• Welcome to Simple Machines Community Forum. Please login or sign up.
January 24, 2022, 07:21:56 PM

News:

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


Ad Management mod

Started by SMFHacks.com Team, January 30, 2006, 08:41:19 PM

Previous topic - Next topic

bjp

Can some one help me please. I want to insert afetr firts post this adsense, but only for guest : but i always get an error, even if i set it to php

if (!$message['member']['is_guest'])
         echo '
         <div align="center">
        <script type="text/javascript"><!--
google_ad_client = "xxx";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "F1F2F5";
google_color_bg = "F1F2F5";
google_color_link = "0000CC";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

jerm

Just use this:

<div align="center">
        <script type="text/javascript"><!--
google_ad_client = "xxx";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "F1F2F5";
google_color_bg = "F1F2F5";
google_color_link = "0000CC";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>


Use permissions to only enable it for guests

DawnsWebDesigns

When I first tried this mod on RC3 it somehow worked.  But I've since crashed my board 2/3 times with other mods & now this won't work.  So I tried to do it manually.

My forum sort of crashed again...I got a parsing error.  It's saying this code's missing something:

//Display Ads on the Message index
$ads = show_threadindexAds();
if(!empty($ads))
[b]if($ads['type']==0)[/b]
echo $ads['content'];
else
eval($ads['content']);
unset($ads);


The line I highlighted is the line it has a problem with.  It's saying I'm missing a (,) or a (;)...so I tried adding both...one after the other...& it still acts like it's wrong.  ???

Bigguy

This should work. Try this in place of that code:

//Display ads on the top of the page
$ads = show_topofpageAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);

bjp

Quote from: jerm on August 24, 2006, 04:52:27 PM
Just use this:

<div align="center">
        <script type="text/javascript"><!--
google_ad_client = "xxx";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "F1F2F5";
google_color_bg = "F1F2F5";
google_color_link = "0000CC";
google_color_text = "000000";
google_color_url = "008000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>


Use permissions to only enable it for guests
Sorry, what do you mean with"Use permissions to only enable it for guests" ?

Bigguy

You can enable who sees the ads in your permissions in the admin panel.

swriders

Quote from: Bigguy on August 07, 2006, 02:30:03 PM
The link to add ads is in "Features and Options" in your admin panel. The reason it shows twice now is it has put the code into a template file twice. To uninstall you will have to remove the code manually from the files. Here is a link to the edits for the template files:

hxxp:www.smfads.com/forums/index.php?topic=59.0 [nonactive]

Will this work for version 1.0.8 also?

Bigguy

yes these edits will work for SMF 1.0.8 to.

swriders

Will these edits also put the Ad Mgmt link under "Forum Configuration"? All I have is 2 Ad Mgmt bars under "edit Features and Options".

Bigguy

No they won't that feature is only for SMF 1.1 rc2/3

DawnsWebDesigns

Quote from: Bigguy on August 27, 2006, 12:03:06 AM
This should work. Try this in place of that code:

//Display ads on the top of the page
$ads = show_topofpageAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);


Thank you...I'll try it.  :D

redstorm

how to make ads mod run with babylon theme in 1.1RC3 ? help me!!!

Bigguy

Use the edits found here to manually edit the template files only

http://www.smfads.com/forums/index.php?topic=22.0

doug@atd

jerm-

Thanks for the reply.  It's definitely not my ad code that's invalid, as I always paste the code into an html page first, then upload it and w3c validate it.  I've done that for the header and footer ads that I've added manually to the index.template.php.  Same ad code that validates there, doesn't validate when used in the ad management mod because the two </td> end tags are missing.

Hope that helps.

p.s. I removed the mod from my forum, for now.

Loverboy

I use RC3 and I installed the Mod succesfully.. but I can't find any tool of ad management mod .. Could anyone tell me why

shergill

Question about the Display Ads within Posts feature. Can I say something like 'display between 1 and 3rd post' and also display between '7th and 9th post'?

Loverboy

Quote from: LocoTurk on September 01, 2006, 06:30:57 PM
I use RC3 and I installed the Mod succesfully.. but I can't find any tool of ad management mod .. Could anyone tell me why

Because I use a Dutch Language pack on my forum and the Mod is in English right? .. So is there a Dutch version of this Mod.. I'm sorry, I'm new at this Smf forum.

Loverboy

Fatal error: packageinstall() [function.require]: Failed opening required '/local/web/websites/6993155865/www/web/Packages/temp/./install.php' (include_path='.:/php/includes:/usr/share/php') in /local/web/websites/6993155865/www/web/Sources/Packages.php on line 540


I get this message when i tried to install it :(

jerm


Bigguy

Yes you can.

Quote from: shergill on September 01, 2006, 06:32:49 PM
Question about the Display Ads within Posts feature. Can I say something like 'display between 1 and 3rd post' and also display between '7th and 9th post'?

Advertisement: