http://e107.org
 User Center
Username:
  
Password:
  
Remember me     
Search PortedThemes

E107 THEMES
Ports for Download

E107 THEMES
Non Ports for Download

E107 SMILES/EMOTES
Emotes for Download

Welcome Guest
Username:

Password:


Remember me

[ ]
[ ]
[ ]

Currently Online
 Members: (0)
 Guests: (7)

 Hit Counter

Members on Today: 0
They are:

Colour Key:
Administrator
Forum Moderator
Member

Link to us
Link to us

Vote 4 Us
e107 Topsites List
Advertisement
Forums
PortedThemes :: Forums :: e107 Themes :: Theme Developer Discussion
 
<< Previous thread | Next thread >>
Hemingway and googleAd?
Moderators: Serenity, Acronym, Joei, -=Mojo Will=-
Author Post
AnthiStatic
Mon Jul 23 2007, 02:30PM
Registered Member #870
Joined: Wed Jun 06 2007, 07:53PM
Posts: 17
Hi
I have some problems inserting a googlelAd into the header of my Hemingway theme...

The ad is required by my host, and if i put the banner in one of the top menus, it screws up the layout somehow... Si I'd like to put the ad on top of the three top menus...

Another weird thing is that i can't insert the ad code without either getting T_STRING errors or nothing at all.. so a little help with that also would be appreciated!

<!--  ads by exstreamhost  start -->
<script language=' JavaScript' type=' text/javascript'  src='http:// exstreamhost.com/ ads/adx.js'></ script>
<script language=' JavaScript' type=' text/javascript'>
<!--
   if (! document.phpAds_used )  document.phpAds_use d = ',';
   phpAds_random = n ew String (Math.rand om());  phpAds_random = php Ads_random.substring (2,11);
   
   document.write (" <" + " script language=' JavaScript' type=' text/javascript'  src='");
   document.write (" http:// exstreamhost.com/ ads/adjs.php?n="  + phpAds_random);
   document.write (" &amp;what=zone:1");
   document.write (" &amp;exclude="  + document.phpAds_u sed);
   if (document.refe rrer)
      document.write  ("&amp;referer="  + escape(document.r eferrer));
   document.write (" '><" + "/script>");
//-->
</ script><noscript><a  href='http:// exstreamhost.com/ ads/adclick.php? n=a4b2d254' target=' _blank'><img src=' http:// exstreamhost.com/ ads/adview.php? what=zone: 1&n=a4b2d254'  border='0' alt='' ></a></noscript>
<!--  ads by exstreamhost  end -->
Back to top
Mon Jul 23 2007, 02:47PM
Serenity


Registered Member #1
Joined: Sat Mar 10 2007, 07:26PM
Posts: 152
have you tried a shortcode?

adding to theme.php
// [adsense]
$register_sc[] = ' ADSENSE';


and making a file called adsense.sc with this enclosed
$adsense = " yourcode
here";

return $adsense;


Then placing in your header
{ADSENSE}


[ Edited Mon Jul 23 2007, 02:47PM ]

Owner/Founder
Back to top
AnthiStatic
Mon Jul 23 2007, 03:33PM
Registered Member #870
Joined: Wed Jun 06 2007, 07:53PM
Posts: 17
WOOOW!!

Looks and sounds just as what i need!!! Will try it asap!
Back to top
Mon Jul 23 2007, 03:35PM
Serenity


Registered Member #1
Joined: Sat Mar 10 2007, 07:26PM
Posts: 152
Good Luck I hope it works... if it doesn't you might have to inquire over at e107.org

Owner/Founder
Back to top
AnthiStatic
Mon Jul 23 2007, 04:26PM
Registered Member #870
Joined: Wed Jun 06 2007, 07:53PM
Posts: 17
Dang!

I get an error like this when running the shortcode...
Parse error:  syntax error, unexp ected ';' in 
/home/static/ public_html/ e107_handlers/ shortcode_handler.ph p(144) : eval()' d code on line 6
<;script language='  JavaScript' type='  text/javascript'  src='http://  exstreamhost.com/  ads/adx.js'><;/  script> <; script language='  JavaScript' type='  text/javascript' > if (!  document.phpAds_use d )  document.phpAds_use d = ',';  phpAds_random = new  String (Math.random ());  phpAds_random = php Ads_random.substr in [!loop count exceeded: g(2,11); document.write (" <;" + "script language=' JavaScript' type=' text/javascript' src='"); document.write (" <a href="http://"  rel="external"><img src='http://www.portedthemes.com/link.png' style='border:0;'  /></a> exstreamhost.com/ ads/adjs.php?n=" + phpAds_random); document.write (" &what=zone:1"); document.write (" &exclude=" + document.phpAds_used ); if (document.referrer) document.write ("& amp;referer=" + escape(document.refe rrer)); document.write (" '><;" + "/script>"); <;/script><; noscript><;a href=' <a href="http://"  rel="external"><img src='http://www.portedthemes.com/link.png' style='border:0;'  /></a> exstreamhost.com/ ads/adclick.php? n=a4b2d254' target=' _blank'><;img src=' <a href="http://"  rel="external"><img src='http://www.portedthemes.com/link.png' style='border:0;'  /></a> exstreamhost.com/ ads/adview.php? what=zone:1& n=a4b2d254' border=' 0' alt=''><;/a><;/ noscript>!]g(2,11);


What do I do?
Back to top
Mon Jul 23 2007, 09:13PM
Serenity


Registered Member #1
Joined: Sat Mar 10 2007, 07:26PM
Posts: 152
damn wish I knew ... I'd asked over at e107 and see what they tell you...

Owner/Founder
Back to top
scoty_and
Tue Jul 24 2007, 01:21PM
Registered Member #7
Joined: Sat Feb 24 2007, 03:24PM
Posts: 46
try to replace " with '
Back to top
AnthiStatic
Tue Jul 24 2007, 03:08PM
Registered Member #870
Joined: Wed Jun 06 2007, 07:53PM
Posts: 17
OK, Here is what i finally did...

I went through the entire code, removing all weird characters that somehow got in there, and pasted it into a file called adsense.php and placed that file in my e107_images/banners folder.

After that i just enabled that file as a banner image in the admin section and HEY PRESTO! There it was! And since the ad-code resides in it's very own php-file there's no need to escape(\) or change any quotes...

Note that the Hemingway theme had no {BANNER} shortcodes, so those had to be added for each of the layouts for the banner image to work.

Thanx for all help I received here, (and elsewhere) it was much appreciated!
Back to top
 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System
Copyright © 2007-08 Portedthemes.com. All Rights Reserved. Powered by e107 v0.7.13


:: Contact Us :: Sitemap ::