Jump to content


These Forums Are Now Read-Only


For TubePress support, please post a question here or open a support ticket and we will be glad to assist.


Photo

Can't Install Tubepress Standalone Php


Best Answer AlpineSi, 08 October 2013 - 06:54 AM

Hi Brandon

 

Thanks for your response. I found the 'include' has to come first, otherwise all TubePressPro statements are undefined.

 

Simon

Go to the full post


  • Please log in to reply
2 replies to this topic

#1 AlpineSi

AlpineSi

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 25 September 2013 - 01:23 PM

Hi,

 

The page is blank, with error message:

 

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/17/d362677961/htdocs/nyrnet/tubepress_pro_3_1_1/src/main/php/classes/TubePressPro.php on line26

 

 

Here the code located in the file http://www.nyrnet.co..._1_1/videos.php :

 

<?php 
 
    $tubepress_base_url = "http://www.nyrnet.co...ress_pro_3_1_1/";
 
    include "../tubepress_pro_3_1_1/src/main/php/classes/TubePressPro.php";
 
?>
    <html>
        <head>
            <title>Our Videos</title>
            <?php print TubePressPro::getHtmlForHead(true); ?>
        </head>
 
        <body>
 
            <?php print TubePressPro::getHtmlForShortcode('mode="playlist" playlistValue="PL52DC6EB03F9EF4BC" tagValue="NealsYardRemedies" resultsPerPage="3"'); ?>
 
        </body>
 
    </html>

 

How can I see videos from user:

 

http://www.youtube.c...alsYardRemedies

 

and playlist:

 

http://www.youtube.c...2DC6EB03F9EF4BC

 

Many thanks

 

Simon



#2 brandon

brandon

    Advanced Member

  • TubePress Staff
  • 1989 posts

Posted 30 September 2013 - 11:49 PM

Hi Simon,

 

In order to see videos from both users and playlists, your code should look like this:

<?php print TubePressPro::getHtmlForShortcode('mode="playlist + user" playlistValue="PL52DC6EB03F9EF4BC" userValue="NealsYardRemedies" resultsPerPage="3"'); ?>

As for the issue that you are having, your code should look like this:

<?php 
 
    TubePressPro::setBaseUrl("http://www.nyrnet.co...ress_pro_3_1_1/");
 
    include "../tubepress_pro_3_1_1/src/main/php/classes/TubePressPro.php";
 
?>
    <html>
        <head>
            <title>Our Videos</title>
            <?php print TubePressPro::getHtmlForHead(true); ?>
        </head>
 
        <body>
 
            <?php print TubePressPro::getHtmlForShortcode('mode="playlist + user" playlistValue="PL52DC6EB03F9EF4BC" userValue="NealsYardRemedies" resultsPerPage="3"'); ?>
 
        </body>
 
    </html>

Notice the different on the setBaseURL line.

 

Let us know.

 

Thanks!


Want a faster, more personalized support experience? Open a ticket with us! We will be gradually phasing out forum-based support in favor of a proper ticketing system. Please help us help you!


#3 AlpineSi

AlpineSi

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 08 October 2013 - 06:54 AM   Best Answer

Hi Brandon

 

Thanks for your response. I found the 'include' has to come first, otherwise all TubePressPro statements are undefined.

 

Simon