4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 17, 2017, 03:19:02 PM

Login with username, password and session length
Search:     Advanced search
Check the new Tutorial subforum with helpfull guides and tutorials for modifications and tweaks.
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Help / Hilfe
| |-+  FAQ, Tips
| | |-+  How to add FLV (Flash Video) support
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: How to add FLV (Flash Video) support  (Read 21182 times)
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 565

mmm PHP...


View Profile WWW
« on: January 17, 2009, 02:49:46 AM »

Ok, this question become quiet popular at this forum. So here it is the answer.
In this tutorial we will use free for non-commercial usage JW FLV Media Player v4.3.

1. Go to ACP (Admin Control Panel) -> Settings -> Scroll down and find Valid file extensions, add to the list flv (don't forget put comma). Save the settings.

2. Open includes/upload_definitions.php

Insert at the end of the file, above closing ?>
1
$mime_type_match['flv'] = array("application/x-shockwave-flash", "application/octet-stream", "video/flv", "video/x-flv");


3. Create a new template: templates/<your template>/media/flv.html
with this code inside:
Code (template):  [Select]  [Expand]  [Hide line numbers]
1
2
3
4
5
6
7
8
9
10
<script type='text/javascript' src='swfobject.js'></script>
<div id='mediaspace'>This div will be replaced</div>
<script type='text/javascript'>
  var s1 = new SWFObject('player.swf','ply','470','320','9','#ffffff');
  s1.addParam('allowfullscreen','true');
  s1.addParam('allowscriptaccess','always');
  s1.addParam('wmode','opaque');
  s1.addParam('flashvars','file=<?=urlencode("{media_src}")?>&autostart=true');
  s1.write('mediaspace');
</script>

4. Download the player from the link above.
NOTE At the time this tutorial is written the player's download page has "Include the JW Viral Plugin" checkbox, when checked, the downloaded package will have player-viral.swf file, instead of player.swf.
In this tutorial we'll use JW FLV Media Player 4.3 without the "JW Viral plugin" (checkbox at download page must be unchecked).

From the downloaded package take only player.swf and swfobject.js, upload them to the root of your 4images gallery (this is important, in my tests it didn't work when I uploaded these files into a subdirectory).

5. Create an templates/<your template>/icons/flv.gif icon (this icon will be showed when no thumbnail available)

6. Try upload a .flv file, if you get an error about Invalid file type, follow this instructions
« Last Edit: February 18, 2009, 11:56:38 PM by V@no » Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 1.056 seconds with 19 queries.
Post your comments here