|
View previous topic :: View next topic |
| Author |
Message |
burnz Newbie


Offline Joined: Sep 02, 2005 Posts: 4 Location: Malaysia
|
Posted: Thu Aug 24, 2006 6:14 am Post subject: [Tutorial] BBCode mod for YouTube |
|
Hi all,
Here is my first tutorial. Please let me know if you guys have any problem with it..
With this mod you can include youtube movie just by using the youtube provided movie URL eg: www.youtube.com/watch?v=f5Fg6KFcOsU
Note:
1. Make another update to the js files. Not to edit another js function, instead create another js function for youtube. Tested with default nbbcode.php and bbcode.js and its work.
burnz's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux OS / Apache 1.3.37 (Unix) / MySQL 4.1.21-standard / PHP 4.4.3 / DragonFlyCMS 9.0.6.1
Last edited by burnz on Thu Aug 24, 2006 6:32 pm; edited 3 times in total |
|
| Back to top |
|
 |
Ronin Dragonfly addicted


Offline Joined: Jun 07, 2004 Posts: 475 Location: Calgary, AB
|
Posted: Thu Aug 24, 2006 12:58 pm Post subject: Re: [Tutorial] BBCode mod for YouTube |
|
Sounds great! Any chance of a google video version as well? I imagine it would be very similar.
_________________ Cheers,
Ronin
Ronin Technologies
Dragonfly Google Maps Module
Ronin's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Lunarpages Linux / 1.3.37 / 4.1.22-standard-log / 4.4.4 / 9.1.2.5
|
|
| Back to top |
|
 |
MikieMouse 500+ Posts Club


Offline Joined: Jun 27, 2004 Posts: 500 Location: South Dakota
|
Posted: Thu Aug 24, 2006 1:30 pm Post subject: Re: [Tutorial] BBCode mod for YouTube |
|
It looks like you just included the img for the bbcode and an html file that had some youtube clips, but no code to add to the nbbcode.php file? Or am I missing something completely obvious?
_________________ EHP Webmaster
www.ehpdesigns.com
MikieMouse's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux OS / Apache 1.3.34 / MySQL 4.1.22 / PHP 4.4.7/ DF 9.1.2.1
|
|
| Back to top |
|
 |
burnz Newbie


Offline Joined: Sep 02, 2005 Posts: 4 Location: Malaysia
|
Posted: Thu Aug 24, 2006 3:14 pm Post subject: Re: [Tutorial] BBCode mod for YouTube |
|
| MikieMouse wrote: |
| It looks like you just included the img for the bbcode and an html file that had some youtube clips, but no code to add to the nbbcode.php file? Or am I missing something completely obvious? |
extract the zip file and read the txt file included in the zip file.
burnz's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux OS / Apache 1.3.37 (Unix) / MySQL 4.1.21-standard / PHP 4.4.3 / DragonFlyCMS 9.0.6.1
|
|
| Back to top |
|
 |
MikieMouse 500+ Posts Club


Offline Joined: Jun 27, 2004 Posts: 500 Location: South Dakota
|
Posted: Thu Aug 24, 2006 3:34 pm Post subject: Re: [Tutorial] BBCode mod for YouTube |
|
| burnz wrote: |
| extract the zip file and read the txt file included in the zip file. |
I did, but there are only two files included in the zip file (downloaded it twice now). One is the youtube.gif file and the other is the .html file. Has anyone else got the text file in that zip?
_________________ EHP Webmaster
www.ehpdesigns.com
MikieMouse's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux OS / Apache 1.3.34 / MySQL 4.1.22 / PHP 4.4.7/ DF 9.1.2.1
|
|
| Back to top |
|
 |
WebSiteGuru 1000+ Posts Club


Offline Joined: Jun 09, 2005 Posts: 2318
|
Posted: Thu Aug 24, 2006 3:41 pm Post subject: Re: [Tutorial] BBCode mod for YouTube |
|
This is not modules, not from where I am looking at. No offend intended. The index.html file only have flash object builded in to it, I could have done that myself with the block [flash]http://www.youtube.com/watch?v=f5Fg6KFcOsU[/flash] to display the movie.
_________________ Lead Theme Designer - WebSiteGuru Designs
WebSiteGuru's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux 2.6.9 / Apache 2.2.6 / MySQL 5.0.27 / PHP 5 / DF Version 9.2.1
|
|
| Back to top |
|
 |
MikieMouse 500+ Posts Club


Offline Joined: Jun 27, 2004 Posts: 500 Location: South Dakota
|
Posted: Thu Aug 24, 2006 3:45 pm Post subject: Re: [Tutorial] BBCode mod for YouTube |
|
Actually, WSGuru, that won't work. Because the "flash" button looks for a file type in the URL (ie swf, fla, etc) and if its not there then you just get a text output. See below: [flash]http://www.youtube.com/watch?v=f5Fg6KFcOsU[/flash]
_________________ EHP Webmaster
www.ehpdesigns.com
MikieMouse's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux OS / Apache 1.3.34 / MySQL 4.1.22 / PHP 4.4.7/ DF 9.1.2.1
|
|
| Back to top |
|
 |
WebSiteGuru 1000+ Posts Club


Offline Joined: Jun 09, 2005 Posts: 2318
|
Posted: Thu Aug 24, 2006 3:52 pm Post subject: Re: [Tutorial] BBCode mod for YouTube |
|
My bad!  You are right. It wont work with the flash tag.
But you can build it into the block-YouTube.php file and it will work as a block.
_________________ Lead Theme Designer - WebSiteGuru Designs
WebSiteGuru's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux 2.6.9 / Apache 2.2.6 / MySQL 5.0.27 / PHP 5 / DF Version 9.2.1
|
|
| Back to top |
|
 |
