TubePress: WordPress Plugin for YouTube Download & Import Videos

Sep
29
Import By ID fixed
Posted by Mario Mansour in TubePress

While most people are using TubePress.NET plugin for mass importing youtube videos to their wordpress blog using tags, others prefer to have more control over the import situation and to actually ask for the video by ID. This feature was introduced in earlier versions of this plugin, however during the recent rewrite procedure, I assumed that youtube always returns the ID of the queried video in the XML response. However it turned out after I checked the youtube API docs this morning that for queries by ID, youtube doesn’t return the ID.
Obviously, because the user already knows it… I would like to thank Mark Robertson for pointing out this problem.

I suggest that those who wish to use this function, please update your plugin. Download available as usual from the download button at your right in this website and from the WordPress plugin directory as well.
Another tip of the day: Never ASSUME anything as my old university professor used to say: “When you ASSUME, you make and ASS out of U and ME” and always check the documentation.

Sep
25
Few Tips to check the performance
Posted by Mario Mansour in TubePress

Finally I managed to update the website template and fix the layout. The right sidebar has been floating to the bottom of the page for “a while” :)
Now everything looks in a good shape, for the time being at least! I also noticed that the final release of TubePress.NET with the latest bug fixes was not updated on the website (available through the Download button). However to those who are downloading TubePress from the wordpress plugin directory here should not have any problems.
Anyway, I also updated the package on the website now.

Despite all recent efforts in rewriting the plugin code to make as simple as possible and seemless to the wordpress engine yet usefull to the user, one should always keep in mind that the environment where the plugin (wordpress installation) is running could affect the overall performance.
This mainly depends on your hosting plan: the PHP configuration on the server. In the current release, the plugin is able to automatically detect whether the required environment is available or not. It can even try to adjust the settings but in some cases, (usually on shared hosting), PHP scripts don’t have privileges to change configuration, so the plugin will fail to adjust the environment and will print a warning message about the required settings and asks you to contact your hosting provider.

Hopefully, you should not see any strange warning or error messages from now on. My tips to check whether the import was successfull is not to rely on what you see in your website. Instead go to Manage in you admin panel and check the sub section Posts or Pages and see if you find the videos that you recently imported. If the videos are there, then TubePress has done its job successfully.

So now we are sure that TubePress is working fine, but you go to the website and for some reason you don’t see the videos.
First thing to do is to check the template. Although it never happened before that a template affects the performance, but it’s a good start to check that no posts / pages are being rejected by the template.
Next and the most important is to check the plugins and boy what a list! I intended to avoid Wordpress plugin API in TubePress to avoid compatibility problems with other plugins.
This is a real problem, if 2 plugins (at least) are accessing the same information and making some processing before presenting it to the visitor’s screen, each plugin should take into account the other because basically you can’t control which plugin is running first so you don’t know which plugin is accessing the original data and which one is getting the output of another plugin.
Sometimes it doesn’t matter what data is presented to the plugin, since each plugin does a totally different job, but what if the plugin is getting an input from trigger from the content data of a post or changing the layout ?

Can you imagine in what mess the post will end up if you have more than 20 plugins running on your site?

TubePress.NET works on the same level as the wordpress engine which means that it uses core functions together with its own classes and functions, and does not make use of the WP plugins API (hooks).
The only api function that TubePress actually uses is to create the menu inside the admin panel. This should be safe as long as the functions called have a unique name.

If you get stuck and still having problems with importing youtube videos to wordpress please let me know and I will be pleased to assist you.

Aug
26
URL file-access is disabled in the server configuration
Posted by Mario Mansour in TubePress

It has came to my attention that some of you are having problems running TubePress.NET on their hosting servers.
If you are getting Warning Messages like this one
Warning: simplexml_load_file() [function.simplexml-load-file]: URL file-access is disabled in the server configuration in /xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/wp-content/plugins/tubepress.net/tubepress.php on line 384
Where xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx is the path to the wordpress installation on your server

This means that your server configuration is blocking external file access, which in consequence blocks TubePress from accessing Youtube.
Solution:
allow_url_fopen should be ON in PHP configuration (php.ini). Probably, you don’t have access to edit this file and it could also be that your hosting company has restricted changing the allow_url_fopen value. In this case, you should refer to them and ask them to set the value of allow_url_fopen to ON.

On my side, TubePress will try to change the value of allow_url_fopen but if this action is restricted, it will ask you to contact your web hosting provider.
Many users have been asking me to recommend a good hosting. To be honest none cheap web hosting provider is perfect, you have to make a compromise between budget and requirements. It is obvious that the more you require from your server the more you will need to pay and the more you disregard features the more your hosting bills will shrink.
Good web hosting companies that have affordable hosting plans are mediatemple, dreamhost, ThinkHost. I would also recommend you to have a dedicated server instead of a shared hosting, it gives more freedom and saves you some headaches.

Aug
18
Youtube Download
Posted by Mario Mansour in TubePress

Feel free to use this youtube downloader script to download your favorite video from youtube to your computer in a flash video format.
This service is FREE so please do not abuse.

If you are interested to run this script on your own website you can purchase the script for 20 USD only per each domain.


Aug
9
Patch Function
Posted by Mario Mansour in TubePress

Even large software companies never release perfect code, but the good thing is that one is always able to make patches. For some reasons, a simple “.” just vanished in the upgrade function which made the video player disappear from the content of old posts. This is the reason behind missing video noticed by those who recently upgraded TubePress.
Luckily, the excerpt part was working fine which I used to make this patch.
The new patch function that I included in the last update will account for this problem, restores the video player to the content and update the old post.
Thanks for all of those who are helping in the debug and the testing of this plugin especially Mark and Alin.

