Antonio Grazioli Web Site
Web Technologies & more...

 

 

Main Menu
Home
News
Web Technologies
SQL Server
Portfolio
Downloads
Contact me
Search...

Revver Videos on a phpBB Forum

I have managed to put Revver Videos on a phpBB Forum

You have to install the Youtube Mod for phpBB first, which allows you to insert Youtube Videos. See official post on phpBB forums.
(please note that this Mod requires the "Multi BBCode Mod installed)

I have simply made some additional modification based on the Youtube Mod, using basically the same logic.

PLEASE NOTE That this is in no way an official Mod but just an implementation based on other code. Please always backup your files before making any modification!

Here are the additional lines of code you need to add:

1)  in your templates/[yourtemplate]/bbcode.tpl

#
#-----[ FIND ]------------------------------------------ 
#
<!-- END youtube -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN revver -->
<script src="http://flash.revver.com/player/1.0/player.js?mediaId:{REVVERID};
affiliateId:{AFFILIATEID};height:392;width:480;" type="text/javascript"></script>
<!-- END revver -->

 2) in your includes/bbcode.php

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

3) in your  includes/bbcode.php

#
#-----[ FIND ]------------------------------------------
#
$bbcode_tpl['youtube'] = str_replace('{YOUTUBEID}', '\\1', $bbcode_tpl['youtube']);
$bbcode_tpl['youtube'] = str_replace('{YOUTUBELINK}', $lang['youtube_link'], $bbcode_tpl['youtube']);
#
#-----[ AFTER, ADD ]------------------------------------------
#
$bbcode_tpl['revver'] = str_replace('{REVVERID}', '\\1', $bbcode_tpl['revver']);
$bbcode_tpl['revver'] = str_replace('{AFFILIATEID}', '\\2', $bbcode_tpl['revver']);
 

This way, you can simply embed your Revver URL into [revver] and [/revver] tags.

If you like, you can also add a "Revver" button to automatically insert this tags, you should modify the existing array of buttons adding another one, making some more easy hacks to includes/bbcode.php and  templates/[yourtemplate]/posting_body.tpl

 

 

 
< Prev