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

HELP whith StandAlone.php and VIMEO [SOLVED]


  • Please log in to reply
9 replies to this topic

#1 alvaro Valenzuela

alvaro Valenzuela

    Member

  • Members
  • PipPip
  • 15 posts

Posted 28 July 2012 - 01:34 PM

Hello there:

I need some help. I`m traing to use the example StandAlone.php and I only can see youtube videos and I need see videos fron VIMEO, I followed all the instuctions but it is imposible.

(sorry my english, I`m learning)

This is the web page http://www.skydivesa...be...ne_php.php

an this is my configuration....

vimeoSecret="2d2b626ef281e19b589b19cf927e5f0a74f993d4"');
?>

please let me know what I`m doing wrong

#2 alvaro Valenzuela

alvaro Valenzuela

    Member

  • Members
  • PipPip
  • 15 posts

Posted 28 July 2012 - 04:48 PM

I Already resolved the first problem... now when I select the thumbnail, the video doesn`t load... can you help me?

Thanks!!!

#3 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 28 July 2012 - 05:51 PM

Hi,

Looks like there's a configuration on your webserver that is causing the problem. When you click on a thumbnail, TubePress makes a call to

http://skydivesantia...es...erHtml.php

to retrieve the HTML for the new video. Go ahead and click on that link and open it with your web browser. You'll see some JSON result, and that's what we want to see. However, TubePress needs to append query parameters to that URL like this:

http://skydivesantia...es...o=16042509

If you click on that URL, you'll see that you get an empty result. The same request on tubepress.org works normally, just so you can see. Your webserver and/or PHP error logs should have some information as to what's going on. I would simply ask your hosting provider for some technical support. Feel free to send them a link to this discussion thread, and let us know what you find.

Thanks!

#4 alvaro Valenzuela

alvaro Valenzuela

    Member

  • Members
  • PipPip
  • 15 posts

Posted 29 July 2012 - 08:49 AM

Thanks for your response!!! I think there is somthing that I'm doing wrong, because the problem is only with Vimeo's videos, I upload a new page. the first row is from youtube and it's working fine, but the second is from vimeo and doesn`t work....

here is the link

http://www.skydivesa...be...ouTube.php

also I loaded the page in antother server and It have the same problem

here is the link

http://208.64.28.82/...ss...ouTube.php

here is the code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php 

$tubepress_base_url = 'http://www.skydivesantiago.com/pcl/tubepress';

include '/home/skydives/public_html/pcl/tubepress/sys/classes/TubePressPro.class.php';
?>

<html>
	<head>
		<title>TubePress Pro in standalone PHP</title>

		
		<?php print TubePressPro::getHtmlForHead(true); ?>

    </head>
    <body>
		<div>

		    
		  
		   <?php print TubePressPro::getHtmlForShortcode('tubepress mode="playlist" playlistValue="BB604A85A07B197B" theme="youtube" playerLocation="popup" hqThumbs="true" resultCountCap="15"'); ?>
		  
		 
		    <?php print TubePressPro::getHtmlForShortcode('vimeoKey="7966c8d2e57203ef121dce9b55d2aa2ac495b78a" vimeoSecret="a616fd3cd0477d9bccc7b36a077cc16c39b29574" mode="vimeoUploadedBy" vimeoUploadedByValue="orbital" theme="vimeo" playerLocation="popup" hqThumbs="true"'); ?>
			
				  
            				
		</div>
	</body>
</html>

do you have any idea? what am I doing wrong?

Thanks

#5 alvaro Valenzuela

alvaro Valenzuela

    Member

  • Members
  • PipPip
  • 15 posts

Posted 30 July 2012 - 04:32 PM

Hi Eric... any suggestion?

#6 alvaro Valenzuela

alvaro Valenzuela

    Member

  • Members
  • PipPip
  • 15 posts

Posted 01 August 2012 - 04:59 PM

Someone with any suggestion? I do no know what else I can do....

#7 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 01 August 2012 - 09:43 PM

After investigation, I think I see the problem. In short, your webserver doesn't like to see HTTP GET requests to URLs longer than a certain length. Here is the TubePress bug report to address this issue.

