WordPress.org

Ready to get started?Download WordPress

Forums

AdRotate
[resolved] Way to use Alt Image instead of swf in AdRotate? (3 posts)

  1. mediabaron
    Member
    Posted 2 years ago #

    I'm using the code below to display an Adobe Flash ad.

    <a href="%link%"><object width="300" height="250"><param name="movie" value="%image%"><embed src="%image%?trackerurl=%link%" width="300" height="250"></embed></object></a>

    The ad displays properly and I can click on it to go to a URL and it clicktracks fine. But on non-Flash enabled browsers (millions of iOS devices) the ad space shows-up as a blank. Is there a way to enable an alternative static jpeg or gif file?

    http://wordpress.org/extend/plugins/adrotate/

  2. mediabaron
    Member
    Posted 2 years ago #

    Okay, I cracked this nut and here's the code:

    <a href="%link%"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="300" height="250" id="AdRotate%id%">
    	<param name="movie" value="%image%" />
    	<!--[if !IE]>-->
    	<object type="application/x-shockwave-flash" data="%image%" width="300" height="250">
    	<!--<![endif]-->
    		<img src="/wp-content/banners/Alt-Image.jpg" alt="Company" />
    	<!--[if !IE]>-->
    	</object>
    	<!--<![endif]-->
    </object></a>

    Replace any width/height values to the size of your flash/banner ad, replace Alt-Image.jpg with your alternate image, replace Company with a text message that will be hyperlinked should the browser not be able to display either the Flash or Alternate Image.

    If there's anything funky looking in this code please let me know via comments below. I'm not programmer and I just hacked this together via several scripts online.

  3. VinitaJansari
    Member
    Posted 1 year ago #

    Thanks for the code. I dont want an alternate image but I will looking for code to add .swf file. However for some reason I am unable to click on the image. I have checked clicktracking and added the URL there but it doesnt work. I have used exact code as this with different dimensions

    <a href="%link%"><object width="300" height="250"><param name="movie" value="%image%"><embed src="%image%?trackerurl=%link%" width="300" height="250"></embed></object></a>

    Any help will be highly appreciated.

    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum's parser.]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic