Author Topic: Replace AdMod “Welcome Area” with OpenX Ad Delivery  (Read 2571 times)

0 Members and 1 Guest are viewing this topic.

Offline Urbanite

  • New Member
  • *
  • Posts: 29
  • Karma: 11
  • Gender: Male
  • .. lifes just like that !
  • SMF Version: 1.1.8
Replace AdMod “Welcome Area” with OpenX Ad Delivery
« on: July 20, 2008, 04:43:03 AM »
Rite Bigguy I'm over on your patch with your like minded people, I think we took up enough space in the AdMod help section of the SMF forum so I hope you or your pals can help me out with this one.
 
I have been trying to work around getting the “welcome ad” to show at all times, irrespective of whether the member permission is on of off. The idea being as this is a prime spot I don’t want members “who usually don’t see ads” to miss the opportunity of banners in the welcome area, besides they can always “shrink” the header if they are perceived as annoying by members.
 
The issue is that the AdMod permissions isn’t flexible so either the selected membergroup sees all ads … or none.
 
I've had a look in the database through phpMyAdmin and there is no way that I can see of having the welcome area ad left on at all times, yes I have been able to insert html in place of the AdMod code and have a banner with links, alt text etc, but then that’s not what I want, I have a feeling its going to take php or java to get the result I'm looking for.
 
I am in the experimental stages of using AdMod with OpenX for intermixing Google Adsense with other ad placements, using AdMod and OpenX for the ads in all areas including the “welcome area” all function as expected including ad rotation, impression & click recording etc and although their methods take a bit of getting used to they work very well.
 
The crux of my issue now is to somehow replace the AdMod code in the index.template.php with the OpenX code to allow the “welcome area” ads/banners to be under the control of OpenX without getting the parse errors; thus bypassing AdMod altogether for placement of ads in the “welcome area”. I'm no coder and cannot get any further with this without somebody who knows what they are doing; any theory’s on this anyone please?

AdMod code and OpenX codes follow....
 
 
ADMOD CODE
:

 
';
       //Welcome Ads
       if (function_exists("show_welcomeAds"))
       {
        $ads = show_welcomeAds();
        if(!empty($ads))
        {
         echo '<td class="windowbg2">';
         if($ads['type']==0)
          echo $ads['content'];
         else
          eval($ads['content']);
         echo '</td>';
        }
        unset($ads);
       }
      echo '

 
OPENX CODE...
:

 
<!--/* OpenX Javascript Tag v2.4.7 */-->
<!--/*
  * The backup image section of this tag has been generated for use on a
  * non-SSL page. If this tag is to be placed on an SSL page, change the
  *   'http://www.WEBSITE.COM/openx/www/delivery/...'
  * to
  *   'https://www.WEBSITE.COM/openx/www/delivery/...'
  *
  * This noscript section of this tag only shows image banners. There
  * is no width or height in these banners, so if you want these tags to
  * allocate space for the ad before it shows, you will need to add this
  * information to the <img> tag.
  *
  * If you do not want to deal with the intricities of the noscript
  * section, delete the tag (from <noscript>... to </noscript>). On
  * average, the noscript tag is called from less than 1% of internet
  * users.
  */-->
<script type='text/javascript'><!--//<![CDATA[
   var m3_u = (location.protocol=='https:'?'https://www.WEBSITE.COM/openx/www/delivery/ajs.php':'http://www.WEBSITE.COM/openx/www/delivery/ajs.php');
   var m3_r = Math.floor(Math.random()*99999999999);
   if (!document.MAX_used) document.MAX_used = ',';
   document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
   document.write ("?campaignid=2");
   document.write ('&amp;cb=' + m3_r);
   if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
   document.write ("&amp;loc=" + escape(window.location));
   if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
   if (document.context) document.write ("&context=" + escape(document.context));
   if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
   document.write ("'><\/scr"+"ipt>");
//]]>--></script><noscript><a href='http://www.WEBSITE.COM/openx/www/delivery/ck.php?n=af53e95c&cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://www.urbn.es/openx/www/delivery/avw.php?campaignid=2&n=af53e95c' border='0' alt='' /></a></noscript>

Obviously the OpenX isn't going to work with inserting the code as is sits, if you are indeed interested in taking up the mantle on this one I will forward the relevant site info, thanks  :)
 
« Last Edit: September 01, 2008, 08:49:41 PM by brianjw »

