RELEASE :: Greybox video Addon for pligg v1.0
This addon/hack is based on the pligg simple digg video addon.
Instead of using the thickbox module that comes with pligg we used the greybox javascript.
The thickbox popup is slow and gives some minor problems when you trying to close it. The greybox doesnt have this and loads the video files with no problems.
Also we have modified the code, so the windows match the video player size. instead of the default popup size with the thickbox addon.
the addon/hack is still in Development and hopefully ready by the end of the week.
Still need to resolve some minor isseus.
The hack automatically picks up submitted urls that belong to video sites this means it also works from the submit browser button or the firefox plugin that is available for pligg.
This hack should also allow you to rss syndicate video feeds from channels at the likes of LiveVideo.com and have them automatically insert the videos into your pligg stories with the digglike display intact.
Currently Supported Sites
1. Google Video
2. YouTube
3. Xoinks
4. Revver
5. My Space
6. Vimeo
7. Veoh
8. MetaCafe
9. iFilm
10. Guba
11. Daily Motion
12. Stage6Divx
13. MSN Soapbox
14. Live Video
15. GoFish
16. YouAreTv
17. LiveLeak
18. CollegeHumour
Greybox video Addon for pligg v1.0
Installation: Easy
Files to edit: 2
Download
http://mijnblogonline.nl/Greybox%20v...igg%20v1.0.zip
Included is the greybox
Included is play.php
Included is videovar.tpl
put the greybox folder in the ROOT of your webserver
put the play.php in the ROOT of your webserver
put the videovar.tpl in the template folder of the template you are using
open pligg.tpl
ADD after <head>
PHP Code:
<script type="text/javascript">
var GB_ROOT_DIR = "{$my_pligg_base}/greybox/";
</script>
<script type="text/javascript" src="{$my_pligg_base}/greybox/AJS.js"></script>
<script type="text/javascript" src="{$my_pligg_base}/greybox/AJS_fx.js"></script>
<script type="text/javascript" src="{$my_pligg_base}/greybox/gb_scripts.js"></script>
<link href="{$my_pligg_base}/greybox/gb_styles.css" rel="stylesheet" type="text/css" />
Open link_summary.tpl
find
PHP Code:
{if $pagename eq "story"}
<a href="{$url}">{$title_short}</a>
{else}
<a href="{$story_url}">{$title_short}</a>
{/if}
{/if}
</div>
After add
PHP Code:
{if $url_short eq "http://www.collegehumor.com" || $url_short eq "http://www.guba.com" || $url_short eq "http://video.google.com" || $url_short eq "http://video.google.co.uk" || $url_short eq "http://video.google.nl" || $url_short eq "http://youtube.com" || $url_short eq "http://www.youtube.com" || $url_short eq "http://uk.youtube.com" || $url_short eq "http://br.youtube.com" || $url_short eq "http://fr.youtube.com" || $url_short eq "http://ie.youtube.com" || $url_short eq "http://it.youtube.com" || $url_short eq "http://jp.youtube.com" || $url_short eq "http://nl.youtube.com" || $url_short eq "http://pl.youtube.com" || $url_short eq "http://es.youtube.com" || $url_short eq "http://www.livevideo.com" || $url_short eq "http://www.youare.tv" || $url_short eq "http://youare.tv" || $url_short eq "http://stage6.divx.com" || $url_short eq "http://www.metacafe.com" || $url_short eq "http://soapbox.msn.com" || $url_short eq "http://www.gofish.com" || $url_short eq "http://www.ifilm.com" || $url_short eq "http://www.veoh.com" || $url_short eq "http://vimeo.com" || $url_short eq "http://www.vimeo.com" || $url_short eq "http://vids.myspace.com" || $url_short eq "http://one.revver.com" || $url_short eq "http://xoinks.com" || $url_short eq "http://www.xoinks.com" || $url_short eq "http://www.dailymotion.com" || $url_short eq "http://www.liveleak.com" }
<div class="vidimage">
<a href="{$my_pligg_base}/play.php?id={$link_id}" {include file='templates/TEMPLATE NAME/videovar2.tpl'}>
<img src="http://msnsearch.srv.girafa.com/srv/i?s=MSNSEARCH&r={$url_short}" width="80" height="66" border="0" alt="View the Video file {$title_short}" /></a>
</div>
{/if}
DONT FORGET to change in link_summary.tpl
PHP Code:
{include file='templates/TEMPLATE NAME/videovar2.tpl'}>
Open your template css
at the end of the file ADD
PHP Code:
/* Video Image */
.vidimage {float:left;padding:4px;margin: 0px 10px 0px 0px; background:#e1e1e1; border:1px;}
Greets thuggster
p.s
Adam i hope you dont mind i used some of your text from the thickbox forum post 