Welcome to the E-Blah Community!
We would like to welcome you to our community and invite you to register an account or login.
Being a registered member is important, as it gives you several advantages over the normal Guest status. After registering you will be able to download files and images, post messages, and access member-only portions of the forum - just to name a few. Registration is quick and simple, and only takes about a minute of your time.

E-Blah Community    Technical Support    Forum Support  ›  Problem Embedding Video
Users Browsing Forum
Yahoo! Bot and 2 Guests

Problem Embedding Video  This thread currently has 130 views. Print
2 Pages 1 2 » Recommend Thread
impished
January 26, 2009, 10:39am Report to Moderator Report to Moderator
E-Blah Member
Posts: 41
Posts Per Day: 0.07
Reputation: 100.00%
Reputation Score: +2 / -0
Time Online: 1 days 7 hours 44 minutes
Hi,
I've allowed my users to embed video via sites (youtube, etc)  embed codes.  Unfortunately, one of the most popular sites among my users puts ' in their code instead of "
Is there a way I automatically change ' to a " ?

This is an example of the embed code from http://www.PinkBike.com with the offending '

<object width='500' height='440'><param name='allowFullScreen' value='true' /><param name='allowScriptAccess' value='always' /><param name='movie' value='http://www.pinkbike.com/v/49357/l/' /><embed src='http://www.pinkbike.com/v/49357/l/' type='application/x-shockwave-flash' width='500' height='440' allowFullScreen='true' allowScriptAccess='always'></embed></object>
Logged Offline
Site Site Private Message Private message
Nat
January 26, 2009, 10:49am Report to Moderator Report to Moderator

Here to help
Administrator
Posts: 1,758
Gender: Male
Posts Per Day: 6.05
Reputation: 90.48%
Reputation Score: +38 / -4
Time Online: 7 hours 36 minutes
Location: Manchester UK
Age: 48
Have you tried Martins YouTube mod? works a treat and can be found in the modification section


"Thats the way the mop flops"
Logged Offline
Site Site Private Message Private message Reply: 1 - 24
impished
January 26, 2009, 12:52pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 41
Posts Per Day: 0.07
Reputation: 100.00%
Reputation Score: +2 / -0
Time Online: 1 days 7 hours 44 minutes
I have the media mod installed also.  The problem is that PinkBike have chosen to use apostrophes and not quotation marks.  I am sure it can be resolved in Perl, but I have yet to work out how to do it.
Logged Offline
Site Site Private Message Private message Reply: 2 - 24
Martin
January 26, 2009, 2:17pm Report to Moderator Report to Moderator

I love E-Blah
10 Series Support Team
Posts: 5,121
Gender: Male
Posts Per Day: 2.49
Reputation: 98.79%
Reputation Score: +244 / -3
Time Online: 38 days 21 hours 31 minutes
Location: UK
Age: 51
Download the attached, unzip and upload in ASCII overwriting the current Media.pl
I have modified it to include pinkbike.com



This post contains attachments; to download them you must login.




Martin's Reputation: Increase
Logged
Site Site Private Message Private message Reply: 3 - 24
impished
January 26, 2009, 2:58pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 41
Posts Per Day: 0.07
Reputation: 100.00%
Reputation Score: +2 / -0
Time Online: 1 days 7 hours 44 minutes
Quoted from Martin
Download the attached, unzip and upload in ASCII overwriting the current Media.pl
I have modified it to include pinkbike.com

Thanks for your quick help Martin....  Alas, it didn't work

The original url = http://www.pinkbike.com/video/49357/ needs to end-up as http://www.pinkbike.com/v/49357/

Sorry but I've tried to snoop at Perl, but can't quite work out the reg-ex for this one
Logged Offline
Site Site Private Message Private message Reply: 4 - 24
Martin
January 26, 2009, 3:20pm Report to Moderator Report to Moderator

I love E-Blah
10 Series Support Team
Posts: 5,121
Gender: Male
Posts Per Day: 2.49
Reputation: 98.79%
Reputation Score: +244 / -3
Time Online: 38 days 21 hours 31 minutes
Location: UK
Age: 51
Works on my test site: http://www.opportunitynowhere.co.uk/cgi-bin/forum/Blah.pl?m-1233000371/

Here's what I put between the media inserts:

[media]http://www.pinkbike.com/v/49357[/media]

even works with:

[media]http://www.pinkbike.com/v/49357/l/[/media]

I would like to point out that this is how you add the media, you don't insert the full embed code.



