I chose to start a thread in the forum , continuing
this news post (much easy to folow and, posts can be edited and can be bumped when there is a new version)
inTHEtube is a tiny (zipped in less then 30kb zip file) - but very colorful module to your XOOPS site, letting you add YouTube search and/or custum-keywords videos to your site.Search results from youTube are presented as thumbnails in your site and also the real-size videos are presented in your site (future version will let you choose if to embed the movies in your site or lead to the video @ YouTube.
inTHEtube is great for spicing up your sites, adding some colour and movement ...Screenshot: Module features:1. you can choose as much keywords as you want, each keyword with the number of videos you want it to show is defined in the admin side and presented at the user side (scroll-down menu with the the keywords).
2. you can choose which keyword(s) will be the default and it's videos will be shown in the first module page.
3. you can choose it to show search box or not (at the admin)
4. you can choose if to show custum keywords or not (in the fron-end side).
5. you can call the module with a url - means other modules can wake the inTHEtube from withing .... (details below).
6. you can limit the results to your YouTube account only (see the code below, will be @ the admin in future versions).
7. thumbnails are pulling the "alt" and "title" of the movie from youtube.
8. Search is AJAX based with no reaload of your page.
9. When making a new search, a new results line is apearing without deleting your last search.
10. More to come ...
Demo and download in our site: Gifts45 -
Gifts & Shopping DirectoryCompability:xoops version 2.0.x , 2.2.x
(tested just with 2.2.4 , but should work with all versions)
Should also work with the "clones" (Cube + ?????Cms) , though wasn't tested.
Installation:Upload to modules directory and install as usual...
Change the title of the block from gifts to whatever keyword you choose as your default keyword.
Set up other config options in the XOOPS Preferences for the module...
Interaction with other modules:You can call inTHEtube from anywhere (or any other XOOPS module) with a url call (like:
[size=xx-small]http://www.mysite.com/modules/inthetube/index.php?keyword=
&num=[/size]
so it's easy to add it to XOOPS search or cbb search or any other module (tags , article and so on ...)
Making the module working with your YouTube account:
To show only videos from your account :
open inthetube/templates/inthetube.html
look for:
<h2>YouTube video search: <{$inthetubekeywords}>h2>
<div id="youtubeDiv" style="display: block; clear: both">
div>
<script>
insertVideos('youtubeDiv','search','<{$inthetubekeywords}>','<{$inthetubenum}>',1);
script>
Replace with:
<h2>YouTube video search: <{$inthetubekeywords}>h2>
<div id="youtubeDivUser" style="display: block; clear: both">
div>
<script>
insertVideos('youtubeDivUser','[b]--user--[/b]','<{$inthetubekeywords}>','<{$inthetubenum}>',1);
script>
Just replace "--user--" with your YouTube username
Issues/bugs:
No known bugs (yet?) ... but there are some Ajax issues with some charsets, and the module won't send the keywords to Youtube as it should ...
Those are incompibilities with the charsets defined in your site and are not always connected to the content being sent by the module to youTube.
(means: you can use utf-8 instead of iso-8859-6 , iso-8859-8 or windows-1255)
For now I only know of arabic and hebrew that has the issue.
Comments are welcome - especially since the module is ajax and css based, and when dealing with a lot of client-side staff, there might always be browsers incompibilities ... (none reported yet).
while in our site ( http://www.gifts45.com ) feel free to add your site (gifts or shopping related) and promote it @ the forums ... for free ofcourse
Versions (changelog)
verion 0.9.0:
First realease.
The module code is still a bit masssy and should be cleaned.
Most of the language vars are hardcoded.
Still no blocks.
[b]Still - it's ready for production/[b], so it better serve the one that need a little spice for their site.
verion 0.9.1:
Added titles of the movies in thumbnails.
Language has been cleaned a bit.
Added instructions of how to limit results to your youtube account (readme file)
Added instructions of how to lead results to youtube instead of opening in your site (overlay) (readme file)
Enjoy
Tzvook