Home Private Messages Search
CPG Dragonfly™ CMS stopsoftwarepatents.eu petition banner
Toggle Content
 
Forums ⇒ DragonflyCMS ⇒ Add-Ons & Blocks ⇒ [Tutorial] BBCode mod for YouTube


[Tutorial] BBCode mod for YouTube
Need help creating a block or add-on, or you have created or modified a block/add-on that works in Dragonfly CMS and it meets the CPG Security Requirements? Do you have feedback about a specific add-on? Here is the place to post. Read the announcements here first!.
Go to page 1, 2  Next
Post new topic    Reply to topic    Printer Friendly Page     Forum Index ⇒  Add-Ons & Blocks

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

Offline Offline
Joined: Sep 02, 2005
Posts: 4
Location: Malaysia
PostPosted: 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
View user's profile Visit poster's website
Ronin
Dragonfly addicted
Dragonfly addicted

Offline Offline
Joined: Jun 07, 2004
Posts: 475
Location: Calgary, AB
PostPosted: 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
View user's profile Visit poster's website Photo Gallery
MikieMouse
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Jun 27, 2004
Posts: 500
Location: South Dakota
PostPosted: 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
View user's profile Visit poster's website AIM Address MSN Messenger Yahoo Messenger
burnz
Newbie
Newbie

Offline Offline
Joined: Sep 02, 2005
Posts: 4
Location: Malaysia
PostPosted: 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
View user's profile Visit poster's website
MikieMouse
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Jun 27, 2004
Posts: 500
Location: South Dakota
PostPosted: 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
View user's profile Visit poster's website AIM Address MSN Messenger Yahoo Messenger
WebSiteGuru
1000+ Posts Club
1000+ Posts Club

Offline Offline
Joined: Jun 09, 2005
Posts: 2318

PostPosted: 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
View user's profile Visit poster's website Yahoo Messenger
MikieMouse
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Jun 27, 2004
Posts: 500
Location: South Dakota
PostPosted: 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
View user's profile Visit poster's website AIM Address MSN Messenger Yahoo Messenger
WebSiteGuru
1000+ Posts Club
1000+ Posts Club

Offline Offline
Joined: Jun 09, 2005
Posts: 2318

PostPosted: Thu Aug 24, 2006 3:52 pm
Post subject: Re: [Tutorial] BBCode mod for YouTube

My bad! Embarassed 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
View user's profile Visit poster's website Yahoo Messenger
burnz
Newbie
Newbie

Offline Offline
Joined: Sep 02, 2005
Posts: 4
Location: Malaysia
PostPosted: 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.. Smile 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
View user's profile Visit poster's website
spacebar
Dragonfly addicted
Dragonfly addicted

Offline Offline
Joined: Sep 28, 2005
Posts: 413
Location: Providence
PostPosted: 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
View user's profile Visit poster's website ICQ Number AIM Address MSN Messenger Yahoo Messenger
spacebar
Dragonfly addicted
Dragonfly addicted

Offline Offline
Joined: Sep 28, 2005
Posts: 413
Location: Providence
PostPosted: 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
View user's profile Visit poster's website ICQ Number AIM Address MSN Messenger Yahoo Messenger
burnz
Newbie
Newbie

Offline Offline
Joined: Sep 02, 2005
Posts: 4
Location: Malaysia
PostPosted: 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... Smile


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
View user's profile Visit poster's website
farbird
Nice poster
Nice poster

Offline Offline
Joined: Sep 19, 2005
Posts: 121

PostPosted: 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
View user's profile Visit poster's website
MikieMouse
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Jun 27, 2004
Posts: 500
Location: South Dakota
PostPosted: 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
View user's profile Visit poster's website AIM Address MSN Messenger Yahoo Messenger
SnoSheriff
Heavy poster
Heavy poster

Offline Offline
Joined: Mar 27, 2005
Posts: 174

PostPosted: 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
View user's profile Visit poster's website
Display posts from previous:   
Post new topic    Reply to topic    Printer Friendly Page    Forum Index ⇒  Add-Ons & Blocks
Page 1 of 2
All times are GMT
Go to page 1, 2  Next



Jump to:  


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


 
   Toggle Content User Info

Welcome Anonymous

Nickname
Password
(Register)

   Toggle Content Last CVS commits
· Fixed .ico Expires header.
· Removed domain name from cookies so subdomains wont access them anymore.
· CSS and JS, case insensitives.
· CSS and JS, send correct HTTP 1.1 headers and fixed issues where themes and...
· Further security class improvements.
· 301 redirects on LEO changes
· Option to force 3xx http status codes
· Validate googlebot.com and google.com crawlers.
· CCBot
· Rss with etag and atom.

read more...

   Toggle Content Community

Support for DragonflyCMS in a other languages:

Deutsch
Español

   Toggle Content X-links
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
Interactive software released under GNU GPL, Code Credits, Privacy Policy