[2.0.21] Google Video

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.
Post Reply

Rating:

Excellent!
21
70%
Very Good
3
10%
Good
3
10%
Fair
0
No votes
Poor
3
10%
 
Total votes: 30

User avatar
perldude69
Registered User
Posts: 41
Joined: Sat Apr 08, 2006 12:05 am

Sweet Function!

Post by perldude69 »

Sweet Function! Maybe you could post a shot how-to for the rest of us. That looks awesome. I am glad to see that the open source community is hard at work evolving!


http://www.wachadoo.com/forum/ftopic568.html

--perldude69
User avatar
freddie
Registered User
Posts: 404
Joined: Sun Mar 31, 2002 1:40 pm
Location: Estes Park, USA
Contact:

Post by freddie »

i dont know the right topic for that, cant find the advanced bbcode box on this forum :?
User avatar
perldude69
Registered User
Posts: 41
Joined: Sat Apr 08, 2006 12:05 am

How to

Post by perldude69 »

Go ahead and post it here. I am sure no one will mind good info.
User avatar
freddie
Registered User
Posts: 404
Joined: Sun Mar 31, 2002 1:40 pm
Location: Estes Park, USA
Contact:

Post by freddie »

edit:

made some changes to the code, you can find the code + examples here


http://phpbb-testforum.tactic.be/
Last edited by freddie on Wed Nov 08, 2006 1:20 pm, edited 2 times in total.
User avatar
perldude69
Registered User
Posts: 41
Joined: Sat Apr 08, 2006 12:05 am

Thanks!

Post by perldude69 »

I'll give it a shot on my test forum.


--Perldude69
User avatar
freddie
Registered User
Posts: 404
Joined: Sun Mar 31, 2002 1:40 pm
Location: Estes Park, USA
Contact:

Post by freddie »

let me know the result :)
Several
Registered User
Posts: 31
Joined: Sun Mar 20, 2005 11:02 pm

Re: Google Internationalization

Post by Several »

perldude69 wrote: Ok folks,

The last fix worked well. It had one glitch though. If more than one google video was embedded in the same post, it only displayed the first one.
The following change seems to fix this problem. It also takes into account google.video.co.uk videos for those in the UK. People using other international versions of google video, please test and let me know how things go. :-)

Here is the new regular expression. (filter) for the file: includes/bbcode.php

Code: Select all

   

// [GVideo]GVideo URL[/GVideo] code..
$patterns[] = "#\[GVideo\]http://video.google.[A-Za-z0-9.]{2,5}/videoplay\?docid=([0-9A-Za-z-_]*)[^[]*\[/GVideo\]#is";
$replacements[] = $bbcode_tpl['GVideo'];

note, the only change is that com from video.google.com is replaced with [A-Za-z0-9.]{2,5}




--Perldude69



That was just what I need as I have users from all over the world, thx!
EzerchE
Registered User
Posts: 102
Joined: Fri Apr 08, 2005 11:22 pm

Post by EzerchE »

For helpline

Both for /mods/bbcode_box/add_bbcode.js and /mods/bbcode_box/bbcode_box.js


Find:

Code: Select all

ram_help="Insert Real Media file: [ram]File URL[/ram]";
After Add:

Code: Select all

googlevid_help="Insert Google Video URL: [GVideo]GVideo URL[/GVideo]";
youtube_help="Insert Youtube URL: [youtube]Youtube URL[/youtube][/ram]";
and you missed here in bbcode.php:

Code: Select all

#-----[ FIND ]------------------------------------------
#
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);
#
#-----[ AFTER, ADD ]------------------------------------------
#

$bbcode_tpl['youtube'] = str_replace('{YOUTUBEID}', '\\1', $bbcode_tpl['youtube']);
$bbcode_tpl['youtube'] = str_replace('{YOUTUBELINK}', $lang['youtube_link'], $bbcode_tpl['youtube']);
$bbcode_tpl['GVideo'] = str_replace('{GVIDEOID}', '\\1', $bbcode_tpl['GVideo']);
$bbcode_tpl['GVideo'] = str_replace('{GVIDEOLINK}', $lang['GVideo_link'], $bbcode_tpl['GVideo']);
Respect...
Goucho
Registered User
Posts: 72
Joined: Tue Jan 03, 2006 4:02 pm

Post by Goucho »

