Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Why wont this code work on my main forum page?
Old 02-14-2008, 06:52 PM Why wont this code work on my main forum page?
Skilled Talker

Posts: 72
Trades: -2
I'm trying to add this code to the top of the page on my forums, above the main table...

I'm using phpbb2 and am editing the overall_header.tpl file..

This is the code...

Code:
<script type="text/javascript" LANGUAGE="JavaScript1.1">

<!--

if (typeof OAS_rns != "string" || OAS_rns.length != 9 || OAS_rns.search(/[^0-9]/) != -1) OAS_rns = new String (Math.random()).substring(2, 11);

document.write('<scr'+'ipt LANGUAGE="JavaScript1.1" SRC="http://oascentral.route102.com/RealMedia/ads/adstream_jx.ads/bearsboards/728x90/ros/1'+OAS_rns+'@x07"></scr'+'ipt>');

// -->

</script>

Does anyone know why it will not show up when I paste it there?
ryangassxx is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-14-2008, 07:59 PM Re: Why wont this code work on my main forum page?
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
I did not test nor copy anything, but where does this code comes from ?

If you copy/pasted it, it contains errors.
Or at least 1:
typeof is a function. You need something like
Code:
if(typeof(OAS_rns)!="string")
and so on. Ask the code again if it was supplied to you, or extend the snippet above to form the full instruction.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 02-14-2008, 08:27 PM Re: Why wont this code work on my main forum page?
Skilled Talker

Posts: 72
Trades: -2
Quote:
Originally Posted by tripy View Post
I did not test nor copy anything, but where does this code comes from ?

If you copy/pasted it, it contains errors.
Or at least 1:
typeof is a function. You need something like
Code:
if(typeof(OAS_rns)!="string")
and so on. Ask the code again if it was supplied to you, or extend the snippet above to form the full instruction.

The code comes from an advertiser on my website... They supply me with the code, and I just paste them... Are you SURE the code itself is flawed? Because at one time this code DID work... And just one day, it wasn't working anymore.. Here is another copy and paste directly from the email they sent me last summer,..

Code:
<script type="text/javascript"  LANGUAGE="JavaScript1.1">
 <!-- 
 if (typeof OAS_rns !=  "string" || OAS_rns.length != 9 || OAS_rns.search(/[^0-9]/)  != -1) OAS_rns = new String (Math.random()).substring(2, 11);
 document.write('<scr'+'ipt  LANGUAGE="JavaScript1.1" SRC="http://oascentral.route102.com/RealMedia/ads/adstream_jx.ads/bearsboards/728x90/ros/1'+OAS_rns+'@x07"></scr'+'ipt>');
 // -->
 </script>



If you see an obvious flaw, could you perhaps just alter it and post the corrected code?


Thanks so much..
ryangassxx is offline
Reply With Quote
View Public Profile
 
Old 02-14-2008, 11:38 PM Re: Why wont this code work on my main forum page?
Skilled Talker

Posts: 72
Trades: -2
Does anyone have a solution?
ryangassxx is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Why wont this code work on my main forum page?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13354 seconds with 12 queries