In the meantime, here's a workaround. You'll simply need to edit the file at tubepress_2_4_3/sys/classes/org/tubepress/impl/plugin/filters/galleryinitjs/GalleryInitJsSequencer.class.php. On line 59 you'll see

$args[org_tubepress_api_const_js_TubePressGalleryInit::NAME_PARAM_SEQUENCE] = "[ $sequence ]";
Comment this line out so it looks like

//$args[org_tubepress_api_const_js_TubePressGalleryInit::NAME_PARAM_SEQUENCE] = "[ $sequence ]";
That should get things working for you. Give it a try and let us know? Thanks!

#8 alvaro Valenzuela

alvaro Valenzuela

    Member

  • Members
  • PipPip
  • 15 posts

Posted 02 August 2012 - 07:01 AM

Hi eric, thanks for your help!!!

I did the change and upload the new page to both servers, but It still doesn`t work....

Here are the pages...

http://www.skydivesa...be...ouTube.php

http://208.64.28.82/...ss...ouTube.php

the first row is from youtube and the second one is from vimeo

heres is the code that I changed...

<?php
/**
 * Copyright 2006 - 2012 Eric D. Hough (http://ehough.com)
 *
 * This file is part of TubePress (http://tubepress.org)
 *
 * TubePress is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * TubePress is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with TubePress.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

class_exists('org_tubepress_impl_classloader_ClassLoader') || require dirname(__FILE__) . '/../../../classloader/ClassLoader.class.php';
org_tubepress_impl_classloader_ClassLoader::loadClasses(array(
    'org_tubepress_api_const_js_TubePressGalleryInit',
    'org_tubepress_api_const_options_names_Embedded',
    'org_tubepress_api_exec_ExecutionContext',
    'org_tubepress_impl_log_Log'
));

/**
 * Writes the video sequence to JavaScript.
 */
class org_tubepress_impl_plugin_filters_galleryinitjs_GalleryInitJsSequencer
{
    private static $_logPrefix = 'Gallery Init JS Sequencer';

    /**
     * Modify the name-value pairs sent to TubePressGallery.init().
     *
     * @param array $args An associative array (name => value) of args to send to TubePressGallery.init();
     *
     * @return array The (possibly modified) array. Never null.
     *
     */
    public function alter_galleryInitJavaScript($args)
    {
        if (!is_array($args)) {

            org_tubepress_impl_log_Log::log(self::$_logPrefix, 'Filter invoked with a non-array argument :(');
            return $args;
        }

        $ioc      = org_tubepress_impl_ioc_IocContainer::getInstance();
        $context  = $ioc->get(org_tubepress_api_exec_ExecutionContext::_);
        $sequence = $context->get(org_tubepress_api_const_options_names_Embedded::SEQUENCE);
        $autoNext = $context->get(org_tubepress_api_const_options_names_Embedded::AUTONEXT) ? 'true' : 'false';

        $args[org_tubepress_api_const_js_TubePressGalleryInit::NAME_PARAM_AUTONEXT] = $autoNext;
        //$args[org_tubepress_api_const_js_TubePressGalleryInit::NAME_PARAM_SEQUENCE] = "[ $sequence ]";

        return $args;
    }
}

maybe I did something wrong about vimeo's Key.....

Thanks again!!!

#9 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 04 August 2012 - 08:18 PM

That was totally my mistake. I'm sorry! Here is the correct workaround:

  • Open up tubepress/sys/classes/org/tubepress/impl/exec/MemoryExecutionContext.class.php with your favorite text editor
  • Around line 213 you'll want to change the code from

    foreach ($this->_customOptions as $name => $value) {    $optPairs[] = $name . '="' . str_replace('"', '\"', $value) . '"';}
    to

    foreach ($this->_customOptions as $name => $value) {    if ($name === 'sequence') continue;    $optPairs[] = $name . '="' . str_replace('"', '\"', $value) . '"';}
That should correctly reduce the length of the URLs that TubePress submits, and thus work correctly with your server. I've tested this change locally and it seems to work as expected. Please give it a try and let us know how that works, and again I'm sorry for the detour! Thank you.

#10 alvaro Valenzuela

alvaro Valenzuela

    Member

  • Members
  • PipPip
  • 15 posts

Posted 05 August 2012 - 06:38 AM

YES!!!! Finally works, thank you very much.....