|
|
| Author |
Message |
aristana
New User
Joined: 24 Oct 2009
Posts: 3
|
Posted: February 5th 2010, 11:23 pm Post subject: BBcode |
|
|
What is the bbcode for videos? I'm having trouble finding the bbcode for embedded videos. could you please tell me what the code is or a good site on bbcode? _________________ i need help |
|
| Back to top |
|
 |
~HG~
Dedicated User
Joined: 08 Nov 2003
Posts: 3913
Location: Australia
|
|
| Back to top |
|
 |
Patrick
Admin/Webmaster

Joined: 11 May 2001
Posts: 17279
Location: Harbinger, NC, U.S.A.
|
|
| Back to top |
|
 |
Dogs and Things
Well Known User
Joined: 11 Sep 2006
Posts: 189
|
Posted: February 6th 2010, 3:20 pm Post subject: |
|
|
Personally I like EmbedVid MOD.
It requires minimal edits and is super-easy to use.
You only need to paste the video's url in your message and the url gets parsed into the video on posting.
Supports a variety of video formats.
| Code:
|
##############################################################
## MOD Title: EmbVid
## MOD Author: mgutt (Marc Gutt) www.phpbb-de.com
## MOD Description: Video URLs are replaced by their corresponding embedded players
## MOD Version: 1.0.1
##
## Installation Level: Easy
## Installation Time: 5 minutes
##
## Files To Edit: 4
## includes/bbcode.php
## posting.php
## privmsg.php
## viewtopic.php
##
## Included Files: 1
## includes/embvid.php
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## Video URLs in signatures won't be replaced.
## Easily post the video url f.e.
## "http://www.youtube.com/watch?v=imehw6sj"
## without any bbcode-tags and this url will be
## automatically replaced.
## To avoid replacing the video URL use the [url] bbcode tag.
##
##############################################################
|
|
|
| Back to top |
|
 |
Patrick
Admin/Webmaster

Joined: 11 May 2001
Posts: 17279
Location: Harbinger, NC, U.S.A.
|
|
| Back to top |
|
 |
usagi
New User
Joined: 26 Jun 2006
Posts: 5
|
Posted: June 12th 2011, 1:55 am Post subject: |
|
|
| I can't find a copy of the EmbedVid mod anywhere. Does anyone have a copy or a place I can download it? The above links are dead. |
|
| Back to top |
|
 |