guys im still getting nowhere the first test post i did worked fine but any others after just show the line of code :(

[/gvideo]googlelink[/gvideo]

PLZ help :(
craiggiarc
Registered User
Posts: 38
Joined: Tue May 30, 2006 6:50 pm
Location: Oklahoma

Post by craiggiarc »

Thanks for the code Freddie, I have the code working in that if I write [gvideo]googlelink[/gvideo] or but when I click on the images in my Advanced BBcode box I get no popup boxes and the code doesn't get added automatically I have to just write it in.

Any thoughts?

Thanks Craig
formalentity
Registered User
Posts: 1
Joined: Sat Sep 23, 2006 2:00 am

Post by formalentity »

Hi Will this work if I am using a custom template?? no subsilver.. Please let me know! :D
i-evil
Registered User
Posts: 8
Joined: Fri Sep 29, 2006 6:04 am

Post by i-evil »

what is PhpBB version suport

Code: Select all

$EMBB_widths = array(''
not found in my code
User avatar
Raimon
Former Team Member
Posts: 12088
Joined: Tue May 30, 2006 5:31 pm
Location: Netherlands
Name: Raimon Meuldijk
Contact:

Post by Raimon »

you most first instaled the Multiple BBCode MOD
than you can find that line correctly :wink:
Need phpBB installation, extenstions, Styles or integrate phpBB with you website?
Contact me for fair prices and good service!
Ravenwing
Registered User
Posts: 1
Joined: Sat Aug 23, 2003 1:17 pm
Contact:

Post by Ravenwing »

Having the same issue as many - I have installed YouTube mod and that works fine (also installed the mod required for both google and youtube bbcode video)

If comeone could point out where my mistake is that would be very much apreciated...I just get the tags with the url nothing happens.

bbcode.php

Code: Select all

	//NOTE: the first element of each array must be ''   Add new elements AFTER the ''
	$EMBB_widths = array('','60','60') ;
	$EMBB_values = array('','YouTube','GVideo') ;
	for ($i=1; $i<count($EMBB_values); $i++)
	{

and

	$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);

	$bbcode_tpl['youtube'] = str_replace('{YOUTUBEID}', '\\1', $bbcode_tpl['youtube']);
	$bbcode_tpl['youtube'] = str_replace('{YOUTUBELINK}', $lang['youtube_link'], $bbcode_tpl['youtube']);

	$bbcode_tpl['GVideo'] = str_replace('{GVIDEOID}', '\\1', $bbcode_tpl['GVideo']);
	$bbcode_tpl['GVideo'] = str_replace('{GVIDEOLINK}', $lang['GVideo_link'], $bbcode_tpl['GVideo']);


	define("BBCODE_TPL_READY", true);

	return $bbcode_tpl;
}

and

// [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'];

	// [GVideo]GVideo URL[/GVideo] code..
    	$patterns[] = "#\[GVideo\]http://video.google.com/videoplay\?docid=([0-9A-Za-z-_]*)[^[]*\[/GVideo\]#is";
    	$replacements[] = $bbcode_tpl['GVideo'];

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

	// Remove our padding from the string..
	$text = substr($text, 1);
lang_main.php

Code: Select all

$lang['bbcode_f_help'] = 'Font size: [size=x-small]small text[/size]';
$lang['bbcode_help']['youtube'] = 'YouTube: [youtube]YouTube URL[/youtube]';
$lang['youtube_link'] = 'Link';
$lang['bbcode_help']['GVideo'] = 'GVideo: [GVideo]GVideo URL[/GVideo]';
$lang['GVideo_link'] = 'Link';
bbcode.tpl

Code: Select all

<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</a><!-- END email -->

<!-- BEGIN youtube -->
<object width="425" height="350">
	<param name="movie" value="http://www.youtube.com/v/{YOUTUBEID}"></param>
	<embed src="http://www.youtube.com/v/{YOUTUBEID}" type="application/x-shockwave-flash" width="425" height="350"></embed>
</object><br />
<a href="http://youtube.com/watch?v={YOUTUBEID}" target="_blank">{YOUTUBELINK}</a><br />
<!-- END youtube -->

<!-- BEGIN GVideo -->
<object width="425" height="350">
        <param name="movie" value="http://video.google.com/googleplayer.swf?docId={GVIDEOID}"></param>
<embed style="width:400px; height:326px;" id="VideoPlayback"
        align="middle" type="application/x-shockwave-flash"
        src="http://video.google.com/googleplayer.swf?docId={GVIDEOID}"
        allowScriptAccess="sameDomain" quality="best" bgcolor="#ffffff"
        scale="noScale" salign="TL"  FlashVars="playerMode=embedded">
</embed>
</object><br />
<a href="http://video.google.com/googleplayer.swf?docId={GVIDEOID}" target="_blank">{GVIDEOLINK}</a><br />
<!-- END GVideo -->
posting_body.tpl

Code: Select all

bbtags = new Array(','[url]','[/url]','[youtube]','[/youtube]','[GVideo]','[/GVideo]');
I dont think I've done anything wrong but like said previously just the tags with the url show up...YouTube works fine.

Thanks in advance!
killyouall
Registered User
Posts: 523
Joined: Tue Oct 18, 2005 3:04 am
Contact:

Post by killyouall »

hi i just installed this mod and now neather of my youtube or google works any ideas???
Post Reply

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