NAVIGATION
This shows you the differences between two versions of the page.
|
english:phpwcms_replacer_rts:frontend_init:cp_trigger:multimedia-copy-swf-file [2010/09/07 14:31] Knut Heermann (flip-flop) created |
english:phpwcms_replacer_rts:frontend_init:cp_trigger:multimedia-copy-swf-file [2018/06/03 18:09] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| {{indexmenu_n>100}} | {{indexmenu_n>100}} | ||
| - | ====== Multimedia: Copy SWF file in a non-protected directory ====== | + | ====== Multimedia: Copy SWF file into a non-protected directory ====== |
| - | When using the multimedia CP to display a Flash swf file and using the "internal file" option (a swf file uploaded from the backend), the file doesn't display/load in the front end. | + | When using the multimedia CP to display a Flash swf file and using the "internal file" option (a swf file uploaded via the backend), the file doesn't display/load in the front end. |
| The reason for this behavior is the protection of the directory "/filearchive/" by an htaccess file. | The reason for this behavior is the protection of the directory "/filearchive/" by an htaccess file. | ||
| - | There are two solutions to this problem: | + | **There are two solutions for this problem:** |
| - | 1st Disable the htaccess file // | + | **1st** Disable the htaccess file (no good idea) \\ |
| - | 2nd Copy the requested file in a non protected directory and provide it from this place // | + | **2nd** Script: Copy the requested file into an unprotected directory and provide it from this place \\ |
| - | I want to talk about the second method. | + | **I want to talk about the second method.** |
| \\ | \\ | ||
| + | |||
| ===== Description: ===== | ===== Description: ===== | ||
| - | During the call of the CP, the script looks for the existence of the requested file in the non-protected directory. If this file does not exist there, that file will be copied from "/filearchive/" to "/content/tmp/" and transcribed the HTML source code for the output. | + | **Script:** |
| + | During the CP call the script determines the relevant file name from the HTML source code and looks for the existance of the requested file within the non-protected directory. If this file does not exist there, that file will be copied from "/filearchive/" to "/content/tmp/" and the HTML source code for the output will be generated. | ||
| + | |||
| + | <note> **If the original file in "/filearchive/" is deleted, the copy in "/content/tmp/" will persist !!**</note> | ||
| \\ | \\ | ||
| Line 25: | Line 29: | ||
| ---- | ---- | ||
| Docu: -- \\ | Docu: -- \\ | ||
| - | Forum: [[http://forum.phpwcms.org/viewtopic.php?p=126267|Flash swf file doesn't display in multimedia content part]] // | + | Forum: [[http://forum.phpwcms.org/viewtopic.php?p=126267|Flash swf file doesn't display in multimedia content part]] \\ |
| - | **Author:** K.Heermann (flip-flop) http://planmatrix.de \\ | + | **Author:** K.Heermann (flip-flop) [[http://planmatrix.de]] \\ |
| **CMS Version:** >= 1.4x \\ | **CMS Version:** >= 1.4x \\ | ||
| **Version:** V1.0 //(07.09.2010)// \\ | **Version:** V1.0 //(07.09.2010)// \\ | ||
| Line 41: | Line 45: | ||
| ===== Example template: ===== | ===== Example template: ===== | ||
| - | File: **/template/inc_cntpart/multimedia/copy_swf.tmpl** | + | For a better identification and runtime optimization you must insert ##%%<!--COPY_SWF//-->%%## into the template. |
| + | |||
| + | File: **template/inc_cntpart/multimedia/copy_swf.tmpl** | ||
| - | <code html |h copy_swf.tmpl |h> | + | <code html> |
| [MULTIMEDIA] | [MULTIMEDIA] | ||
| <!--COPY_SWF//--> | <!--COPY_SWF//--> | ||