burnz Newbie


Offline Joined: Sep 02, 2005 Posts: 4 Location: Malaysia
|
Posted: Thu Aug 24, 2006 4:08 pm Post subject: Re: [Tutorial] BBCode mod for YouTube |
|
the problem is the block is to small to display the youtube movie..  or maybe i don't know the other way or the small youtube movie...
burnz's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux OS / Apache 1.3.37 (Unix) / MySQL 4.1.21-standard / PHP 4.4.3 / DragonFlyCMS 9.0.6.1
|
|
| Back to top |
|
 |
spacebar Dragonfly addicted


Offline Joined: Sep 28, 2005 Posts: 413 Location: Providence
|
Posted: Thu Aug 24, 2006 5:13 pm Post subject: Re: [Tutorial] BBCode mod for YouTube |
|
| Code:: |
#
#-----[ OPEN ]------------------------------------------
#
includes/javascript/nbbcode.js |
Should be:
| Code:: |
#
#-----[ OPEN ]------------------------------------------
#
includes/javascript/bbcode.js |
Right?
Also, following the instructions I get a javascript message saying youtube_help is undefined. Also, the prompt for the url asks for email, instead of the youtube url.
_________________

spacebar's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Unix / 2.0.46 (Red Hat) / 0.9.7a / 4.1.9-standard / 4.3.2 / 9.0.6.1
|
|
| Back to top |
|
 |
spacebar Dragonfly addicted


Offline Joined: Sep 28, 2005 Posts: 413 Location: Providence
|
Posted: Thu Aug 24, 2006 5:51 pm Post subject: Re: [Tutorial] BBCode mod for YouTube |
|
In bbcode.js I had to define the youtube_help variable as such...
| Code:: |
var youtube_help="Insert video from YouTube: [youtube]YouTube URL[/youtube]";
|
Also, I had to code the BBCwmi function as such. The 3 redeclarations of URL were not working for me.
| Code:: |
function BBCwmi(form, field, type) {
var URL = prompt("Please enter image URL","http://"); }
if (type == 'youtube') { URL = prompt("Please enter YouTube URL","http://"); }
if (type == 'email') { URL = prompt("Enter the Email Address",""); }
if (URL == null) { return; }
if (!URL) { return alert("Error : You didn't write the Address"); }
BBCwrite(form, field, '', "["+type+"]"+URL+"[/"+type+"]", true);
}
|
_________________

spacebar's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Unix / 2.0.46 (Red Hat) / 0.9.7a / 4.1.9-standard / 4.3.2 / 9.0.6.1
|
|
| Back to top |
|
 |
burnz Newbie


Offline Joined: Sep 02, 2005 Posts: 4 Location: Malaysia
|
Posted: Thu Aug 24, 2006 6:17 pm Post subject: Re: [Tutorial] BBCode mod for YouTube |
|
spacebar, I've done updating the mod, create a new js function for youtube rather than edit an existing js function. Please re-download.
it's should be
| Code:: |
youtube_help="Insert video from YouTube: [youtube]YouTube URL[/youtube]"; |
not
| Code:: |
var youtube_help="Insert video from YouTube: [youtube]YouTube URL[/youtube]"; |
remove the var commands
Thanks for your patient...
burnz's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux OS / Apache 1.3.37 (Unix) / MySQL 4.1.21-standard / PHP 4.4.3 / DragonFlyCMS 9.0.6.1
|
|
| Back to top |
|
 |
farbird Nice poster


Offline Joined: Sep 19, 2005 Posts: 121
|
Posted: Sun Jan 21, 2007 6:27 pm Post subject: Re: [Tutorial] BBCode mod for YouTube |
|
can this work with the latest release of dragonfly?
ie 9.1.10..
farbird's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) 9.0.6.1
|
|
| Back to top |
|
 |
MikieMouse 500+ Posts Club


Offline Joined: Jun 27, 2004 Posts: 500 Location: South Dakota
|
Posted: Mon Jan 22, 2007 2:30 pm Post subject: Re: [Tutorial] BBCode mod for YouTube |
|
| farbird wrote: |
can this work with the latest release of dragonfly?
ie 9.1.10.. |
Yes...I have actually developed an entire hack for the nbbcode that includes a button for YouTube, MySpace, and Google videos as well as a button for MP3s, Quicktime movies, and a Flash Media Player.
Check it out here for DF 9.0.6.1 or here for DF 9.1.1.
_________________ EHP Webmaster
www.ehpdesigns.com
MikieMouse's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux OS / Apache 1.3.34 / MySQL 4.1.22 / PHP 4.4.7/ DF 9.1.2.1
|
|
| Back to top |
|
 |
SnoSheriff Heavy poster


Offline Joined: Mar 27, 2005 Posts: 174
|
Posted: Wed Jan 24, 2007 3:51 am Post subject: Re: [Tutorial] BBCode mod for YouTube |
|
| MikieMouse wrote: |
| I have actually developed an entire hack for the nbbcode that includes a button for YouTube, MySpace, and Google videos as well as a button for MP3s, Quicktime movies, and a Flash Media Player. |
Will this work for other video feed sites that aren't listed above? Examples: liveleak.com, break.com...
Does this hack work with regular forums module (non Forums Pro)?
_________________ XJBikes.com
SnoSheriff's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache=1.3.41/MySQL=5.0.87-community/PHP=5.2.6/DFCMS=9.2.1
|
|
| Back to top |
|
 |
|
|