Dogs and Things
Well Known User
Joined: 11 Sep 2006
Posts: 189
|
Posted: June 12th 2011, 2:16 am Post subject: |
|
|
Here you go.
Install.txt
| Code:
|
##############################################################
## MOD Title: EmbVid
## MOD Author: mgutt (Marc Gutt) www.phpbb-de.com
## MOD Description: Video URLs are replaced by their corresponding embedded players
## MOD Version: 1.0.1
##
## Installation Level: Easy
## Installation Time: 5 minutes
##
## Files To Edit: 4
## includes/bbcode.php
## posting.php
## privmsg.php
## viewtopic.php
##
## Included Files: 1
## includes/embvid.php
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## Video URLs in signatures won't be replaced.
## Easily post the video url f.e.
## "http://www.youtube.com/watch?v=imehw6sj"
## without any bbcode-tags and this url will be
## automatically replaced.
## To avoid replacing the video URL use the [url] bbcode tag.
##
##############################################################
## MOD History:
##
## Version 1.0.1:
## - privmsg bug fix
## - myvideo bug fix
##
## Version 1.0.0:
## - Mod released
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ COPY ]----------------------------------------------------------
#
copy includes/embvid.php to includes/embvid.php
#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
define("BBCODE_UID_LEN", 10);
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : embvid --------------------------------------------------------------
//-- add
include('embvid.php');
//-- fin mod : embvid ----------------------------------------------------------
#
#-----[ FIND ]------------------------------------------
#
$ret = ' ' . $text;
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : embvid --------------------------------------------------------------
//-- add
$ret = embvid($ret);
//-- fin mod : embvid ----------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------
#
posting.php
#
#-----[ FIND ]------------------------------------------
#
$user_sig = make_clickable($user_sig);
#
#-----[ REPLACE WITH ]------------------------------------------
#
//-- mod : embvid --------------------------------------------------------------
//-- add
$is_sig = true;
//-- fin mod : embvid ----------------------------------------------------------
$user_sig = make_clickable($user_sig);
//-- mod : embvid --------------------------------------------------------------
//-- add
$is_sig = false;
//-- fin mod : embvid ----------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------
#
privmsg.php
#
#-----[ FIND ]------------------------------------------
#
$private_message .= '<br /><br />_________________<br />' . make_clickable($user_sig);
#
#-----[ REPLACE WITH ]------------------------------------------
#
//-- mod : embvid --------------------------------------------------------------
//-- add
$is_sig = true;
//-- fin mod : embvid ----------------------------------------------------------
$private_message .= '<br /><br />_________________<br />' . make_clickable($user_sig);
//-- mod : embvid --------------------------------------------------------------
//-- add
$is_sig = false;
//-- fin mod : embvid ----------------------------------------------------------
#
#-----[ FIND ]------------------------------------------
#
$preview_message = $preview_message . '<br /><br />_________________<br />' . $user_sig;
#
#-----[ REPLACE WITH ]------------------------------------------
#
//-- mod : embvid --------------------------------------------------------------
//-- delete
/*
$preview_message = $preview_message . '<br /><br />_________________<br />' . $user_sig;
*/
//-- add
$is_sig = true;
$user_sig = '<br /><br />_________________<br />' . $user_sig;
if ( count($orig_word) )
{
$user_sig = preg_replace($orig_word, $replacement_word, $user_sig);
}
if ( $smilies_on )
{
$user_sig = smilies_pass($user_sig);
}
$is_sig = false;
//-- fin mod : embvid ----------------------------------------------------------
#
#-----[ FIND ]------------------------------------------
#
$preview_message = make_clickable($preview_message);
#
#-----[ REPLACE WITH ]------------------------------------------
#
//-- mod : embvid --------------------------------------------------------------
//-- delete
/*
$preview_message = make_clickable($preview_message);
*/
//-- add
$preview_message = make_clickable($preview_message) . $user_sig;
//-- fin mod : embvid ----------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
$user_sig = make_clickable($user_sig);
#
#-----[ REPLACE WITH ]------------------------------------------
#
//-- mod : embvid --------------------------------------------------------------
//-- add
$is_sig = true;
//-- fin mod : embvid ----------------------------------------------------------
$user_sig = make_clickable($user_sig);
//-- mod : embvid --------------------------------------------------------------
//-- add
$is_sig = false;
//-- fin mod : embvid ----------------------------------------------------------
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
|
embvid.php:
| Code:
|
<?php
/*
© www.marc-gutt.de 2008
Marc Gutt Services
embvid for phpbb2
Version: 1.0.1
*/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
function embvid($message)
{
global $lang, $userdata, $is_sig;
// signature switch
if ( isset($is_sig) && $is_sig )
{
return $message;
}
// settings
// prefer 4:3 ratio
$width = 400;
$height = 300;
$download = true;
$videos_per_post = 5;
// download sites
$sites = array(
'lang_english' => 'http://www.savids.com/#',
'lang_german' => 'http://www.2video.de/#',
);
// player
$begin = '\\1<table border="0" cellpadding="0" cellspacing="2"><tr><td align="left"><span class="gensmall"><a href="\\2" target="_blank">' . $lang['Jump_to'] . ' ';
$middle = '</a> ' . ($download ? '<a href="' . (isset($sites[ $userdata['user_lang'] ]) ? $sites[ $userdata['user_lang'] ] : current($sites)) . '\\2" title="Download Video" target="_blank">Download Video</a>' : '') . '</span></td><td align="right"><span class="gensmall"><a href="http://www.phpbb-de.com" target="_blank" title="phpBB">phpBB</a> Plugin</span></td></tr><tr><td colspan="2">';
$players = array(
'<div id="embed\\3"><script type="text/javascript" src="http://www.bendecho.de/embed/video?videoid=\\3"></script></div>',
'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' . $width . '" height="' . $height . '" id="player" align="middle"><param name="allowScriptAccess" value="always" /><param name="movie" value="http://www.clipfish.de/videoplayer.swf?as=0&videoid=\\3&r=1" /><param name="quality" value="high" /><param name="wmode" value="transparent"><param name="allowFullScreen" value="true" /><embed src="http://www.clipfish.de/videoplayer.swf?as=0&videoid=\\3&r=1" quality="high" width="' . $width . '" height="' . $height . '" name="player" align="middle" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>',
'<object width="' . $width . '" height="' . $height . '"><param name="movie" value="http://www.dailymotion.com/swf/\\3"></param><param name="allowFullScreen" value="true"></param><param name="wmode" value="transparent"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.dailymotion.com/swf/\\3" type="application/x-shockwave-flash" width="' . $width . '" height="' . $height . '" allowFullScreen="true" allowScriptAccess="always" wmode="transparent"></embed></object>',
'<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="' . $width . '" height="' . $height . '"> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="true" /> <param name="movie" value="http://www.gametrailers.com/remote_wrap.php?mid=\\3"/> <param name="wmode" value="transparent"> <param name="quality" value="high" /> <embed src="http://www.gametrailers.com/remote_wrap.php?mid=\\3" 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="' . $width . '" height="' . $height . '" wmode="transparent"></embed> </object>',
'<embed style="width:' . $width . 'px; height:' . $height . 'px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=\\3" flashvars="" wmode="transparent"> </embed>',
'<embed src="http://www.metacafe.com/fplayer/\\3/\\4.swf" width="' . $width . '" height="' . $height . '" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"> </embed>',
'<embed src="http://lads.myspace.com/videos/vplayer.swf" flashvars="m=\\3&v=2&type=video" type="application/x-shockwave-flash" width="' . $width . '" height="' . $height . '" wmode="transparent"></embed>',
'<object style="width:' . $width . 'px;height:' . $height . 'px;" width="' . $width . '" height="' . $height . '" type="application/x-shockwave-flash" data="http://www.myvideo.\\3/movie/\\4"> <param name="movie" value="http://www.myvideo.\\3/movie/\\4"/> <param name="AllowFullscreen" value="true" /><param name="wmode" value="transparent"></param> </object>',
'<object width="' . $width . '" height="' . $height . '"><param name="FlashVars" value="apiHost=api.sevenload.com"/><param name="AllowScriptAccess" value="always"/><param name="wmode" value="transparent"></param><param name="movie" value="\\3/pl/\\4/425x350/swf" /><embed src="\\3/pl/\\4/425x350/swf" type="application/x-shockwave-flash" width="' . $width . '" height="' . $height . '" allowfullscreen="true" AllowScriptAccess="always" FlashVars="apiHost=api.sevenload.com" wmode="transparent"></embed></object>',
'<embed src="http://videos.streetfire.net/vidiac.swf" FlashVars="video=\\3" quality="high" wmode="transparent" width="' . $width . '" height="' . $height . '" name="ePlayer" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>',
// '<object width="' . $width . '" height="' . $height . '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> <param name="movie" value="http://www.videotube.de/flash/player.swf"></param> <param name="flashvars" value="baseURL=http%3A%2F%2Fwww.videotube.de%2Fwatch%2F\\3"></param> <param name="quality" value="best"> <param name="wmode" value="transparent"> <param name="allowScriptAccess" value="always"> <param name="swLiveConnect" value="true"> <embed src="http://www.videotube.de/flash/player.swf" type="application/x-shockwave-flash" width="' . $width . '" height="' . $height . '" flashvars="baseURL=http%3A%2F%2Fwww.videotube.de%2Fwatch%2F\\3" quality="best" wmode="transparent" allowscriptaccess="always" swliveconnect="true"></embed> </object>',
'<object width="' . $width . '" height="' . $height . '"><param name="movie" value="http://www.youtube.com/v/\\3"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/\\3" type="application/x-shockwave-flash" wmode="transparent" width="' . $width . '" height="' . $height . '"></embed></object>',
);
$end = '</td></tr></table>' . "\n";
// build search
$search = array(
'Bendecho' => '#(^|[\n ])(http://[\w\.]*?bendecho\.de/([\w]+)-[\w\-]+)(^[\t <\n\r\]\[])*#is',
'Clipfish' => '#(^|[\n ])(http://[\w\.]*?clipfish\.de/player\.php\?videoid=([\w%]+)(&[\w=+&;]*)*)(^[\t <\n\r\]\[])*#is',
'Dailymotion' => '#(^|[\n ])(http://[\w\.]*?dailymotion\.com.*?/video/([\w]+)_[\w\-]+)(^[\t <\n\r\]\[])*#is',
'Gametrailers' => '#(^|[\n ])(http://[\w\.]*?gametrailers\.com/player/([\w]+?)\.html)(^[\t <\n\r\]\[])*#is',
'Google Video' => '#(^|[\n ])(http://video\.google\.[\w\.]+?/videoplay\?docid=([\w\-]+)(&[\w=+&;-]*)*)(^[\t <\n\r\]\[])*#is',
'Metacafe' => '#(^|[\n ])(http://[\w\.]*?metacafe\.com/watch/([\w]+?)/([\w\-]+?)/)(^[\t <\n\r\]\[])*#is',
'MySpace' => '#(^|[\n ])(http://[\w\.]*?myspace\.com/index\.cfm\?fuseaction=vids.individual&videoid=([\w]+))(^[\t <\n\r\]\[])*#is',
'MyVideo' => '#(^|[\n ])(http://[\w\.]*?myvideo\.([\w]+?)/watch/([\w]+))(^[\t <\n\r\]\[])*#is',
'Sevenload' => '#(^|[\n ])((http://[\w\.]*?sevenload.com)/videos/([\w]+?)/[\w\-]+)(^[\t <\n\r\]\[])*#is',
'Streetfire' => '#(^|[\n ])(http://videos\.streetfire\.net/.*?/([\w\-]+?)\.htm)(^[\t <\n\r\]\[])*#is',
// 'Videotube' => '#(^|[\n ])(http://[\w\.]*?videotube\.de/watch/([\w]+))(^[\t <\n\r\]\[])*#is',
'Youtube' => '#(^|[\n ])(http://[\w\.]*?youtube\.[\w\.]+?/watch\?v=([\w\-]+)(&[\w=+&;%]*)*)(^[\t <\n\r\]\[])*#is',
);
// build replace
$replace = array();
current($search);
$portal = key($search);
foreach ( $players as $embvid )
{
$replace[] = $begin . $portal . $middle . $embvid . $end;
next($search);
$portal = key($search);
}
// search & replace
return preg_replace($search, $replace, $message, $videos_per_post);
}
?>
|
|
|
| Back to top |
|
 |
usagi
New User
Joined: 26 Jun 2006
Posts: 5
|
Posted: June 12th 2011, 6:59 pm Post subject: |
|
|
| Thanks |
|
| Back to top |
|
 |
Patrick
Admin/Webmaster

Joined: 11 May 2001
Posts: 17279
Location: Harbinger, NC, U.S.A.
|
|
| Back to top |
|
 |
usagi
New User
Joined: 26 Jun 2006
Posts: 5
|
Posted: June 13th 2011, 11:42 pm Post subject: |
|
|
I installed 1648 - Smilies Categories. I later installed 1059 - Advanced BBCode Box.
Neither one works right now. Smilies categories works ok for the popup but you cannot choose any smilie from the ones in the left hand box. For Advanced BBCode Box the links always appear at the end of the post instead of at the cursor.
Is there any way I can get both to work correctly? |
|
| Back to top |
|
 |
|