[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

moodgard
Registered User
Posts: 316
Joined: Sun Feb 08, 2004 8:05 pm

Post by moodgard » Sun Aug 27, 2006 6:58 pm

Darvil wrote: Looks like I found a problem with a skin. Its the nosebleed skin. Can you give me a hand here mood?


Is it the same as the "nosebleed" problem in : http://www.phpbb.com/phpBB/viewtopic.ph ... 98#2361198 ; see my reply to that a couple of posts after that one.

moodgard
Registered User
Posts: 316
Joined: Sun Feb 08, 2004 8:05 pm

Post by moodgard » Sun Aug 27, 2006 7:06 pm

omgyouresexy wrote: So, after I installed the Multiple BBcode mod and this one, the smilies and buttons (B, i, u, quote, etc) dont work. You can manually put in the code, but when you click the button, it doesnt add the code to the text box...

any ideas?


Check all the places where you need to add youtube values (you probably have an error in one of the changes):

1. In bbcode.php, you should have, as part of Multi_BBCode function:

$EMBB_widths = array('','60') ;
$EMBB_values = array('','youtube') ;

2. In bbcode.tpl, the youtube object

3. In posting_body.tpl, modified the following array to include youtube tags at the end:

Code: Select all

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

4. Do you have any other special BBcode tags installed?

moodgard
Registered User
Posts: 316
Joined: Sun Feb 08, 2004 8:05 pm

Post by moodgard » Sun Aug 27, 2006 7:10 pm

staticfiends wrote: I will attempt to test it with the core files...but the problem is I have a bunch of other mods already installed...


Great, let me know how that works out. It's somewhat of a reverse debugging, to see if any of the mods are affecting it.

omgyouresexy
Registered User
Posts: 25
Joined: Sat Aug 26, 2006 7:29 pm

Post by omgyouresexy » Mon Aug 28, 2006 3:59 pm

Moodgard, it looks like I have everything in place. The youtube button is the only new button added. Ill show you the code in context from the files you referenced:

from bbcode.php

Code: Select all

// MULTI BBCODE-begin
function Multi_BBCode()
{
	global $template, $lang;

	// DO NOT CHANGE THIS ARRAY
	$hotkeys = array('', 'd', 'e', 'g', 'h', 'j', 'k', 'm', 'n', 'r', 't', 'v', 'x', 'y', 'z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0');

	//NOTE: the first element of each array must be ''   Add new elements AFTER the ''
	$EMBB_widths = array('','60') ;
	$EMBB_values = array('','YouTube') ;
	for ($i=1; $i<count($EMBB_values); $i++)
	{
		// load BBcode MODs info
		$val = ($i*2)+16 ;
		$help_lang = ( !empty($lang['bbcode_help'][(strtolower($EMBB_values[$i]))]) ) ? $lang['bbcode_help'][(strtolower($EMBB_values[$i]))] : $lang['bbcode_help'][$EMBB_values[$i]];
		$template->assign_block_vars('MultiBB', array(
			'KEY' => $hotkeys[$i],
			'NAME' => "addbbcode$val",
			'HELP' => sprintf($help_lang, $hotkeys[$i]),
			'WIDTH' => $EMBB_widths[$i],
			'VALUE' => $EMBB_values[$i],
			'STYLE' => "bbstyle($val)")
		);
	}
}
// MULTI BBCODE-end

and

Code: Select all

// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
	$patterns[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
	$replacements[] = $bbcode_tpl['url4'];

	// [email]user@domain.tld[/email] code..
	$patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
	$replacements[] = $bbcode_tpl['email'];

// [youtube]YouTube URL[/youtube] code..
$patterns[] = "#\[youtube\]http://(?:www\.)?youtube.com/watch\?v=([0-9A-Za-z-_]{11})[^[]*\[/youtube\]#is";
$replacements[] = $bbcode_tpl['youtube'];

	$text = preg_replace($patterns, $replacements, $text);

and then in posting_body.tpl

Code: Select all

// Define the bbCode tags
bbcode = new Array();
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
','
  • ','
','
  • ','
','[img]','[/img]','','','[youtube]','[/youtube]');
imageTag = false;
[/code]


I edited posting_body.tpl in both my subsilver and subVereor styles, and left the others as is. The smilies and buttons work in the unedited styles, but not in the two I edited. It seems I have all three instances of code you suggested. It's possible the syntax is just wrong.

Keep in mind, if i type in the youtube code in brackets manually, it works fine, its just the buttons and smilies do not insert the code into the text box when clicked.

Thanks again, mood.

pengunio
Registered User
Posts: 78
Joined: Wed Jun 21, 2006 8:24 pm

Post by pengunio » Mon Aug 28, 2006 9:13 pm

hey i got mines working fine except for the button. No button shows up but when i manualy put the tags its fine

staticfiends
Registered User
Posts: 46
Joined: Fri Jul 04, 2003 9:42 am
Contact:

Post by staticfiends » Tue Aug 29, 2006 4:49 am

moodgard wrote:
staticfiends wrote:I will attempt to test it with the core files...but the problem is I have a bunch of other mods already installed...


Great, let me know how that works out. It's somewhat of a reverse debugging, to see if any of the mods are affecting it.


what I did was just test it with a complete vanilla install and it works fine...so something is getting screwed up with other mods...

somebody mentioned the post icons mod...I looked into it...but it is not the culprit...

...I am almost to the point where I just want to redo the whole thing on the vanilla install...and reinstall all the mods...but that is going to be a lot of work...

any other ideas?

staticfiends
Registered User
Posts: 46
Joined: Fri Jul 04, 2003 9:42 am
Contact:

Post by staticfiends » Tue Aug 29, 2006 6:01 am

:lol: :lol: :lol:

I figured it out!!
so I don't have to go through all my friggen' mods and see which one caused it....none of them did...

for some reason my bbcode.php file was missing this line:

Code: Select all

$replacements[] = $bbcode_tpl['url4'];
it looked like this:

Code: Select all

// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
	$patterns[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
when it should have looked like this:

Code: Select all

	// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
	$patterns[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
	$replacements[] = $bbcode_tpl['url4'];

Darvil
Registered User
Posts: 11
Joined: Thu Jul 22, 2004 3:27 pm

Post by Darvil » Tue Aug 29, 2006 12:20 pm

moodgard wrote:
Darvil wrote:Looks like I found a problem with a skin. Its the nosebleed skin. Can you give me a hand here mood?


Is it the same as the "nosebleed" problem in : http://www.phpbb.com/phpBB/viewtopic.ph ... 98#2361198 ; see my reply to that a couple of posts after that one.


actually moodgard that doesn't work for me.

The problem is because I am running BBCode Buttons Organizer (I think)

I kind of like the organizer though, is there any solution you suggest that perhaps I can use to keep both button mod and the youtube,gvideo mod?

Thanks.

Daz wilde
Registered User
Posts: 147
Joined: Mon Mar 20, 2006 7:01 pm

Post by Daz wilde » Fri Sep 01, 2006 10:59 am

The download isnt working for me!!

-=the0ne=-
Registered User
Posts: 207
Joined: Sat Jun 17, 2006 6:31 am
Contact:

Post by -=the0ne=- » Sun Sep 03, 2006 10:33 am

does this work on 2.0.21 :?:

SO DoC
Registered User
Posts: 3
Joined: Fri Sep 01, 2006 1:44 pm
Location: UK
Contact:

Post by SO DoC » Sun Sep 03, 2006 11:50 am

When i download this mod it tries to open with WINAMP 8O

Is this right :roll:

How do you open a .MOD file? is it easy mod compatible or something?


Cheers

DoC
Image

Eatmorepies
Registered User
Posts: 3
Joined: Sat Apr 16, 2005 8:06 pm

Post by Eatmorepies » Sun Sep 03, 2006 12:09 pm

Installed this with no issues, worked fine, installed google video as well, works fine too, but I notice a couple of things. I used easymod to install multiBB, and on the line in lang_main.php, where it says :

Code: Select all

$lang['bbcode_help']['youtube'] = ......
I also have directly under those two lines,

Code: Select all

$lang['bbcode_help']['Gvideo'] = ......
...where I see other people seem to have some variable affixed to multiBB code. Did I do something incorrect? Everything seems to be working.

Also, I had a user who tells me every time he tries to open a thread with a video on it, IE crashes on him. He's up to date on the latest IE with all the updates applied. Works fine for me. Any idea what's causing the crash for him?

Thanks-

-=the0ne=-
Registered User
Posts: 207
Joined: Sat Jun 17, 2006 6:31 am
Contact:

Post by -=the0ne=- » Sun Sep 03, 2006 12:36 pm

SO DoC wrote: When i download this mod it tries to open with WINAMP 8O

Is this right :roll:

How do you open a .MOD file? is it easy mod compatible or something?


Cheers

DoC


u can use Notepad 4 it..
I use DAMN NFO viewer...its a freeware juz google it :D

and i tried it on 2.0.21 and its compatable with EasyMod... :lol:

w00ts!te
Registered User
Posts: 4
Joined: Mon Sep 04, 2006 2:38 am

Post by w00ts!te » Mon Sep 04, 2006 7:38 pm

Is there anywhere else I can download this? It isn't working for me.

-=the0ne=-
Registered User
Posts: 207
Joined: Sat Jun 17, 2006 6:31 am
Contact:

Post by -=the0ne=- » Tue Sep 05, 2006 12:08 am

if u have other mods on ur board try to manually install it , if u cant use EasyMod.. Its working perfectly for me...

by the wasy have u installed Multiple BBCode mod is here:
http://www.phpbb.com/phpBB/viewtopic.php?t=145513

u mush have that installed for this mod to work

Post Reply

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

cron