Aug
8
Duplication check reloaded
Posted by Mario Mansour in TubePress

In the course of the code rewrite, It appears that I forgot to implement a important feature of TubePress which is the ability to check for duplicate videos. A tool to automatically import videos from youtube is nice, however a useful tool is the one that allows you to do it in a smart way. Nobody wants to fill their wordpress database with the same video1 even if it matches to multiple criteria. Thanks to Alin for reminding me of this feature, which by the way is already implemented.
I added it as an option actually so you could choose to either check for duplication or not (although I doubt that someone would uncheck). This option is therefore set by default.

1Note that TubePress cannot in anyway distinguish the content of the video, it just checks the video id so if the same video is posted on youtube many time with different ids (different urls) it will pass the duplication test and would be imported. Youtube itself cannot solve this problem so I don’t you should be too worried about it.
Well, in case you are, I suggest that you choose carefully and wisely your tags when you import to avoid duplications. Not to mention that you could always go to your admin area and delete any post or page that you don’t like.

Aug
8
TubePress Template Tags
Posted by Mario Mansour in TubePress

Use these tags to make your own content and excerpt templates. Check wordpress templates to know the difference

  • %tp_player%: Displays the video player
  • %tp_thumbnail%: Displays the thumbnail image
  • %tp_title%: Displays the title of the video
  • %tp_description%: Displays the description of the video
  • %tp_duration%: Displays the length of the video
  • %tp_author%: Displays the username of the author
  • %tp_tags%: Displays the tags
  • %tp_rating_num%: Displays the video rating in numbers
  • %tp_rating_img%: Displays the video star rating images
  • %tp_viewcount%: Displays how many times the video was viewed
  • %tp_id%: Displays the video id
  • %tp_url%: Displays the youtube video url

You can use any of these tags to customize the appearance of your posts or pages along with normal HTML code. Note that this will affect the posts/pages that you import using TubePress and not your normal posts/pages that you write in your wordpress admin area.

TubePress allows you to create 2 types of templates. One for the content and one for the excerpt. For those of you who are not familiar with WP themes, wordpress stores and excerpt of a post or page along with the entire content. TubePress uses this functionality to differentiate between video listing and video watching.
To be considered: You should specify in your WP theme where you would like to show the content and where to show the excerpt of a post or page, however you don’t have to use both functions.

Use the_content() inside the loop in your wordpress theme to show the content. Alternatively, use the_excerpt() to show the excerpt.

Note that the templates should be defined before importing videos. Once the videos are imported, you can change the appearance, by logging in to your admin area -> Manage -> Posts or Pages and then Edit.
You can define different templates before each import you make.
Your last configuration is always saved for later use, as well as other input values like import tags and indexes.

Aug
5
TubePress 3.0 Finally Released
Posted by Mario Mansour in TubePress

I know many of you have been waiting so long for the upgrade of TubePress.Net. Well I must say it took some time :P but is finally available for download here.
Major changes:

  • Supports PHP 4 and PHP 5
  • Supports WordPress 2.2 and above (tested on 2.6): I actually rewrote all the code in a much efficient and better way to keep supporting future releases of WordPress even beyond 2.6
  • Added the ability to save the content as pages as well as posts
  • Video player customization including, border, related videos and color
  • Last by not least, one of the major changes in this new release is the content customization: Added template tags in order to change the look and feel of the content inside your post or page.
  • Added an upgrade function to keep backward compatibility with older TubePress versions. Since template tags were not available in older versions, so this function should take care of converting old tags into a standard template.
  • Removed the ability to change the setup and layout after importing the videos. However, you can always go into Manage, Posts (or Pages) and Edit them manually.

Note that the plugin should be compatible with any other wordpress plugin available on the web since I got rid of all fancy wordpress filters that other plugins rely on. In short words, TubePress.Net is your solution to create an automatic youtube-like website using WordPress.

I can’t help it not to mention the fact that I’m working on a new feature that allows you to upload videos to youtube from your TubePress admin panel. However I didn’t want to make you wait any longer to complete it so I decided to keep this feature for the next version. Enjoy TubePress and if you find it useful and helpful it would be nice if you consider making a paypal donation to show your support.

Mar
13
Syntax error on line 15
Posted by Mario Mansour in TubePress

For all those who still not have PHP 5 on their servers, I have fixed the famous
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ on line 15 which means that TubePress.net supports now PHP 4 and above. Still working on WP 2.3 and above compatible version.

About that and since the plugin is already and open source and to be licensed under GNU/GPL, I invited everyone to help out developing this plugin. All contributions will be credited in each plugin release.
Some contributors will even be given authors permissions on this blog to write their own reviews and ideas.
By the way I would like to welcome Viljo Hakala the first contributor to TubePress.net

IMPORTANT: If you already have PHP5 on your server then you don’t need this update
Now you can download the update here

Mar
13
Videohumour.tv based on Tubepress.net
Posted by Mario Mansour in TubePress

After posting the case study of my friend’s poker site in here, I got plenty of emails from people already using TubePress to post reviews about their websites and give them some comments how they could actually take advantage of the plugin to use its powerful features to optimize the performance of their site and attract more visitors.
I would like to ask TubePress.net users to post their comments and questions on this website, so that everyone can benefit from them and another thing that it would be more efficient in a way that I will be able to answer more questions instead of replying to the same question personally to each one.
As for the idea of posting reviews about websites using tubepress.net, I decided to take different samples targeting different application areas to show that how you can use this wordpress plugin to build video communities and mashup sites based on it.

That said, here’s a nice mashup site for funny videos called video humour. It’s a french site that uses TubePress.net plugin features to import videos from youtube and post them automatically in wordpress. They have imported more than 20,000 videos from youtube in a couple of days. We will see if they will succeed to build a good community around it.