I don't know how to do that, could you please help me and give some instructions? I tried creating a new BBcode called "gamevideo" basically duplicating youtube BBcode files, and replacing the line: $text = preg_replace('#\[youtube\](.*?)\[/youtube\]#si', '<strong>'.$locale['bb_youtube'].'</strong><br /><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/\1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/\1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>', $text); ?> with $text = preg_replace('#\[gamevideo\](.*?)\[/gamevideo\]#si', '<strong>'.$locale['bb_gamevideo'].'</strong><br /><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" style="width:540px; height:390px;" height="540" width="390"> <param name="allowScriptAccess" value="never" /> <param name="allowNetworking" value="internal" /> <param name="movie" value="http://www.gamecamportal.com/portal_vidplayer_ed.swf" /> <param name="wmode" value="transparent" /> <param name="FlashVars" value="vidid=\1" /><embed type="application/x-shockwave-flash" style="width:540px; height:390px;" allowScriptAccess="never" allowNetworking="internal" src="http://www.gamecamportal.com/portal_vidplayer_ed.swf" height="540" width="390" wmode="transparent" FlashVars="vidid=\1"/> I could activate the BBcode but on the forum post I receive this error: Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /home/content/b/r/a/bravocagnino/html/includes/bbcodes/gamevideo_bbcode_include.php on line 22 Parse error: syntax error, unexpected '<' in /home/content/b/r/a/bravocagnino/html/includes/bbcodes/gamevideo_bbcode_include.php on line 22 and it's no suprise since I don't really know PHP syntax I probably made some error, could some please take a look and debug, knowing that the embed string for gamaeportal video is something like this: <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' style='width:540px; height:390px;' height='540' width='390'> <param name='allowScriptAccess' value='never' /> <param name='allowNetworking' value='internal' /> <param name='movie' value='http://www.gamecamportal.com/portal_vidplayer_ed.swf' /> <param name='wmode' value='transparent' /> <param name='FlashVars' value='vidid=1015' /><embed type='application/x-shockwave-flash' style='width:540px; height:390px;' allowScriptAccess='never' allowNetworking='internal' src='http://www.gamecamportal.com/portal_vidplayer_ed.swf' height='540' width='390' wmode='transparent' FlashVars='vidid=1015'/> where obviously the vidid=1015 is the video code. Thanks a lot and very sorry to disturb!
Edited by
marcomax on 13-11-2010 10:27,
14 y 0 replies