[2.0.19] Youtube Video BBCode

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
125
64%
Very Good
23
12%
Good
21
11%
Fair
5
3%
Poor
21
11%
 
Total votes: 195

ndonezn
Registered User
Posts: 118
Joined: Fri Nov 11, 2005 10:05 pm
Location: pasadena
Contact:

Re: Excellent work

Post by ndonezn »

The_Kaiser wrote: After I posted the movie there is the hyperlink underneath the movie itself, and underneath that is a line that says "undefined".



open includes/bbcode.php

find
$bbcode_tpl['youtube'] = str_replace('{VIDEO}', '\\1', $bbcode_tpl['youtube']);
$bbcode_tpl['youtube'] = str_replace('{LINK}', $lang['youtube_link'], $bbcode_tpl['youtube']);


and what i did was delete the entire second line :lol: ...for now...i might put it back if this becomes popular with the members...i would rather have a toolbar, but i don.t think you can with YouTube
Peter77sx
Registered User
Posts: 3260
Joined: Wed Nov 09, 2005 2:51 pm

Post by Peter77sx »

You must have Multiple BBCode MOD installed for this to work.


Not true... :wink:

Nice MOD :)
ycl6
Registered User
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 »

MOD Updated to version 1.0.1
See first post for Download Link
groove collection
Registered User
Posts: 38
Joined: Mon Mar 06, 2006 11:30 pm

Post by groove collection »

groove collection wrote: Mmm.. Had to uninstall this mod, cause it disables the resize fix that is in my stylesheet (AdInfinnitum)

from bbcode.tpl:

Code: Select all

<!-- BEGIN img --><img src="{URL}" style="border: 0;" onLoad="if(this.width > 550) {this.width = 550;}" onmouseout="nd();" onmouseover="if(this.width == 550) {return overlib('<img src=templates/AI/images/resized-image.gif>', ol_fgcolor='', ol_bgcolor='', ol_width=147, ol_offsetx=22, ol_offsety=-7, CAPTION, '');}" onclick="if(this.width == 550) { window.open('templates/AI/resizefix.php?originalsize={URL}', '_blank' , 'scrollbars=1, toolbar=no, resizable=1, menubar=no, directories=no, status=yes'); return false; }" /><!-- END img -->
resizefix.php:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	lang="en"
	xml:lang="en">

<head>
<!--

	ResizeFix v1.00 for phpBB
	www.mikelothar.com (c) 2004 - 2005

//-->

<title>Original size</title>

<meta http-equiv="Content-Type"
	content="text/html;
	charset=iso-8859-1" />
	
<meta http-equiv="imagetoolbar"
	content="no" />

<link rel="icon"
	href="templates/AI/images/favicon.ico" />

<link rel="stylesheet"
	href="AI.css" type="text/css">

<script language="JavaScript"
	src="AI.js"></script>
	
<script language="JavaScript">
window.onload = maxWindow;
</script>

</head>

<body>
<table cellspacing="0" style="height: 96%;">
  <tr>
    <td><a href="javascript:window.close();"><span class="avatar"><img src="<?PHP print $HTTP_GET_VARS[originalsize];?>" alt="Close this window" border="0"></span></a><br />
		<a href="javascript:window.close();">Close this window</a></td>
  </tr>
</table>
</body>
</html>
this doesn't work anymore, so it screwed up the lay-out on all the page with pictures in them.

Too bad. I really wanted to use this video mod


forget this.
I had a couple of mods installed the same night and it wasn't this one that caused the problem (pfew.. :))
groove collection
Registered User
Posts: 38
Joined: Mon Mar 06, 2006 11:30 pm

Post by groove collection »

following the above post, I would still like to use the mod, but there is a small problem that I cannot solve myself.

It is about this mod.

Code: Select all

