Adding video to your DF site

Dragonfly integration forum

Adding video to your DF site

Postby robojerk » Sat May 19, 2007 5:28 am

Once I am done making the gif image, I'll have a hack to include video from FileFront =)

I'll also include a strikethru text button thanks to the guys over at Myndworx.com
Image
For the Horde!
Image
User avatar
robojerk
WR.net Master
WR.net Master
 
Posts: 484
Joined: Wed Jul 05, 2006 12:17 am
Location: -The OmniMatrix- Web 3.0

Adding video to your DF site

Postby robojerk » Sat May 19, 2007 6:21 am

Open {site_root}/includes/nbbcode.php

Find
Code: Select all
    b_help "'. $bbcode_common['bold'][0].' '.$bbcode_common['bold'][1].'"


After it ADD
Code: Select all
    filefront_help="'. $bbcode_common['filefront'][0].' '.$bbcode_common['filefront'][1].'";
    
strike_help="'. $bbcode_common['strike'][0].' '.$bbcode_common['strike'][1].'"


Find
Code: Select all
        <img alt="'.$bbcode_common['video'][0].'" class="bbcbutton" onmouseover="helpline(\''.$form.'\',\''.$field.'\',\'video\')" onclick="BBCmm(\''.$form.'\',\''.$field.'\',\'video\')" name="video" src="'.$bbbttns_path.'video.gif" border="0" /> 

After it ADD
Code: Select all
        <img alt="'.$bbcode_common['filefront'][0].'" class="bbcbutton" onmouseover="helpline(\''.$form.'\',\''.$field.'\',\'filefront\')" onclick="BBCwmi(\''.$form.'\',\''.$field.'\',\'ffvideo\')" name="filefront" src="'.$bbbttns_path.'filefront.gif" border="0" />
        <
img alt="'.$bbcode_common['strike'][0].'" class="bbcbutton" onmouseover="helpline(\''.$form.'\',\''.$field.'\',\'strike\')" onclick="BBCcode(\''.$form.'\',\''.$field.'\',this)" name="strike" src="'.$bbbttns_path.'strike.gif" /> 

Find
Code: Select all
// [flash width= height= bgcolor= ] and [/flash] code..
            
$patterns[] = "#\[flash width=([0-9]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9]) bgcolor=([^ \"\n\r\t<]*?)\]((ht|f)tp://)([^ \?&=\"\n\r\t<]*?(\.(swf|fla)))\[/flash\]#si";
            
$replacements[] = '<center><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="\\1" height="\\2">
            <param name="movie" value="\\4\\6">
            <param name="quality" value="high">
            <param name="scale" value="noborder">
            <param name="bgcolor" value="#\\3">
            <embed src="\\4\\6" quality="high" scale="noborder" bgcolor="#\\3" width="\\1" height="\\2" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
            </embed></object></center>'

After it add
Code: Select all
    // [ffvideo] value [/ffvideo]
    
$patterns[] = "#\[ffvideo\]([^ \"\n\r\t<]*?)\[/ffvideo\]#si";
    
$replacements[] = '<center><object width="450" height="338"><param name="movieID" value="http://static.filefront.com/ffv6/player/vp_embed.swf?v=\\1&autorun=false"></param><param name="wmode" value="transparent"></param><embed src="http://static.filefront.com/ffv6/player/vp_embed.swf?v=\\1&autorun=false" type="application/x-shockwave-flash" wmode="transparent" width="450" height="338"></embed></object></center>';

        
# [strike] and [/strike] for striking through text.
        
$patterns[] = '#\[strike\](.*?)\[/strike\]#si';
        
$replacements[] = '<span style="text-decoration: line-through">\\1</span>'

Save & Close {site_root}/includes/nbbcode.php

Open {site_root}/includes/javascript/bbcode.js

Find
Code: Select all
    if (type == 'img') { var URL prompt("Please enter image URL","http://"); } 

After it add
Code: Select all
    else if (type == 'ffvideo') { var URL prompt("Please enter the FileFront video ID",""); } 

Save & Close {site_root}/includes/javascript/bbcode.js

Open {site_root}/language/english/bbcode.php

Find
Code: Select all
    'flash'     => array('Insert flash file:','[flash width=# height=#]flash URL[/flash]'), 

After it add
Code: Select all
    'filefront'    => array('Insert video from FileFront:','[ffvideo]FileFront Video ID[/ffvideo]'),
    
'strike'    => array('Strike:','[strike]text[/strike]'), 

Save & Close {site_root}/language/english/bbcode.php
Attachments
bbcode_buttons.zip
(1.86 KiB) Downloaded 312 times
Last edited by robojerk on Sat May 19, 2007 6:45 am, edited 1 time in total.
Image
For the Horde!
Image
User avatar
robojerk
WR.net Master
WR.net Master
 
Posts: 484
Joined: Wed Jul 05, 2006 12:17 am
Location: -The OmniMatrix- Web 3.0

Adding video to your DF site

Postby robojerk » Sat May 19, 2007 6:24 am

FileFront video embedded example
http://www.vraxtus.com/index.php?name=F ... opic&t=146

Notes on FileFront Video.
You need to input the video ID. The Video ID however is NOT in the url. It's located in the embed link. Kind of confusing I know, but it's out of my control.
Last edited by robojerk on Sat May 19, 2007 6:58 am, edited 1 time in total.
Image
For the Horde!
Image
User avatar
robojerk
WR.net Master
WR.net Master
 
Posts: 484
Joined: Wed Jul 05, 2006 12:17 am
Location: -The OmniMatrix- Web 3.0

Adding video to your DF site

Postby robojerk » Sun May 20, 2007 5:34 am

Anyone try my filefont video embedding code?
Image
For the Horde!
Image
User avatar
robojerk
WR.net Master
WR.net Master
 
Posts: 484
Joined: Wed Jul 05, 2006 12:17 am
Location: -The OmniMatrix- Web 3.0

Adding video to your DF site

Postby Deeo » Thu May 31, 2007 7:31 pm

hmm, used the buttons, they didnt work with firefox correctly:

no help, and email script instead of Youtub/google video ID script

with IE everything works fine.

Example to see buttons

Edit:

Dont know why. Today everything works fine oO
Last edited by Deeo on Mon Jun 04, 2007 10:59 pm, edited 1 time in total.
Deeo
WR.net Journeyman
WR.net Journeyman
 
Posts: 80
Joined: Mon Jul 10, 2006 2:02 pm

Previous

Return to Dragonfly

Who is online

Users browsing this forum: No registered users and 1 guest

cron