Offline bigguy

  • Site Owner
  • Administrator
  • *
  • Posts: 13215
  • Karma: 269
  • Gender: Male
  • Get'r Done
    • P.C. Tweakr
  • SMF Version: 2.0 Gold
Re: Replace AdMod “Welcome Area” with OpenX Ad Delivery
« Reply #1 on: July 22, 2008, 01:50:25 AM »
If I get time tomorrow I will look at this. Welcome to the site. :)

Offline Smoky

  • who, me?
  • Guru
  • *
  • Posts: 3980
  • Karma: 1450
  • Gender: Female
  • It's all in your HEAD!
    • HangOutSpot
  • SMF Version: 2.0 ??
Re: Replace AdMod “Welcome Area” with OpenX Ad Delivery
« Reply #2 on: July 22, 2008, 06:30:05 AM »
good thing BigGuy lol.. i have only messed with the ad mod one time, but i know BigGuy knows it well ;)
Oh wow, guess who dropped by! Im still on secondlife.. but will respond to im's *waves

Offline bigguy

  • Site Owner
  • Administrator
  • *
  • Posts: 13215
  • Karma: 269
  • Gender: Male
  • Get'r Done
    • P.C. Tweakr
  • SMF Version: 2.0 Gold
Re: Replace AdMod “Welcome Area” with OpenX Ad Delivery
« Reply #3 on: July 25, 2008, 01:56:48 PM »
Did you get this solved at all ImNoDozer ??? Sorry I didn't get back to you. Life gets in the way of the internet once and awhile.

Offline Urbanite

  • New Member
  • *
  • Posts: 29
  • Karma: 11
  • Gender: Male
  • .. lifes just like that !
  • SMF Version: 1.1.8
Re: Replace AdMod “Welcome Area” with OpenX Ad Delivery
« Reply #4 on: July 25, 2008, 03:09:29 PM »
Hey Bigguy, no not sorted yet but don’t be putting any time into it at the moment thanks; OpenX have released a newer version of their Ad Software there’s just a chance that something that they have changed will allow their code to work directly, I’ll come back once I have it installed and let you know.
 
 

Offline bigguy

  • Site Owner
  • Administrator
  • *
  • Posts: 13215
  • Karma: 269
  • Gender: Male
  • Get'r Done
    • P.C. Tweakr
  • SMF Version: 2.0 Gold
Re: Replace AdMod “Welcome Area” with OpenX Ad Delivery
« Reply #5 on: July 25, 2008, 11:41:59 PM »
Ok, sounds good. :)

Offline Urbanite

  • New Member
  • *
  • Posts: 29
  • Karma: 11
  • Gender: Male
  • .. lifes just like that !
  • SMF Version: 1.1.8
Re: Replace AdMod “Welcome Area” with OpenX Ad Delivery
« Reply #6 on: July 28, 2008, 01:52:02 PM »
Ok no such luck with the new release, I'm getting Parse Errors.
 
When I replace the Ad Mod code with Google AdSense everything works perfectly (as below), i.e. the Google ads appear in the welcome area irrespective of the Ad Mod, (pretty obvious as the Ad Mod code has been replaced) but its proving that the errors lie with whatever OpenX is inserting.
 
What is slightly bewildering is that when I use the OpenX code through the Ad Mod it works ok  :bnghd
 
 
THIS WORKS (allowing the AdMod welcome area to be permanently replaced by Google AdSense)
:

~LINE 315 IN INDEX.TEMPLATE.PHP
';
 }
 echo '
       </td>
<td class="windowbg2"><script type="text/javascript"><!--
google_ad_client = "pub-1234567890ETC";
/* 468x60, created 21/07/08 */
google_ad_slot = "1234567890";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td>


Offline bigguy

  • Site Owner
  • Administrator
  • *
  • Posts: 13215
  • Karma: 269
  • Gender: Male
  • Get'r Done
    • P.C. Tweakr
  • SMF Version: 2.0 Gold
Re: Replace AdMod “Welcome Area” with OpenX Ad Delivery
« Reply #7 on: July 29, 2008, 04:16:38 PM »
So you can use the OpenX code through the ad mod then. Does this solve your problem or do you want to get rid of the ad mod all together. ??? What parse error do you get when you place the OpenX code in the template file. ???

Offline Urbanite

  • New Member
  • *
  • Posts: 29
  • Karma: 11
  • Gender: Male
  • .. lifes just like that !
  • SMF Version: 1.1.8
