• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Displaying and running a video in JForum

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am able to upload (as an attachment) a video to JForum, but can anyone please tell me how I can get it to display as a video which a user can just click to play, rather than a file to download?
Many thanks.
Rav
[originally posted on jforum.net by Rav]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To play a video it has to be wrapped in an appropriate set of <object.. tags. This should specify a player "plug-in" that can handle the type of video you want to display. Preferably, a player that will run on all types of machines (e.g. Mac, Linux, Windows...) and is commonly available. FYI, youtube uses Flash Shockwave (and converts uploaded videos to this format). >

Currently, there is no support to identify video attachments and wrap them in the correct player.

However, if you want to play around with getting this to work, you might be able to convert the post_show_attachment_inc.htm template file to do this.

Basically, I think the "a" loop variable is the handle to an Attachment object. From this you can use the info property to find all sorts of info about the file and use this to write out the appropriate <object... /object> HTML to display the video.

One thing to note is that this might take a lot of bandwidth if you want to support this. Unlike YouTube links, you're server will be supplying the video "stream" A lot of users looking at videos can eat up a lot of bandwidth.
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Monroe,
Many thanks for taking the time to reply.
Cheers,
rav
[originally posted on jforum.net by Rav]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One more question please. How can you get a youtube link to render an image on JForum. I've tried enabling HTML in the post, but it doesn't make a difference.

e.g.
<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/xiTuaZvmgaI"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/xiTuaZvmgaI" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
[originally posted on jforum.net by Rav]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Create a new bbcode. Open the file WEB-INF/config/bb_config.xml and add the respective code there. For example, you can create a [youtube] tag that renders the <object> tag.

After you edit this file, go to Admin Panel -> Cache -> Reload BB Code.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I would like to integrate the same functionality. I played around with the <match> tag in bb_code config file. but I couldnt able to render the image of the link. Is that possible for anyone to explain in more detail.


Thanks in advance

Cheers
[originally posted on jforum.net by Supernus]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
need captcha for jforum
[originally posted on jforum.net by adadasfsf]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Supernus wrote:Hi All,

I would like to integrate the same functionality. I played around with the <match> tag in bb_code config file. but I couldnt able to render the image of the link. Is that possible for anyone to explain in more detail.


Thanks in advance

Cheers



Please put here the bb_config.xml portion you tried to use.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

Thanks for the reply. The following is what I have tried,

<match name="video" removeQuotes="true">
<regex>(?i)\[url\](.*?)\[/url\]</regex>
<replace>
<![CDATA[ <br /> <object width="425" height ="350"> <br /> <param name="movie" value ='$1'></param> <br /> <param name="wmode" value ="transparent"></param> <br /> <embed src='$1' type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed> <br /> </object> <br /> ]]>
</replace>
</match>


If this is not what I should do could you please advice me on how to proceed and what exactly I should follow.

Many Thanks
[originally posted on jforum.net by Supernus]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try changing:



to



This should allow postings to use a new BB Code like:



[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Many thanks for the reply. I tried that but it is not working. It displays the [video] tag along with the link.

cheers
[originally posted on jforum.net by Supernus]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm, this works fine on my reference install. Did you remember to go to the admin screen / cache screen and reload the bbcode cache? Or alternatively, restart your application?

Also, the value of the URL probably has to be a valid media type that your browser has a plug in for. E.g. .wmv, .mpg, and the like.
[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The BB Code for youtube is as follows:


Usage:

See http://www.andowson.com/posts/list/110.page for Live demo
[originally posted on jforum.net by andowson]
 
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic