Форуми / Cotonti / Support / youtube , metacafe video's in forum

123>>>

HarryRag
#1 25.02.2009 20:39
Hello,

With Sed there was the BB code function for embedded Youtube, google, metacafe and some more video's.
And we had quit some video's posted on our site with funny stuff.


Is there an option to get these in the forums again.
In pages i just could copy past the <embeded>.........</embeded> url which i got from youtube and the video shows up.
But the same code doesn't seem to work in the Forums.

Should there be created custom BB code in the adminpanel >> others>> BB code or should they be added as a core hack like they where in Sed?



Regards,
HarryRag
[center][url=<a href="">http://www.true-gamers.nl]True</a> &amp; Honest Gamers[/url][/center]
Lombi
#2 25.02.2009 20:44
No, this is integrated functionality now. Check the bbcode, youtube should be there, i'm not sure about metacafe though. So take one and see how it's designed and replicated that onto metacafe.
<a href="http://www.domenlo.com">Surreal Art</a>
HarryRag
#3 25.02.2009 21:21
Just had look in Admin>>Others>>BBcode, can't seem to find youtube code there.
Got our site running on Genesis 0.0.3, while upgradig i replaced all files in the package.

Both versions below won't work for me:
[youtube]HI1S6bKrh6w[/youtube]
[youtube=HI1S6bKrh6w]

What should be other files to look, already checked the system functions.php and the core>forums files but can't find any of that stuff there to.

Can't find those bbcodes in markitup plugin also.
[center][url=<a href="">http://www.true-gamers.nl]True</a> &amp; Honest Gamers[/url][/center]

Відредаговано: HarryRag (25.02.2009 21:29, 15 років тому)
Trustmaster
#4 25.02.2009 21:30
An example for youtube.

  • Name: youtube
  • Type: pcre
  • Pattern:
    \[youtube\]([^\s"\';&\?\(\[]+)\[/youtube\]
    
  • Replacement:
    <object width="425" height="350">
    
    <param name="movie" value="http://www.youtube.com/v/$1"></param>
    
    <embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" width="425" height="350"></embed>
    
    </object>
    
  • Container: on
Other fields are just default.[/]
May the Source be with you!
HarryRag
#5 25.02.2009 23:26
Thnx Trustmater,
Got these also working now.


For Google video
\[googlevideo\]([^\s"\';&\?\(\[]+)\[/googlevideo\]
<embed style="width:512px; height:392px;" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=$1&hl=en-GB"></embed>

For Gametrailers.com

\[games\]([^\s"\';&\?\(\[]+)\[/games\]
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="gtembed" width="512" height="392"> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="true" /> <param name="movie" value="http://www.gametrailers.com/remote_wrap.php?mid=$1"/> <param name="quality" value="high" /> <embed src="http://www.gametrailers.com/remote_wrap.php?mid=$1" swLiveConnect="true" name="gtembed" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="512" height="392"></embed> </object>

For Yahoo Video
\[yahoo\]([^\s"\';&\?\(\[]+)\[/yahoo\]
<object width="512" height="392"><param name="movie" value="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.4" /><param name="allowFullScreen" value="true" /><param name="flashVars" value="id=$1"/>
<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.4" type="application/x-shockwave-flash" width="512" height="392" allowFullScreen="true" flashVars="id=$1"></embed></object>

For MetaCafe.com
\[metacafe\]([^\s"\';&\?\(\[]+)\[/metacafe\]
<embed style="width:512px; height:392px;" src="http://www.metacafe.com/fplayer/$1" width="512" height="392" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed

For DailyMotion.com
\[dmotion\]([^\s"\';&\?\(\[]+)\[/dmotion\]
<object width="512" height="392"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.dailymotion.com/swf/$1&related=0" /><embed src="http://www.dailymotion.com/swf/$1&related=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="512" height="392"></embed></object>

To add the codes to the Markitup plugin:

Fule plugins/markitup/js/set.js

Add after line 85: {name: L.spoiler, className: 'mSpoiler', openWith:'[spoiler=[![' + L.spoiler_text + ']!]]', closeWith:'[/spoiler]'},

These lines:
{name: L.dmotion, className: 'mDmotion', openWith:'[dmotion]', closeWith:'[/dmotion]'},
			{name: L.games, className: 'mGames', openWith:'[games]', closeWith:'[/games]'},
			{name: L.googlevideo, className: 'mGooglevideo', openWith:'[googlevideo]', closeWith:'[/googlevideo]'},
			{name: L.metacafe, className: 'mMetacafe', openWith:'[metacafe]', closeWith:'.swf[/metacafe]'},
			{name: L.yahoo, className: 'mYahoo', openWith:'[yahoo]', closeWith:'[/yahoo]'},
			{name: L.youtube, className: 'mYoutube', openWith:'[youtube]', closeWith:'[/youtube]'}


Added .swf to the closing of /metacafe cause that needs to be at the end of the line.



And to give them the name needed in the dropdown:
In /plugins/markitup/lang/en.lang.js and/or ru.lang.js

after line 54 yellow:		'Yellow',

add:
        dmotion:	'DailyMotion',
	games:		'GameTrailers',
	googlevideo:    'GoogleVideo',
	metacafe:	'MetaCafe',
	yahoo:		'YahooVideo',
	youtube:	'YouTube'

The only thing missing at this point is the images for the embedded video links, that uses the quote image at this moment.

How to use tutorial[/][/][/][/][/]
[center][url=<a href="">http://www.true-gamers.nl]True</a> &amp; Honest Gamers[/url][/center]

Відредаговано: HarryRag (26.02.2009 02:41, 15 років тому)
CorpQuid
#6 26.02.2009 02:26
Are these going to be put in the core at some point? would be agood idea!
Trustmaster
#7 26.02.2009 02:43
Our policy is to choose plugins over in-core solutions if it is optional and is not going to be used by majority of sites (i.e. more than 60-80%). If it is possible to be done by a plugin, of course.
May the Source be with you!
HarryRag
#8 26.02.2009 02:54
Couldn't they all be added to the Markitup plugin, with the markitup.setup.php so it auto installs with the plug just like it does now the other BB codes in there.
Those are the only files used to get it working.

Or would you rather see it in a seperate plugin?
[center][url=<a href="">http://www.true-gamers.nl]True</a> &amp; Honest Gamers[/url][/center]
Brock
#9 26.02.2009 08:53
# HarryRag : Couldn't they all be added to the Markitup plugin, with the markitup.setup.php so it auto installs with the plug just like it does now the other BB codes in there.
Those are the only files used to get it working.

Or would you rather see it in a seperate plugin?

I think, personally, it should be done using a plugin that just inserts the rows. The "Seditio Compatibility" plugin does just that.
Web Design Database - www.wddb.com
HarryRag
#10 26.02.2009 19:51
Hmmmmmm there is also the youtube stuff that should be implanted as Lombi said.
But which didn't work for me, those settings didn't get added to the BBcode list.
Tried reinstalling the Sed Comp. plug but they still aren't added to the list, strange.
[center][url=<a href="">http://www.true-gamers.nl]True</a> &amp; Honest Gamers[/url][/center]
Brock
#11 27.02.2009 00:52
# HarryRag : Hmmmmmm there is also the youtube stuff that should be implanted as Lombi said.
But which didn't work for me, those settings didn't get added to the BBcode list.
Tried reinstalling the Sed Comp. plug but they still aren't added to the list, strange.

As far as I know, the Youtube / Metacafe / Google Video / whatever was implemented video wise in SED are not included in the compatibility plugin. I'm on a school computer right now, so I am not able to tell you if it is or not.
Web Design Database - www.wddb.com
HarryRag
#12 27.02.2009 05:52
line 83 to 96 of seditio plugin in seditio.setup.php

	if($cfg['parser_vid'])
	{
		sed_bbcode_add('youtube', 'pcre', '\[youtube=([^\s"\';&\?\(\[]+)\]', '<object width="425" height="350">
<param name="movie" value="http://www.youtube.com/v/$1"></param>
<embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" width="425" height="350"></embed>
</object>', true, 128, 'seditio');
		sed_bbcode_add('googlevideo', 'pcre', '\[googlevideo=([^\s"\';&\?\(\[]+)\]', '<embed style="width:425px; height:326px;" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=$1&hl=en-GB"> </embed>', true, 128, 'seditio');
		sed_bbcode_add('metacafe', 'pcre', '\[metacafe=([^\s"\';&\?\(\[]+)\]', '<embed style="width:425px; height:345px;" src="http://www.metacafe.com/fplayer/$1" width="400" height="345" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>', true, 128, 'seditio');
		sed_bbcode_add('flash', 'pcre', '\[flash\]([^\s"\';&\?\(\[]+\.swf)\[/flash\]', '<embed src="$1" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>', true, 128, 'seditio');
		sed_bbcode_add('flash', 'pcre', '\[flash w=(\d+) h=(\d+)\]([^\s"\';&\?\(\[]+\.swf)\[/flash\]', '<embed src="$3" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="$1" height="$2"></embed>', true, 128, 'seditio');
		sed_bbcode_add('divx', 'pcre', '\[divx\]([^\s"\';&\?\(\[]+\.divx)\[/divx\]', '<embed type="video/divx" src="$1" pluginspage="http://go.divx.com/plugin/download/" showpostplaybackad="false" custommode="Stage6"  object width="450" height="400"></embed>', true, 128, 'seditio');
		sed_bbcode_add('divx', 'pcre', '\[divx w=(\d+) h=(\d+)\]([^\s"\';&\?\(\[]+\.divx)\[/divx\]', '<embed type="video/divx" src="$3" pluginspage="http://go.divx.com/plugin/download/" showpostplaybackad="false" custommode="Stage6"  object width="$1" height="$2"></embed>', true, 128, 'seditio');
	}
}
[/][/][/][/][/][/][/]
[center][url=<a href="">http://www.true-gamers.nl]True</a> &amp; Honest Gamers[/url][/center]
Brock
#13 02.03.2009 05:16
To fix...

Change:
	if($cfg['parser_vid'])
	{
		sed_bbcode_add('youtube', 'pcre', '\[youtube=([^\s"\';&\?\(\[]+)\]', '<object width="425" height="350">
<param name="movie" value="http://www.youtube.com/v/$1"></param>
<embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" width="425" height="350"></embed>
</object>', true, 128, 'seditio');
		sed_bbcode_add('googlevideo', 'pcre', '\[googlevideo=([^\s"\';&\?\(\[]+)\]', '<embed style="width:425px; height:326px;" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=$1&hl=en-GB"> </embed>', true, 128, 'seditio');
		sed_bbcode_add('metacafe', 'pcre', '\[metacafe=([^\s"\';&\?\(\[]+)\]', '<embed style="width:425px; height:345px;" src="http://www.metacafe.com/fplayer/$1" width="400" height="345" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>', true, 128, 'seditio');
		sed_bbcode_add('flash', 'pcre', '\[flash\]([^\s"\';&\?\(\[]+\.swf)\[/flash\]', '<embed src="$1" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>', true, 128, 'seditio');
		sed_bbcode_add('flash', 'pcre', '\[flash w=(\d+) h=(\d+)\]([^\s"\';&\?\(\[]+\.swf)\[/flash\]', '<embed src="$3" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="$1" height="$2"></embed>', true, 128, 'seditio');
		sed_bbcode_add('divx', 'pcre', '\[divx\]([^\s"\';&\?\(\[]+\.divx)\[/divx\]', '<embed type="video/divx" src="$1" pluginspage="http://go.divx.com/plugin/download/" showpostplaybackad="false" custommode="Stage6"  object width="450" height="400"></embed>', true, 128, 'seditio');
		sed_bbcode_add('divx', 'pcre', '\[divx w=(\d+) h=(\d+)\]([^\s"\';&\?\(\[]+\.divx)\[/divx\]', '<embed type="video/divx" src="$3" pluginspage="http://go.divx.com/plugin/download/" showpostplaybackad="false" custommode="Stage6"  object width="$1" height="$2"></embed>', true, 128, 'seditio');
	}

To:

		sed_bbcode_add('youtube', 'pcre', '\[youtube=([^\s"\';&\?\(\[]+)\]', '<object width="425" height="350">
<param name="movie" value="http://www.youtube.com/v/$1"></param>
<embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" width="425" height="350"></embed>
</object>', true, 128, 'seditio');
		sed_bbcode_add('googlevideo', 'pcre', '\[googlevideo=([^\s"\';&\?\(\[]+)\]', '<embed style="width:425px; height:326px;" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=$1&hl=en-GB"> </embed>', true, 128, 'seditio');
		sed_bbcode_add('metacafe', 'pcre', '\[metacafe=([^\s"\';&\?\(\[]+)\]', '<embed style="width:425px; height:345px;" src="http://www.metacafe.com/fplayer/$1" width="400" height="345" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>', true, 128, 'seditio');
		sed_bbcode_add('flash', 'pcre', '\[flash\]([^\s"\';&\?\(\[]+\.swf)\[/flash\]', '<embed src="$1" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>', true, 128, 'seditio');
		sed_bbcode_add('flash', 'pcre', '\[flash w=(\d+) h=(\d+)\]([^\s"\';&\?\(\[]+\.swf)\[/flash\]', '<embed src="$3" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="$1" height="$2"></embed>', true, 128, 'seditio');
		sed_bbcode_add('divx', 'pcre', '\[divx\]([^\s"\';&\?\(\[]+\.divx)\[/divx\]', '<embed type="video/divx" src="$1" pluginspage="http://go.divx.com/plugin/download/" showpostplaybackad="false" custommode="Stage6"  object width="450" height="400"></embed>', true, 128, 'seditio');
		sed_bbcode_add('divx', 'pcre', '\[divx w=(\d+) h=(\d+)\]([^\s"\';&\?\(\[]+\.divx)\[/divx\]', '<embed type="video/divx" src="$3" pluginspage="http://go.divx.com/plugin/download/" showpostplaybackad="false" custommode="Stage6"  object width="$1" height="$2"></embed>', true, 128, 'seditio');

Just removed the if statement around it, and it seems it works fine, now.

Edit: I found a problem. You have to go back into your bbcode list, and uncheck the "container" around Google, Youtube, and Metacafe.[/][/][/][/][/][/][/][/][/][/][/][/][/][/]
Web Design Database - www.wddb.com

Відредаговано: Brock (02.03.2009 05:40, 15 років тому)
dervan
#14 02.03.2009 08:31
bug with not allowed bbcodes for videos in Seditio Compatibility plugin is fixed:
- deleted bbcodes for videos that not present at Seditio: flash, divx
- allowed bbcodes for videos that present at Seditio: youtube, googlevideo, metacafe
- all bbcodes for videos will be replaced by parser with standard object tag, embed tag not used

fixed plugins/seditio/seditio.setup.php
HarryRag
#15 02.03.2009 09:49
Thnx for the help, got them all workin now properly.

Just one more question.
How should i change these to fit the new style without the embeded stuff?

	// Other video sites
	sed_bbcode_add('yahoo', 'pcre', '\[yahoo=([^\s"\';&\?\(\[]+)\]', '<object width="512" height="392"><param name="movie" value="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.4" /><param name="allowFullScreen" value="true" /><param name="flashVars" value="id=$1"/><embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.4" type="application/x-shockwave-flash" width="512" height="392" allowFullScreen="true" flashVars="id=$1"></embed></object>', false, 160, 'seditio');
	sed_bbcode_add('dailymotion', 'pcre', '\[dmotion=([^\s"\';&\?\(\[]+)\]', '<object width="512" height="392"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.dailymotion.com/swf/$1&related=0" /><embed src="http://www.dailymotion.com/swf/$1&related=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="512" height="392"></embed></object>', false, 160, 'seditio');
	sed_bbcode_add('gametrailers', 'pcre', '\[games=([^\s"\';&\?\(\[]+)\]', '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="gtembed" width="512" height="392"> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="true" /> <param name="movie" value="http://www.gametrailers.com/remote_wrap.php?mid=$1"/> <param name="quality" value="high" /> <embed src="http://www.gametrailers.com/remote_wrap.php?mid=$1" swLiveConnect="true" name="gtembed" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="512" height="392"></embed></object>', false, 160, 'seditio');
[/][/][/]
[center][url=<a href="">http://www.true-gamers.nl]True</a> &amp; Honest Gamers[/url][/center]

123>>>