Martin's Reputation: Increase
Logged
Site Site Private Message Private message Reply: 5 - 24
impished
January 26, 2009, 4:51pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 41
Posts Per Day: 0.07
Reputation: 100.00%
Reputation Score: +2 / -0
Time Online: 1 days 7 hours 44 minutes
Quoted from Martin
Works on my test site: http://www.opportunitynowhere.co.uk/cgi-bin/forum/Blah.pl?m-1233000371/

Here's what I put between the media inserts:

[media]http://www.pinkbike.com/v/49357[/media]

even works with:

[media]http://www.pinkbike.com/v/49357/l/[/media]

I would like to point out that this is how you add the media, you don't insert the full embed code.

Thanks for helping Martin.... but....  your link above doesn't work.....  and the PinkBike original url is http://www.pinkbike.com/video/49357/

Logged Offline
Site Site Private Message Private message Reply: 6 - 24
Martin
January 27, 2009, 12:31am Report to Moderator Report to Moderator

I love E-Blah
10 Series Support Team
Posts: 5,121
Gender: Male
Posts Per Day: 2.49
Reputation: 98.79%
Reputation Score: +244 / -3
Time Online: 38 days 21 hours 31 minutes
Location: UK
Age: 51
Sorry, still works for me and I just clicked my link to the test post and it's the same video that you say is the original.

And this is from your original post: http://www.pinkbike.com/v/49357/l/
This from mine: http://www.pinkbike.com/v/49357/l/

This won't work by pasting it directly in your browser as the v is transposed to video.

Maybe someone else can click the links and see if it works for them?



Martin's Reputation: Increase

Revision History (1 edits)
Martin  -  January 27, 2009, 1:02am
Logged
Site Site Private Message Private message Reply: 7 - 24
impished
January 27, 2009, 4:49am Report to Moderator Report to Moderator
E-Blah Member
Posts: 41
Posts Per Day: 0.07
Reputation: 100.00%
Reputation Score: +2 / -0
Time Online: 1 days 7 hours 44 minutes
I'm really sorry Martin.... I was being a plonker and talking cross-purposes.

The original url = http://www.pinkbike.com/video/49357/
The media mod needs to change the url to http://www.pinkbike.com/v/49357/l/

Again, I'm really sorry for being a plonker and I appreciate your time and effort.
Logged Offline
Site Site Private Message Private message Reply: 8 - 24
impished
January 27, 2009, 7:20am Report to Moderator Report to Moderator
E-Blah Member
Posts: 41
Posts Per Day: 0.07
Reputation: 100.00%
Reputation Score: +2 / -0
Time Online: 1 days 7 hours 44 minutes
OK, thanks for your help Martin, and again apologies for confusing the issue.  But I've worked it out myself.
Logged Offline
Site Site Private Message Private message Reply: 9 - 24
PunkMaister
April 25, 2009, 9:57pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 11
Posts Per Day: 0.02
Time Online: 1 hours 47 minutes
I take it that I cannot use the adm. control pannel to use any of this can I? I would need to phisically access the server itself wouldn't I? If so then it befalls on the adm. of the website as a whole itself as I just administer the board itself.
Logged Offline
Private Message Private message Reply: 10 - 24
Martin
April 26, 2009, 1:11am Report to Moderator Report to Moderator

I love E-Blah
10 Series Support Team
Posts: 5,121
Gender: Male
Posts Per Day: 2.49
Reputation: 98.79%
Reputation Score: +244 / -3
Time Online: 38 days 21 hours 31 minutes
Location: UK
Age: 51
You would need the webmaster to upload the mod via ftp so it can be installed via the Admin Center



Martin's Reputation: Increase
Logged
Site Site Private Message Private message Reply: 11 - 24
iCONICA
April 26, 2009, 9:28am Report to Moderator Report to Moderator

Forum Moderation
Posts: 1,409
Gender: Male
Posts Per Day: 1.52
Reputation: 98.25%
Reputation Score: +56 / -1
Time Online: 15 days 22 hours 17 minutes
Location: Manchester UK
You can copy and paste the code from the mod into E-Blah's modification Center if you don't have FTP access. But I'm not sure I understand your question?


Logged Offline
Site Site Private Message Private message Windows Live Messenger WLM Reply: 12 - 24
PunkMaister
April 26, 2009, 4:41pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 11
Posts Per Day: 0.02
Time Online: 1 hours 47 minutes
Quoted from iCONICA
You can copy and paste the code from the mod into E-Blah's modification Center if you don't have FTP access. But I'm not sure I understand your question?


