Results 1 to 6 of 6

Thread: Add Specific Javascript for view_video.tpl in Header?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2008
    Posts
    12

    Default Add Specific Javascript for view_video.tpl in Header?

    I need to add a specific javascript into the <header> but I need it ONLY when the view.video.tpl is loaded.

    How can I achieve this?

  2. #2

    Default

    Open view_video.php file and paste your JavaScript code after
    Code:
    $(function(){
        show_comments(' . $video_id . ',1);
    });
    If you can't get it fixed, open a Support ticket with your site FTP login details.

    Thanks,

  3. #3
    Join Date
    Mar 2008
    Posts
    12

    Default

    Quote Originally Posted by vshare2 View Post
    Open view_video.php file and paste your JavaScript code after
    Code:
    $(function(){
        show_comments(' . $video_id . ',1);
    });
    If you can't get it fixed, open a Support ticket with your site FTP login details.

    Thanks,
    I paste it after:

    Code:
    $(function(){
        show_comments(' . $video_id . ',1);
    });
    </script>
    And I get a blank white page when trying to load the video.

    I'm actually trying to load the CPALead javascript code in the header:

    Code:
    <script type="text/javascript">var isloaded = false;</script><script type="text/javascript" src="http://www.cpalead.com/show_cu.js?pub=xxxxxx&gateid=xxxxxxxx"></script><script type="text/javascript">if (!isloaded) { window.location = 'http://www.cpalead.com/abp'; }</script><noscript><meta http-equiv="refresh" content="0;url=http://www.cpalead.com/java" /></noscript>
    Why isn't it working?

  4. #4

    Default

    Open view_video.php file and find
    Code:
    <script language="JavaScript" type="text/javascript" src="' . VSHARE_URL . '/js/playlist.js"></script>
    Then replace it with
    Code:
    <script language="JavaScript" type="text/javascript" src="' . VSHARE_URL . '/js/playlist.js"></script>
    <script type="text/javascript">var isloaded = false;</script>
    <script type="text/javascript" src="http://www.cpalead.com/show_cu.js?pub=xxxxxx&gateid=xxxxxxxx"></script>
    <script type="text/javascript">if (!isloaded) { window.location = 'http://www.cpalead.com/abp'; }</script>
    <noscript><meta http-equiv="refresh" content="0;url=http://www.cpalead.com/java" /></noscript>
    Try this.

    Thanks,

  5. #5
    Join Date
    Mar 2008
    Posts
    12

    Default

    Nope, again I get the blank white page of death.

  6. #6

    Default

    Open a Support ticket with your site FTP login details.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •