Ask the community

This is a community support forum where you can ask
questions and interact with other PremiumPress Customers.

DP and MoviePress video problems


  • Dominique
    Newbie 6 points
    July 28, 2013 at 5:27 pm

    First of, I would like to apologize for a recent request posted under my ID by a graphic designer consultant. That post was vague at best and did not resolve the issue at hand.

    We are trying to add our own 3rd party (not Youtube or Viemo) video code to listing posts but are running into difficulties. The code we are trying to add is listed further below and does not cause any problems in other versions such as previous DirectoryPress versions where it works fine.

    Example of working code:
    http://publicmining.org/de-beers-stand-by-me-tv-commercial-2008/

    In both the new version of MoviePress and DirectoryPress, we cannot seem to find which PHP file to add this code to in order to make it work. What file should we add this code to so that it affects LISTING POSTS only?

    We tried to insert the code to:
    admin -> display setting -> content layout -> listing page
    but it is not working.

    We are having an ancillary problem in DirectoryPress. The script seems to add a text value ((#.UfVM0I23MVB) to links that we are trying to disable.

    HERE IS THE VIDEO CODE THAT WE ARE HAVING TROUBLE ADDING TO LISTING POSTS:

    <div style=”width:440px; height:0px; text-align:left”>
    <table width=”100%” align=”left”>
    <tr>
    <td>
    <?php
    #### echo $_SERVER[‘REQUEST_URI’];
    $adit_show_video=FALSE;
    $page_refresh_seconds=0;
    $adit_video_image_file=”blank.jpg”;
    $_SESSION[‘adit_video_page’]=FALSE;

    if($_SERVER[‘REQUEST_URI’]==”/xxxxxxxxxxxxxxxxxxxx/”)
    {
    $adit_show_video=TRUE;
    $adit_video_file=”ffffffffffffffffffff”;
    $adit_video_image_file=”blank.jpg”;
    $page_refresh_seconds=0;
    }
    elseif($_SERVER[‘REQUEST_URI’]==”/xxxxxxxxxxxxxxxxxxxx/”)
    {
    $adit_show_video=TRUE;
    $adit_video_file=”ffffffffffffffffffff”;
    $adit_video_image_file=”blank.jpg”;
    $page_refresh_seconds=0;
    }

    $_SESSION[‘adit_video_page’]=$adit_show_video;

    if($page_refresh_seconds > 0)
    {
    ?>
    <script language=”javascript”>
    window.onload=pageRefresh
    function pageRefresh()
    {
    setTimeout(“window.location.reload()”,<?php echo $page_refresh_seconds*1000; ?>);
    }
    </script>

    <?php
    }
    ?>
    </td>
    </tr>
    <tr>
    <td>
    <?php
    if($adit_show_video==TRUE)
    {
    ?>
    <table width=”100%” align=”left”>
    <tr><td><script type=’text/javascript’ src=’http://onlinecurrencies.com/jwplayer/swfobject.js’></script>
    <script language=”javascript” src=”http://cdn-static.liverail.com/js/companions.js”></script>
    <script language=”javascript”>
    lrCompanionPurge[“300×250″] = true;
    </script>
    <table width=”100%”>
    <tr><td align=”center”>
    <table align=”center”>
    <tr><td><div id=’mediaplayer’></div>
    <script type=”text/javascript”>
    var wid = screen.width;
    if(wid > 1200)
    {
    var jww=560;
    var jwh=315;
    }
    else
    {
    var jww=430;
    var jwh=242;
    }

    var so = new SWFObject(‘http://onlinecurrencies.com/jwplayer/player.swf’,’playerID’,jww,jwh,’9′);
    so.addParam(‘allowfullscreen’,’true’);
    so.addParam(‘allowscriptaccess’,’always’);
    so.addVariable(“autostart”,”true”);
    so.addVariable(‘file’, ‘http://mastersoftrivia.com/globalvideo/<?php echo $adit_video_file; ?>’);
    so.addVariable(‘image’, ‘http://mastersoftrivia.com/globalvideo/videoimg/<?php echo $adit_video_image_file; ?>’);
    so.addVariable(‘dock’, ‘true’);
    so.addVariable(‘plugins’,’http://vox-static.liverail.com/swf/v4/plugins/jwplayer/LiveRailPlugin50.swf’);
    so.addVariable(‘LR_PUBLISHER_ID’,’7968′);
    so.addVariable(‘LR_ADMAP’,escape(‘in::0%;in::100%;ov::5%,95%’));
    so.addVariable(‘LR_TAGS’,”);
    so.addVariable(‘LR_VERSION’,’4.0′);
    /* so.addVariable(‘LR_VIDEO_ID’,’201110Payrolls100711′); */
    so.addVariable(‘sharing.code’, ‘[embed code here]‘);
    so.addVariable(‘hd.file’, ‘bunny-hd.mp4’);
    so.addVariable(‘hd.state’, ‘false’);
    so.write(‘mediaplayer’);
    </script>
    </td>
    <td style=”vertical-align:top”> </td>
    </tr>
    </table>
    </td></tr>
    <tr><td align=”center”> </td></tr>
    <tr><td align=”center”>
    <?php /* <iframe src=”http://cdn.investingchannel.com/quote_widget_4.html?s=publicmining” scrolling=”no” width=”650″ height=”70″ frameborder=”0″></iframe> */ ?>
    </td></tr>
    </table>
    </td></tr>
    </table>
    <?php
    }
    else
    {
    ?>
     
    <?php
    }
    ?>
    </td>
    </tr></table></div>

  • Mark Fail
    Mark Fail
    Super Guru 12,821 points
    July 29, 2013 at 2:55 am

    if you are adding PHP code then you’ll need to add it to your files directly, create a new file called _single.php and add it to your child theme folder.


  • Dominique
    Newbie 6 points
    July 29, 2013 at 3:49 am

    Thanks, Mark. We tried what you recommended by adding our PHP code to _single.php under the child theme, but the videos are still not showing. Anything else we should do?

  • Mark Fail
    Mark Fail
    Super Guru 12,821 points
    July 29, 2013 at 3:49 am

    not much more i can suggest, thats the correct way todo it so something must be off with your execution.

Viewing 4 posts - 1 through 4 (of 4 total)