News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Retargeting Java Code

Started by GP, June 13, 2006, 12:12:26 PM

Previous topic - Next topic

GP

Is anyone familiar with the service provided by retargeting.com (specificmedia)?  It requires the inclusion of a bit of java code, which is kicking my butt.  If anyone can point a total newbie in the right direction, I would appreciate it. 


GP

I've tried to include the javascript they provided in BoardIndex.template.php, but I continue to get template parse error.  I'm probably missing something very simple about using it, but can't get it for the life of me.   :-[   

silverdragonrs

what is the code you are trying to incert and where specifically.. i know a little bit about java and might be able to help... no promis though ....
I'd like to quote my idol. Homer Simpson. "Press any key now!... Any Key? Where's the any key?!... Doh!" ---- One day I'll be that good with computers..... ~ danny ~ feel free to IM me about anything!

GP

Thanks - you have a pm!   :D

Niteblade

Quote
Retargeting.com will start locating your past visitors among the 75,000,000 consumers we serve ads to within minutes of when they left your site and will begin 'Retargeting' them for you within 24 hours! You only pay $19.95 per month for all the users we deliver back to your site. What this means for you is that you are now making your marketing dollars more efficient than you were before you started this valuable addition to your Marketing Mix!

Ahhhhhhhh!

affiliate blog

GP

Quote from: nite0859 on June 13, 2006, 09:27:36 PM
Quote
Retargeting.com will start locating your past visitors among the 75,000,000 consumers we serve ads to within minutes of when they left your site and will begin 'Retargeting' them for you within 24 hours! You only pay $19.95 per month for all the users we deliver back to your site. What this means for you is that you are now making your marketing dollars more efficient than you were before you started this valuable addition to your Marketing Mix!

Ahhhhhhhh!



Ahhhh?   

Are you famililiar with it?  The service seems legit, but their script and php aren't mixing well. 

H

#6
Post the html code you need to insert and I can post how you need to add it ;)

/edit: I have the code and I am working on this now
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

H

I had a go although I haven't tested it at all so the layout is probably wrong. If you post a screenshot I'll be able to post updated code.

In index.template.php (Helios)

Find:
                // Show the menu here, according to the menu sub template.
echo '<table cellpadding="0" cellspacing="0" border="0" style="text-align: left; margin-left: 20px; background-image: url(' . $settings['images_url'] . '/pod/'.$options['theme_color'].'/pod-midbar.gif);" ><tr>';
echo '<td style="width: 39%; background-color: black;"> </td><td><img src="' . $settings['images_url'] . '/pod/'.$options['theme_color'].'/pod-leftbar.gif" alt="gfx" style="margin: 0px 0;" border="0" /></td>';
echo '<td><a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 0px 0;" border="0" /></a></td><td><img id="upshrinkTemp" src="', $settings['images_url'], '/blank.gif" alt="" style="width: 2px; height: 20px;margin: 0px 0;" /></td>';
                template_menu();
echo '</td><td style="background-color: black;width: 59%;"> </td></tr></table>';


After it add:
echo "your banner code in between these quotes";
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

GP

My apologies up front if I'm being thick headed on this.   :-[   In my template, I believe this is the section you're referring to?

// Show the menu here, according to the menu sub template.
echo '<table cellpadding="0" cellspacing="0" border="0" style="text-align: left; margin-left: 20px; background-image: url(' . $settings['images_url'] . '/pod/pod-midbar.gif);" ><tr>';
echo '<td><img src="' . $settings['images_url'] . '/pod/pod-leftbar.gif" alt="gfx" style="margin: 0px 0;" border="0" /></td>';
echo '<td><a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 0px 0;" border="0" /></a><img id="upshrinkTemp" src="', $settings['images_url'], '/blank-upshrink.gif" alt="" style="margin: 0px 0;" /></td>';
                template_menu();
echo '</td></tr></table>';
        // The main content should go here.  A table is used because IE 6 just can't handle a div.
        echo '
        <table style="margin-top: 4px;" width="100%" cellpadding="0" cellspacing="0" border="0"><tr>';
         echo '<td align="left" id="bodyarea" style="padding-left: 15px; padding-right: 15px; padding-top: 0px; padding-bottom: 10px;">';
}


After </tr></table>';  I inserted:

echo "<script> var _l = 483; var _p = 1440; var _f = 1; var _ta = (document.domain).split ("."); var psd = (_ta.length > 1 ? "." + _ta[_ta.length - 2] + "." + _ta[_ta.length - 1] : document.domain); var _cn = "L" + _l + "="; var _call = document.cookie.indexOf (_cn); var _il = 1; var _tl = 0; var _ex; var _rnd = (new Date ()).getTime (); if (_call >= 0) { _pos = document.cookie.substring (_call).indexOf (';'); if (_pos > 0) _val = document.cookie.substring (_call + _cn.length, _call + _pos); else _val = document.cookie.substring (_call + _cn.length); if (_val.indexOf ('.') > 0) { _il = _val.substring (0, _val.indexOf ('.')); _ex = _val.substring (_val.indexOf ('.') + 1); _tl = _ex - (new Date ()).getTime (); } if (_tl <=0) document.cookie = _cn + "; domain=" + psd + "; path=/; expires=" + (new Date ((new Date ()).getTime () - 1000000)).toGMTString () + ";"; } if (_il < _f || _tl <= 0) { var expiry = (new Date((new Date()).getTime()+_p*2*60*1000)).toGMTString(); if (document.cookie.indexOf(_cn) < 0 ) document.cookie=_cn+''+(1)+'.'+((new Date()).getTime()+_p*60*1000)+'; domain='+psd+';path=/;expires='+expiry; else document.cookie=_cn+''+(_il-0+1)+'.'+_ex+';domain='+psd+'; path=/;expires='+expiry; document.write ("<sc" + "ript language='javascript' src='http://XXX.jsp?px=" + _l + "&v=1&rnd=" + _rnd + "'>"); document.write ("</sc" + "ript>"); } </script>";

However, I'm still getting a template parse error.    (note: I filled in the src address that's x'd above)

:'(

GP

Eureeka!!!!!!!    Just posting this in case anyone else needs it.  You must add a slash before each
double-quote.

A big thank you to huwnet and silverdragonrs for taking the time to help me with this!!!!!!!

Advertisement: