194 users online (0 members and 194 guests)  

Thread: Ads


  Results 1 to 9 of 9
  1. #1
    bm01's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2005
    Posts
    5

    Question Ads

    I have phpnuke site, which makes using HTML code and javascript a pain. I don't completely know php, so I am not sure on how to create a php file that has javascript in it. Someone told me about using certain tags, but I have no idea what they were talking about. The javascript is for Targetpoint ads. It will be the only thing in the php file. I have tried to editing it like mentioned in an older thread for PayPal, but I get nothing.


    Code:
    <script type="text/javascript">
    <!--
    customer_id = 'XXXXXX';
    cid = XXXX;
    b_type = 1;
    b_adults = 1;
    b_width = 120;
    b_height = 240;
    b_links = 2;
    b_orientation = 1;
    b_preset = "0!3!%1!6$$";
    //-->
    </script>
    <script type="text/javascript" src="http://targetpoint.com/banner.js"></script>

  2. #2
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel
    I had a similar problem, you may find this thread of help.

    http://www.ahfb2000.com/webmaster_he...ead.php?t=2078

    Dave

  3. #3
    bm01's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2005
    Posts
    5
    I have tried putting it within echo ', but I think the line with all the !% is screwing it up. I think it still wants the // to be comments, too. Since this is the only thing in the php file, I will see if I can put it an HTML doc and still have it function on my site.

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    If its the only thing in the PHP file, then just treat it as a HTML document. No need for <? tags if you dont have any actual PHP.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  5. #5
    bm01's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2005
    Posts
    5
    I fixed it. It did require me to use tags over echo. The whole thing had to be set as content for a block, which I needed to use
    PHP Code:
    $content = <<<_JS_ 
    .

  6. #6
    bm01's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2005
    Posts
    5
    It was working and now it isn't. Here's what I have. The spaces have been added to prevent me from being banned on php sites with protectors.
    It is phpnuke block, so the whole page needs to be set to content.
    Code:
    <?php 
    
    if (eregi("block-banners.php",$PHP_SELF)) { 
        Header("Location: index.php"); 
        die(); 
    } 
    
    $content = <<<_JS_ 
    <scr ipt type="text/javascr ipt"> 
    <!-- 
    customer_id = '257'; 
    cid = 60; 
    b_type = 1; 
    b_adults = 1; 
    b_skip = "mp3"; 
    b_width = 120; 
    b_height = 600; 
    b_links = 4; 
    b_orientation = 1; 
    b_preset = "0!3!%Lots of numbers here!1!6$$"; 
    //--> 
    </scr ipt> 
    <scr ipt type="text/javascr ipt" src="http://srs.targetpoint.com/banner.js"></scr ipt> 
    _JS_; 
    
    ?>

  7. #7
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    What exactly is it doing/not doing?
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  8. #8
    bm01's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2005
    Posts
    5
    It isn't displaying anything anywhere. I don't know why, but it was at first for me.

  9. #9
    darky87's Avatar
    New User

    Status
    Offline
    Join Date
    Jan 2009
    Posts
    1

    Re: Ads

    Have u tried :
    <?
    echo '
    <p align="center">
    <script type="text/javascript">
    <!--
    etc..
    //-->
    </script>
    <script type="text/javascript"
    src="http://sitename.com/file.js"></script></p>
    ';?>

    worked for me
    btw cr8 a table then insert the code
    </table></td></tr></table>
    <?
    }
    ?>
    <table width=737 class=main border=0 cellspacing=0 cellpadding=0><tr><td class=embedded> TEXT/CODE JS
    </div></table></td></tr></table> try it



Tags for this Thread