Let me get straight to it.... :P
When you post an image using the forums upload feature you get a cool thumbnail under your post...
So this leads me to my question.... How hard would it be to get a "video box" to appear when you post a video using the same functionality? I am thinking fixed dimensions would be good but curious if this is a good or horrible idea and how hard such a thing might be?
Thank you in advance for any advise you offer.
Depends if you want to get just a video player, or have an appropriate picture thumbnail as well.
The former is a relatively minor modification to the display code, the latter much more complex.
If you are uploading Videos, recommend they be small, otherwise, you could use up all of your server space rather quickly, not to mention the limitations of PHP uploading via normal situations. If you are talking about embedding a video, piece of cake and definitely the way to go. If you want to output it in your own player, than, since HTML 5 is basically taking control over the internet and many sites are already ditching Flash Player, than just use html 5 <video> tag to output it, but this would be best if not allowing video uploads and instead just video urls that can be outputted on your site.
Videos can be extremely huge, and unless you have some sort of video compression software installed on your site that will compress the videos to a descent size (much like Vimeo does when uploading to there site), it would cost a ton of money for just the bandwidth of your site, and than you have security issues to consider where people can steal valuable bandwidth from your site with your videos on your site outputting them on their site. This topic has way too much overhead if you are wanting to allow people to upload videos on your SMF Site.
A good way to do it is just embed the videos using youtube, vimeo, or jwplayer.
Lainaus käyttäjältä: Arantor Beeblebrox the First - marraskuu 25, 2013, 08:13:43 IP
Depends if you want to get just a video player, or have an appropriate picture thumbnail as well.
The former is a relatively minor modification to the display code, the latter much more complex.
I'd like to have just a simple video player. Perhaps using some simple HTML5 for play/pause. 480px wide by 320px tall at the most I think would do nicely. All the videos will be below 2mb so no worries for me with bandwidth. Just think it'd be cool to have the functionality for some of the stuff I do video wise.
So to place a video "player" instead of a thumbnail will be quite a project correct?
I am assuming display.template and the display file in the sources directory is where I should start... Do I need to mess with load.php or anything else to make a go of this?
- Subs-Post.php (For deeper, underlying, functions that tie into Post.php), Post.php (Basic Functions and variables that directly tie into the template), Post.template.php (Template HTML Output) - Used when adding and/or editing Posts/Topics.
- Display.php and Display.template.php - For when displaying the contents of the post.
Load.php - If there is anything global that you want to add to all pages of your SMF Forum. This is good for global functions that you can call anywhere, since Load.php gets called on every single page of SMF. But, this is kind of an old, hard-coded method of doing this. You should probably use integration hooks (which is the new and improved SMF way of handling this), such as
integrate_pre_include (http://wiki.simplemachines.org/smf/Integration_hooks#integrate_pre_include), where you can specify your own file, separate from SMF, that Load.php will call and include your functions from. To be honest, I don't see why you would need to use Load.php for this.
Ah nice!!
Thanks!!