Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Embed video from gamecamportal in forum posts

Asked Modified Viewed 4,326 times
M
marcomax
M
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 5 threads in the forums
  • Started this discussions
asked
Newbie

Hello everyone. I am a noob about PHP fusion so please excuse me if I ask some stupid question.

My forum is about videogames, I would like to embed videos from gamecamportal in forum posts.

I can do it already in the news section, how to do it in forum posts?

The embed code for the video is 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=1018' /><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=1018'/>

Is there any way I can embed it, like with "youtube" tag for youtube videos, in my forum posts?

Thanks for your help!
0 replies

6 posts

J
jikaka
J
jikaka 10
www.rusfusion.ru - russian nss
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 82 threads in the forums
answered
Veteran Member

for the forum you can use the corresponding bb-code
example insert:
[youtube]qQLxf56j7Nw&feature[/youtube]
Edited by jikaka on 13-11-2010 07:44,
0 replies
M
marcomax
M
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 5 threads in the forums
  • Started this discussions
answered
Newbie

But it's not a youtube video, is a video from gamecamportal.com
ex.

http://gamecamportal.com/vpv.aspx?vidid=1025
0 replies
P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

You need to add a new bbcode for this (gamecamportal.com) site.
Can you change youtube bbcode for that?
0 replies
M
marcomax
M
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 5 threads in the forums
  • Started this discussions
answered
Newbie

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,
0 replies
K
keddy
K
keddy 10
  • Junior Member, joined since
  • Contributed 41 posts on the community forums.
  • Started 16 threads in the forums
answered
Junior Member

You could try this :

$text = preg_replace('#\[gameportal\](.*?)\[/gameportal\]#si', '<strong>'.$locale['bb_gameportal'].'</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\'/>', $text);


Usage : [gameportal]1015[/gameportal]
PS : That worked for me.
Edited by keddy on 08-07-2016 13:14,
0 replies
M
marcomax
M
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 5 threads in the forums
  • Started this discussions
answered
Newbie

thank you very much, worked perfectly :)
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 6 posts
  • Votes 0 votes
  • Topic users 4 members

4 participants

K
K
keddy 10
  • Junior Member, joined since
  • Contributed 41 posts on the community forums.
  • Started 16 threads in the forums
P
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
M
M
  • Newbie, joined since
  • Contributed 9 posts on the community forums.
  • Started 5 threads in the forums
  • Started this discussions
J
J
jikaka 10
www.rusfusion.ru - russian nss
  • Veteran Member, joined since
  • Contributed 946 posts on the community forums.
  • Started 82 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet