• Resolved E.S. Ely

    (@es-ely)


    Marios
    I long used your real time search and replace plugin to redirect ad code, swapping out one url for another, and it worked great.
    Now I am trying to replace chunks of ad code on my homepage and I’ve run into difficulty. I’ve check the ad code with the ad support guy to make sure I had it right. But when I attempt to replace it, it doesn’t work.
    The funny thing is that in an earlier try I had some success.
    I’ll appreciate any help you can give me. It’s a great plugin.

    Gene

    Here is the ad code:
    <script type=”text/javascript” >
    <!–
    var browName = navigator.appName;
    var browDateTime = (new Date()).getTime();
    var browVersion = parseInt(navigator.appVersion);
    var ua=navigator.userAgent.toLowerCase();
    var adcode=”;
    if (browName==’Netscape’){
    if (browVersion>=5)
    { document.write(‘<ifr’+’ame src=”http://www.medialifemagazine.com:8080/banman/a.aspx?ZoneID=65&Task=Get&Browser=NETSCAPE6&SiteID=1&X=&#8217; + browDateTime + ‘” width=300 height=250 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No></ifr’+’ame>’); }
    else if ((browVersion>=4)&&(ua.indexOf(“mac”)==-1))
    { document.write(‘<s’+’cript src=”http://www.medialifemagazine.com:8080/banman/a.aspx?ZoneID=65&Task=Get&Browser=NETSCAPE4&SiteID=1&X=&#8217; + browDateTime + ‘”>’);
    document.write(‘</’+’scr’+’ipt>’);
    document.write(adcode); }
    else if (browVersion>=3)
    { document.write(‘‘); } }
    else
    { document.write(‘<ifr’+’ame src=”http://www.medialifemagazine.com:8080/banman/a.aspx?ZoneID=65&Task=Get&SiteID=1&X=&#8217; + browDateTime + ‘” width=300 height=250 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No></ifr’+’ame>’); }
    // –>
    </script>

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Marios Alexandrou

    (@marios-alexandrou)

    I don’t have any tricks up my sleeve 🙂 When I run into trouble I just work my way from a small match to a more complex match until I find where the issue is. So in your case I’d try to match a word then a line and then multiple lines.

Viewing 1 replies (of 1 total)

The topic ‘Replacing ad code’ is closed to new replies.