############################################################## 
## MOD Title: BBcode [hr] 
## MOD Author: Cr@ter$ < n/a > (n/a) http://www.craterz.com/ 
## MOD Description: A BBcode, allowing you to add a horizontal rule into a post. 
## MOD Version: 1.0.4 
## 
## Installation Level: (Easy) 
## Installation Time: 2 Minutes 
## Files To Edit: includes/bbcode.php, 
##      language/lang_english/lang_bbcode.php, 
##      language/lang_english/lang_main.php, 
##      templates/subSilver/bbcode.tpl, 
##      templates/subSilver/posting_body.tpl 
## 
## Included Files: (N/A) 
## 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: 
## 
## IMPORTANT: Requires Multi BBCode 1.4.0c or later (http://www.phpbb.com/) 
## 
############################################################## 
## MOD History: 
## 
##   2006-02-05 - Version 1.0.4 
##      - Corrected a few typos. 
## 
##   2006-01-16 - Version 1.0.2 
##      - Changed a couple FINDs to reflect other BBCodes installed. 
## 
##   2006-01-15 - Version 1.0.0 
##      - Released 
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/bbcode.php 
# 
#-----[ FIND ]------------------------------------------ 
# 
/*************************************************************************** 
 *                              bbcode.php 
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
//-- mod : BBCode - HR --------------------------------------------------------- 
# 
#-----[ FIND ]------------------------------------------ 
# 
#   //NOTE: the first element of each array must be ''   Add new elements AFTER the '' 
#      Full line may be longer than shown. 
   $EMBB_widths = array('' 
# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
) ; 
# 
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------ 
# 
, '30' 
# 
#-----[ FIND ]------------------------------------------ 
# 
# NOTE --- This is a Partial search 
# 
   $EMBB_values = array('' 
# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
) ; 
# 
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------ 
# 
, 'hr' 
# 
#-----[ FIND ]------------------------------------------ 
# 
   // [i] and [/i] for italicizing text. 
   $text = str_replace("[i:$uid]", $bbcode_tpl['i_open'], $text); 
   $text = str_replace("[/i:$uid]", $bbcode_tpl['i_close'], $text); 
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

//-- mod : BBCode - HR --------------------------------------------------------- 
//-- add 
   // [hr] for inserting a horizontal rule. 
   $text = str_replace("[hr:$uid]", $bbcode_tpl['hr'], $text); 
//-- fin mod : BBCode - HR ----------------------------------------------------- 
# 
#-----[ FIND ]------------------------------------------ 
# 
   // [i] and [/i] for italicizing text. 
   $text = preg_replace("#\[i\](.*?)\[/i\]#si", "[i:$uid]\\1[/i:$uid]", $text); 
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

//-- mod : BBCode - HR --------------------------------------------------------- 
//-- add 
   // [hr] for inserting a horizontal rule. 
   $text = preg_replace("#\[hr\]#si", "[hr:$uid]", $text); 
//-- fin mod : BBCode - HR ----------------------------------------------------- 
# 
#-----[ OPEN ]------------------------------------------ 
# 
language/lang_english/lang_bbcode.php 
# 
#-----[ FIND ]------------------------------------------ 
# 
/*************************************************************************** 
 *                         lang_bbcode.php [english] 
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
//-- mod : BBCode - HR --------------------------------------------------------- 
# 
#-----[ FIND ]------------------------------------------ 
# 
$faq[] = array("--", "Creating Links"); 
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
//-- mod : BBCode - HR --------------------------------------------------------- 
//-- add 
$faq[] = array("--", "Adding a HR (Horizontal Rule) to your post"); 
$faq[] = array("How to add a horizontal rule in your post", "To add a horizontal rule to your post, just use the <b>[hr]</b> tag. Keep in mind that how the horizontal rule appears will vary depending on the viewers browser and system, as well as any cascading style sheet (css) set attributes for the (x)html tag. An example of the horizontal rule is this:<hr width=\"95%\" />The above line is a horizontal rule, or otherwise known as a hr tag."); 
//-- fin mod : BBCode - HR ----------------------------------------------------- 

# 
#-----[ OPEN ]------------------------------------------ 
# 
language/lang_english/lang_main.php 
# 
#-----[ FIND ]------------------------------------------ 
# 
/*************************************************************************** 
 *                            lang_main.php [English] 
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
//-- mod : BBCode - HR --------------------------------------------------------- 
# 
#-----[ FIND ]------------------------------------------ 
# 
$lang['bbcode_f_help'] = 'Font size: [size=x-small]small text[/size]'; 
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
//-- mod : BBCode - HR --------------------------------------------------------- 
//-- add 
$lang['bbcode_help']['hr'] = 'Adds a horizontal rule: [hr]. (alt+%s)'; 
//-- fin mod : BBCode - HR ----------------------------------------------------- 
# 
#-----[ OPEN ]------------------------------------------ 
# 
templates/subSilver/bbcode.tpl 
# 
#-----[ FIND ]------------------------------------------ 
# 
<!-- BEGIN i_open --><span style="font-style: italic"><!-- END i_open --> 
<!-- BEGIN i_close --></span><!-- END i_close --> 
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
#   NOTE: If you would like the width of the rule to be wider (or narrower) 
#         change "90%" to a desired value, preferably as a percentage, such 
#         as "100%" (or "75%"). 

<!-- BEGIN hr --></span><hr width="90%" /><span class="postbody"><!-- END hr --> 
# 
#-----[ OPEN ]------------------------------------------ 
# 
templates/subSilver/posting_body.tpl 
# 
#-----[ FIND ]------------------------------------------ 
# 
# NOTE --- This is a Partial search 
# 
bbtags = new Array('[b]','[/b]','[i]','[/i]', 
# 
#-----[ IN-LINE FIND ]------------------------------------------ 
# 
); 
# 
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------ 
# 
# NOTE: It has to be the same order like the buttons are placed. 
# 
,'[hr]','' 
# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
This mod puts a button (HR) after al the buttons.
After installing this YouTube mod the HR button is gone :?:
The Youtube button is there instead and works fine, but I don't want to loose the hr button.

Any suggestion how to solve this ?
I was thinking to move the HR button (after the Underline and before the Quote button), but that isn't easy too.
michaeltripp
Registered User
Posts: 17
Joined: Mon Mar 06, 2006 7:16 pm

Post by michaeltripp »

Groove Collection, after reading through that mod I couldn't see any way that it would conflict with my mod. Do you have any other BBCode mods installed?

Anyways, to try to fix it, there are two lines of code I think might hold the solution to your problem. If you copy them from the your files and post them here so I can check them out, I'll tell you how to fix what I think is wrong.

First, open up bbcode.php (in the "includes" folder). There is a line near the top of file (line 44 in my file) that will look something like this

Code: Select all

$EMBB_values = array('','Google','YouTube');
It probably won't look exactly like that, but the beginning part ($EMBB_values = array) will be the same.

The next line of code to be concerned about is in the file "posting_body.tpl" in the folder of the theme you're using, i.e. "/templates/subSilver" for subSilver). The line is very long and starts with "bbtags = new Array(" mine looks like this:

Code: Select all

bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
','
  • ','
    • ','
    ','[img]','[/img]','','','[google]','[/google]','[youtube]','[/youtube]');[/code]
    Again, yours will look a little bit different, but mostly the same.
ndonezn
Registered User
Posts: 118
Joined: Fri Nov 11, 2005 10:05 pm
Location: pasadena
Contact:

Post by ndonezn »

hey mike what does the update have? also, what kind of updates could we expect in the future???
michaeltripp
Registered User
Posts: 17
Joined: Mon Mar 06, 2006 7:16 pm

Post by michaeltripp »

ndonezn wrote: hey mike what does the update have? also, what kind of updates could we expect in the future???
The update is trivial, all I did was change the names of the variables I used so that they were less common and thus, less likely to conflict with other bbcode mods. If the mod already works for you, don't bother upgrading.

As far as updates, I don't think there's a whole lot to improve on with this mod, but I was thinking about adding tags for other sites that allow you to embed videos on other pages (i.e. Break, Bolt, MetaCafe, Current.tv, etc.), maybe as seperate tags or maybe as a generic [video] tag or something.
groove collection
Registered User
Posts: 38
Joined: Mon Mar 06, 2006 11:30 pm

Post by groove collection »

michaeltripp wrote: Groove Collection, after reading through that mod I couldn't see any way that it would conflict with my mod. Do you have any other BBCode mods installed?

Anyways, to try to fix it, there are two lines of code I think might hold the solution to your problem. If you copy them from the your files and post them here so I can check them out, I'll tell you how to fix what I think is wrong.

First, open up bbcode.php (in the "includes" folder). There is a line near the top of file (line 44 in my file) that will look something like this

Code: Select all

$EMBB_values = array('','Google','YouTube');
It probably won't look exactly like that, but the beginning part ($EMBB_values = array) will be the same.

The next line of code to be concerned about is in the file "posting_body.tpl" in the folder of the theme you're using, i.e. "/templates/subSilver" for subSilver). The line is very long and starts with "bbtags = new Array(" mine looks like this:

Code: Select all

bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
','
  • ','
    • ','
    ','[img]','[/img]','','','[google]','[/google]','[youtube]','[/youtube]');[/code]
    Again, yours will look a little bit different, but mostly the same.


this is how it looks now. The Youtube mod in not installed.

Code: Select all

	$EMBB_widths = array('', '30') ;

	$EMBB_values = array('', 'hr') ;

Code: Select all

bbcode = new Array();
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
','
  • ','
','
  • ','
','[img]','[/img]','','','[hr]','');[/code]


When I install this mod with EM they look like this:

Code: Select all

	$EMBB_widths = array('','60', '30') ;

	$EMBB_values = array('','YouTube', 'hr') ;

Code: Select all

bbcode = new Array();
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
','
  • ','
','
  • ','
','[img]','[/img]','','','[youtube]','[/youtube]','[hr]','');[/code]

And now the HR button is gone !?!
User avatar
DragonMaster1
Registered User
Posts: 994
Joined: Tue Aug 17, 2004 11:04 am
Name: Terry
Contact:

Post by DragonMaster1 »

I added this last night and now my drop down colors no longer work

Any idea how to recover them?
User avatar
DragonMaster1
Registered User
Posts: 994
Joined: Tue Aug 17, 2004 11:04 am
Name: Terry
Contact:

Post by DragonMaster1 »

A little help here please ^
groove collection
Registered User
Posts: 38
Joined: Mon Mar 06, 2006 11:30 pm

Post by groove collection »

DragonMaster1 wrote: A little help here please ^


x2 :cry:
michaeltripp
Registered User
Posts: 17
Joined: Mon Mar 06, 2006 7:16 pm

Post by michaeltripp »

groove collection: I setup a board to test the HR and YouTube BBCodes together and I had no problems. I'm not sure what's causing your problem, but I'm guessing it's a template problem. Maybe your template doesn't play well with the multi-bbcode mod's default HTML.

DragonMaster1: I really need more information. What other mods do you have installed? Are you using a theme other than subSilver? Did you install it with Easymod? Etc.
groove collection
Registered User
Posts: 38
Joined: Mon Mar 06, 2006 11:30 pm

Post by groove collection »

ok, thanx for trying 8)
omio
Registered User
Posts: 4
Joined: Tue Mar 28, 2006 2:22 am

Re: [2.0.19] Youtube Video BBCode

Post by omio »

MOD Database Manager wrote: Classification: 53 BBCode

MOD Name: Youtube Video BBCode
Author: michaeltripp
MOD Description: Adds a new bbcode allowing you to easily embed videos from YouTube.com.


MOD Version: 1.0.1 (Updated 03/21/06)
Installation Level: Easy
Installation Time: ~ 5 Minutes

Download File: youtube-1.0.1.mod
File Size: 5790 Bytes

Security Score: 0

Support for this MOD needs to be asked within this topic. The phpBB Teams are not responsible or required to give anyone support for this MOD. By installing this MOD, the phpBB Support Team or phpBB MODifications Team may not be able to provide support.

This MOD has only been tested by the phpBB MOD Team with the phpBB version in the topic title. It may not work in any other versions of phpBB.


Its really execellent.
How can I put it in my forum.
How can I installl
Post Reply

Return to “[2.0.x] MOD Database Releases”