I've tried using the modification center using copy/paste for the code here:
Quoted Text
#############################################
# E-Blah Bulliten Board Systems        2007 #
#############################################
# Copyright (c) 2001 - 2007 E-Blah.         #
#############################################
sub embed {
     if (!$player_version){$player_version = 6;}

     my ($media_url,$play_pars) = @_;
     if ($media_url !~ m/^http:\/\//){ $media_url = "media://" + $media_url; } else { $media_url =~s~http:~media:~g; }
     ## file extensions that open windows media player for video
     if ($media_url =~ m/.wmv$/i || $media_url =~ m/.wpl$/i || $media_url =~ m/.asf$/i || $media_url =~ m/.avi$/i || $media_url =~ m/.mpg$/i || $media_url =~ m/.mpeg$/i){
          if ($player_version == 6){
               $video = $embed_wmv6;
          } elsif ($player_version == 10){
               $video = $embed_wmv10;
          } else {
               $video = $embed_wmv6;
          }
          $controlheight = 45;
     ## file extensions that open windows media player for audio
     } elsif ($media_url =~ m/.wma$/i || $media_url =~ m/.wax$/i || $media_url =~ m/.asx$/i || $media_url =~ m/.mp3$/i || $media_url =~ m/.mid$/i || $media_url =~ m/.wav$/i || $media_url =~ m/.kar$/i || $media_url =~ m/.rmi$/i){
          if ($player_version == 6){
               $video = $embed_wma6;
          } elsif ($player_version == 10){
               $video = $embed_wma10;
          } else {
               $video = $embed_wma6;
          }
     ## file extensions that open flash player
     } elsif ($media_url =~ m/.ra$/i || $media_url =~ m/.ram$/i || $media_url =~ m/.rm$/i){
          $video = $embed_ra;
     } elsif ($media_url =~ m/.swf$/i){
          $video = $embed_flash;
     } elsif ($media_url =~ m/youtube\.com/i){
          $media_url =~ s~watch\?v\=~v\/~g;
          $video = $embed_flash;
          $controlheight = 36;
     ## file extensions that open pinkbike player
     } elsif ($media_url =~ m/pinkbike\.com/i){
          $media_url =~ s~watch\?v\=~v\/~g;
          $video =$embed_flash2;
          $controlheight = 25;
     ## file extensions that open apple quicktime player player
     } elsif ($media_url =~ m/.qt$/ || $media_url =~ m/.qtm$/i || $media_url =~ m/.mov$/i){
          $video = $embed_qt;
          $controlheight = 15;
     }
     if ($play_pars =~ m/loop/){$pl_loop = "true"; } else {$pl_loop = "false"; }
     if ($play_pars =~ m/hide/ || $play_pars =~ m/hidden/){$pl_controls = "false"; $pl_controlheight = 0; $pl_controlwidth = 0;} else {$pl_controls = "true"; $pl_controlheight = 45; $pl_controlwidth = 320;}
     if ($play_pars =~ m/autostart/){$pl_start = "true"; } else {$pl_start = "false"; }
     if ($play_pars =~ m/width\=(\d{2,3})/i){
          $tempwidth= $1;
          if ($tempwidth >= 180 || $tempwidth <= 800){
               $pl_width = int($tempwidth);
               $pl_height = int(($pl_width*3)/4) + $controlheight;
          } else {
               $pl_width = 320;
               $pl_height = 240 + $controlheight;
          }
     } else {
          $pl_width = 320;
          $pl_height = 240 + $controlheight;
     }
     $video =~ s~[\t\r\n]~~g;
     $video =~ s~_width_~$pl_width~ig;
     $video =~ s~_controls_~$pl_controls~ig;
     $video =~ s~_height_~$pl_height~ig;
     $video =~ s~_controlheight_~$pl_controlheight~ig;
     $video =~ s~_controlwidth_~$pl_controlwidth~ig;
     $video =~ s~_media_~$media_url~ig;
     $video =~ s~_loop_~$pl_loop~ig;
     $video =~ s~_autostart_~$pl_start~ig;
     return $video;
}

sub flashconvert{
     my ($fl_url,$fl_size) = @_;
     $fl_size =~ s/ //g;
     my ($fl_width, undef) = split (/\,/ , $fl_size);
     return "\[media width\=$fl_width\]$fl_url\[/media\]";
}

## Windows Media Player 6.4 Video
$embed_wmv6 = qq~
      <object id='mediaPlayera' width="_width_" height="_height_"
      classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95'
      codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
      standby='Loading Microsoft Windows Media Player 6.4 components...' type='application/x-oleobject'>
      <param name='fileName' value="_media_"></param>
      <param name='autoStart' value="_autostart_"></param>
      <param name='showControls' value="_controls_"></param>
      <param name='loop' value="_loop_"></param>
      </object>
~;

## Windows Media Player 6.4 Audio
$embed_wma6 = qq~
      <object id='mediaPlayerb' width="_controlwidth_" height="_controlheight_"
      classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95'
      codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
      standby='Loading Microsoft Windows Media Player 6.4 components...' type='application/x-oleobject'>
      <param name='fileName' value="_media_"></param>
      <param name='autoStart' value="_autostart_"></param>
      <param name='showControls' value="_controls_"></param>
      <param name='loop' value="_loop_"></param>
      </object>
~;

## Windows Media Player 7,9 or 10 Video
$embed_wmv10 = qq~
      <object id='mediaPlayerc' width="_width_" height="_height_"
      classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6'
      codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112'
      standby='Loading Microsoft Windows Media Player 7, 9 or 10 components...' type='application/x-oleobject'>
      <param name='fileName' value="_media_"></param>
      <param name='autoStart' value="_autostart_"></param>
      <param name='showControls' value="_controls_"></param>
      <param name='loop' value="_loop_"></param>
      </object>
~;

## Windows Media Player 7,9 or 10 Audio
$embed_wma10 = qq~
      <object id='mediaPlayerd' width="_controlwidth_" height="_controlheight_"
      classid='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6'
      codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112'
      standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>
      <param name='fileName' value="_media_"></param>
      <param name='autoStart' value="_autostart_"></param>
      <param name='showControls' value="_controls_"></param>
      <param name='loop' value="_loop_"></param>
      </object>
~;

$embed_ra = qq~
        <object id='rvocx' classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA'
        width="320" height="_height_">
        <param name='src' value="_media_"></param>
        <param name='autostart' value="_autostart_"></param>
        <param name='controls' value='imagewindow'></param>
        <param name='console' value='video'></param>
        <param name='loop' value="_loop_"></param>
          </object>
~;

$embed_qt = qq~
        <object classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' width="_width_"
        height="_height_" codebase='http://www.apple.com/qtactivex/qtplugin.cab'>
        <param name='src' value="_media_"></param>
        <param name='autoplay' value="_autostart_"></param>
        <param name='controller' value="_controls_"></param>
        <param name='loop' value="_loop_"></param>
        </object>
~;

$embed_flash = qq~
     <object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
     codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
     width="_width_" height="_height_" id="myMovieName">
     <param name='movie' value="_media_"></param>
     <param name='quality' value="high"></param>
     <param name='bgcolor' value="#fff"></param>
<embed src="_media_" quality="high" bgcolor="#fff"
width="_width_" height="_height_"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/shoc.....t;></embed>
     </object>
~;

$embed_flash2 = qq~
     <object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
     codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
     width="_width_" height="_height_" id="myMovieName">
     <param name='movie' value="_media_"></param>
     <param name='quality' value="high"></param>
     <param name='bgcolor' value="#fff"></param>
     <param name='allowFullScreen' value="false">
     <param name='allowScriptAccess' value="never">

<embed src="_media_" quality="high" bgcolor="#fff"
width="_width_" height="_height_"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/shoc.....t;></embed>
     </object>
~;
1;


And I get in return this error message:

Quoted Text
The modification you entered is not valid. A valid modification must have a modname tag.



The version of E-Blah we got is E-Blah 10.3.6
Logged Offline
Private Message Private message Reply: 13 - 24
iCONICA
April 26, 2009, 6:56pm Report to Moderator Report to Moderator

Forum Moderation
Posts: 1,409
Gender: Male
Posts Per Day: 1.52
Reputation: 98.25%
Reputation Score: +56 / -1
Time Online: 15 days 22 hours 17 minutes
Location: Manchester UK
No, you can't simply paste a block of perl code into there.
If you have a valid modification, written by someone here, it'll have .v2m (I think) as the file extension. You can paste the contents of that into the modification Center. Saves having to use the FTP method.


Logged Offline
Site Site Private Message Private message Windows Live Messenger WLM Reply: 14 - 24
2 Pages 1 2 » Recommend Thread
Print

E-Blah Community    Technical Support    Forum Support  ›  Problem Embedding Video

Thread Tags
sites,  users,  ',  embed,  code