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

How-to Get Tubepress Thumbnails Working For Several Subdomains ?


  • Please log in to reply
5 replies to this topic

#1 petrich

petrich

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 25 May 2013 - 05:02 PM

Hi TubePress Team,

 

Running Wordpress 3.5.1 on a IIS 7.5 web server (Windows server 2008 R2) with TubePress 3.0.1 (php 5.4.14), I am facing the following problem on my website

-> I can't get TubePress Thumbnails working on the 2 subdomains dedicated for translations of my main domain, and this is due to the cross domain problem on ajaxEndpoint.php file...

 

I'll try to explain that  clearly:

 

My main domain is: http://www.keepintouchwithus.com

Page dedicated for TubePress galleries: http://www.keepintou...deos/au-revoir/

 

I also have one subdomain for english: http://en.keepintouc...eos-en/goodbye/

I also have one subdomain for spanish: http://es.keepintouc...s-videos/adios/

 

TubePress is working normally on my main domain (http://www.keepintou...deos/au-revoir/)

OK, I have only one video but it's enough to check that a click on the thumbnail launches the video in the main window just above the gallery

BUT, the same action on the translated pages (english or spanish) sends back an error in Firebug on the following file:

 

0
 

 

And it's certainly due to the the cross domain ajax problem (http://tubepress.com...oss_Domain_Ajax)

 

The thing is I don't know how to get things fixed with 301 redirections (as recommended):

  • I can't have 301 redirections from es.keepintouchwithus.com (or en.keepintouchwithus.com) to www.keepintouchwithus.com because I need those subdomains (es.keepintouchwithus.com and en.keepintouchwithus.com) to point to translated pages
  • & I can't get TubePress Thumbnails working on the subdomain pages which URL begins with 'en.' or 'es.' instead of 'www.'

What can you recommend to get things fixed in my web environment ?

 

Thanks a lot guys, for your help / advice. Much appreciated

 

 

 

 

 



#2 brandon

brandon

    Advanced Member

  • TubePress Staff
  • 1989 posts

Posted 25 May 2013 - 06:45 PM

Petrich,

 

One thing you could try is to install three versions of tubepress... One for your French site, one for your English site and one for your Spanish site.  Then you shouldn't have the cross-domain ajax issue.

 

Try this out and let us know if it works, if not, I'll pass this up to one of our deveolpers

 

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 petrich

petrich

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 25 May 2013 - 08:20 PM

I cannot install 3 tubepress instances because I am not running a Multi instances installation of wordpress. Translations are done With à translation plugin and I only have 1 admin GUI for wordpress, which means only 1 instance of each plugin, certainly. Thanks for the idea but this is not helping here... Can you pass it up to programming team or suggest other idea? Thanks

#4 petrich

petrich

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 26 May 2013 - 06:14 PM

I have checked and I was right. I cannot have more than 1 instance of Tubepress plugin on my website due to the fact that it's not a Multi-site wordpress.

 

Any other workaround ? idea ? solution ?

 

Thanks guys,



#5 brandon

brandon

    Advanced Member

  • TubePress Staff
  • 1989 posts

Posted 27 May 2013 - 03:46 AM

petrich,

 

I have passed this up to our developers and will have an answer for you soon.

 

Thanks for your patience and sorry for the inconvenience!


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!


#6 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 02 June 2013 - 05:38 PM

Hi petrich,

 

This is definitely a difficult situation, and one that we don't see too often (which is why we don't have a very quick and elegant solution to offer you). But here are a few suggestions which may get things working.

 

The first approach would be to set up a 301 redirect on your webserver for only the following file:

/worldtour/wp-content/plugins/tubepress/src/main/php/scripts/ajaxEndpoint.php

This file is where all Ajax-related TubePress request go. So when a request comes in for this file, your webserver could look at the HTTP referer header and send back an appropriate 301. e.g. If the referrer is "es.keepintouchwithus.com", send back an HTTP 301 for http://es.keepintouc...axEndpoint.php.

 

I'm not familiar with IIS, but I know that on Apache for instance this is quite easy to do with mod_rewrite.

 

The second approach is very similar to the first, except that the HTTP redirects could be generated by ajaxEndpoint.php. This would require editing the ajaxEndpoint.php file, along with a little PHP knowledge. So obviously this solution isn't quite as ideal.

 

The last approach I can think of would be to edit TubePress's JavaScript to change the domain of the request before it goes out the door. In TubePress 3.0.1, the logic to determine the domain is located in this function. You would have to change this function to examine the window.location.hostname JavaScript property and return the correct domain based on that.

 

I hope that makes sense? I'm curious to know how other plugins handle cross-domain Ajax situations like this. If anyone reading this has any insight, we'd love to hear from you!

 

Thanks