Re: Replace AdMod “Welcome Area” with OpenX Ad Delivery
« Reply #8 on: July 31, 2008, 12:35:23 AM »
Yes OpenX works perfectly through AdMod. All I want to do is have the welcome area Ads Banner showing at all times irrespective of the permissions that is set for that Member Group. As I've said previously if there's several Ads setup to show its not possible to control individually what Ads members see, in the permissions you set the Member Group to either see all Ads, or none, thats unfortunately a fact of how inflexable the permissions is. Entering the OpenX code directly into index.template.php effectively replacing the AdMod code would do this; It works if I replace using Google's AdSense but not if I use the OpenX code.
 
I will simulate this and let you know about the errors in the next few days.
 

Offline bigguy

  • Site Owner
  • Administrator
  • *
  • Posts: 13215
  • Karma: 269
  • Gender: Male
  • Get'r Done
    • P.C. Tweakr
  • SMF Version: 2.0 Gold
Re: Replace AdMod “Welcome Area” with OpenX Ad Delivery
« Reply #9 on: July 31, 2008, 10:25:54 PM »
Ok soounds good. Along with the errors post your index.template.php file and PM me the code you want to put in it or post it as well and I will see what I can do.

Offline Urbanite

  • New Member
  • *
  • Posts: 29
  • Karma: 11
  • Gender: Male
  • .. lifes just like that !
  • SMF Version: 1.1.8
Re: Replace AdMod “Welcome Area” with OpenX Ad Delivery
« Reply #10 on: August 10, 2008, 01:16:20 PM »
Ok Bigguy, I've been trying to sort out a suitable chat for my forum over the last week you may have noticed my posts in SMF so this part took a back seat. In the interim I was also in discussion with the guys at 2by2host.com about this and a few other issues. They have agreed to provide an additional mod to do this, I asked them to expand on what I wanted and allow the ads for “any area” to be over-ridden irrespective of the permissions, and I would then have them post it as a Mod for the benefit of all. So I await their input. Being as OpenX works through the Ad Management mod it will solve the problem. Anyway thanks for your support thus far, I’ll keep you posted.

Oh by the way, your one ugly MF, I'm not sure I would like to bump into you at night, erm no offence!

 

Offline bigguy

  • Site Owner
  • Administrator
  • *
  • Posts: 13215
  • Karma: 269
  • Gender: Male
  • Get'r Done
    • P.C. Tweakr
  • SMF Version: 2.0 Gold
Re: Replace AdMod “Welcome Area” with OpenX Ad Delivery
« Reply #11 on: August 11, 2008, 12:37:54 AM »
Lmao ;)

Oh by the way, your one ugly MF, I'm not sure I would like to bump into you at night, erm no offence!

Offline Smoky

  • who, me?
  • Guru
  • *
  • Posts: 3980
  • Karma: 1450
  • Gender: Female
  • It's all in your HEAD!
    • HangOutSpot
  • SMF Version: 2.0 ??
Re: Replace AdMod “Welcome Area” with OpenX Ad Delivery
« Reply #12 on: August 11, 2008, 01:21:42 AM »
if he only knew!!  :ntme
Oh wow, guess who dropped by! Im still on secondlife.. but will respond to im's *waves

Offline Urbanite

  • New Member
  • *
  • Posts: 29
  • Karma: 11
  • Gender: Male
  • .. lifes just like that !
  • SMF Version: 1.1.8
Re: Replace AdMod “Welcome Area” with OpenX Ad Delivery
« Reply #13 on: September 01, 2008, 01:08:39 PM »
I have just been testing the ModMod to this from 2by2host and its looking good! They have provided an additional button in the Edit/Add ads area titled "Show this ad in spite of everything" which does what it says in the tin and overrides EVERYTHING!
 
So now I (or anyone that wants to) can have the Ad showing in those 'key' areas no matter what. Yippee  :dnc
 
 
Not sure when its up for release, I'll keep you posted  :awe
 
« Last Edit: September 01, 2008, 03:22:08 PM by ImNoDozer »

Offline Smoky

  • who, me?
  • Guru
  • *
  • Posts: 3980
  • Karma: 1450
  • Gender: Female
  • It's all in your HEAD!
    • HangOutSpot
  • SMF Version: 2.0 ??
Re: Replace AdMod “Welcome Area” with OpenX Ad Delivery
« Reply #14 on: September 01, 2008, 01:51:37 PM »
ok that would be great ImNoDozer! thanks :vic :dnc
 
Oh wow, guess who dropped by! Im still on secondlife.. but will respond to im's *waves