PDA

View Full Version : Parse problems with advertising code, big guys, please help !


Sharg
Thu 7th Dec '00, 1:22pm
I ask to the big guys of this forums their help.
I have serious problems inserting advertising code into my sites' header.

Several of my forums got their own header. When I put the code inside, I got this error:

parse error: parse error in /var/www/forums/forumdisplay.php(235) : eval()'d code on line 1

I tried to turn on of php header code parsing, it changes strictly nothing.

Here is the code:

<SCRIPT LANGUAGE=JavaScript>
<!--
var al = Math.round(Math.random()*10000000000000);
var Link="<a href=\"http://adcompany.com/cgi-bin/click_bandeau.cgi?num=" + al + "\" target=_blank><IMG HEIGHT=60 BORDER=0 WIDTH=468 SRC=\"http://adcompany.com/cgi-bin/aff_bandeau.cgi?id_edit=1004440&id_site=1009983&bandeauVignette=B&num=" + al +"\"></a>";
document.write(Link);
//--></SCRIPT>

Please help me make this code work.
Thanks,
Benj

[Edited by Benj on 12-07-2000 at 12:32 PM]

Mike Sullivan
Thu 7th Dec '00, 2:04pm
Well, seeing how 95% of Javascript dies, and JS is the only code to have backslashes, I think it might be an issue with the addslashes function (PHP issue, not vB).

Wild guess, but try this:
<SCRIPT LANGUAGE=JavaScript>
<!--
var al = Math.round(Math.random()*10000000000000);
var Link="<a href=\\"http://adcompany.com/cgi-bin/click_bandeau.cgi?num=" + al + "\\" target=_blank><IMG HEIGHT=60 BORDER=0 WIDTH=468 SRC=\\"http://adcompany.com/cgi-bin/aff_bandeau.cgi?id_edit=1004440&id_site=1009983&bandeauVignette=B&num=" + al +"\\"></a>";
document.write(Link);
//--></SCRIPT>

Sharg
Thu 7th Dec '00, 2:14pm
Well, thanks ed..
When I don't pare php I can see the image frame (but its all broken.

When I turn PHP parsing, got this:

Parse error: parse error in /var/www/forums/forumdisplay.php(235) : eval()'d code on line 2

So still not working :/
I saw John has on his vbulletin forum a similar code, how does he manage to make it work ?

Benj

Sharg
Thu 7th Dec '00, 2:21pm
Silly me, ignore the previous message.
Your code seems to work ED.

I'll play with it more, if you get that fixed....well you'll have a big big thanks.

Benj

Sharg
Thu 7th Dec '00, 3:28pm
Ed, thats the second time you get me out of troubles.
THANKS ED.

Benj