Recent Changes - Search:




Summary: Talk page for Flash.
Users: +4 (View / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Comments and discussion

Discussion for swf.php


With the modification specified below, it's possible to insert .swf but the width and height are alterable.

I suppose it's because of a wrong declaration of this variable.

  • $WikiStyleAttr seems not still existing, should I use $WikiStyle or $WikiStyleApply or I'm on the wrong way.
  • Is it still the correct way to declare height and width?
  'height' => 'img|object|embed',
  'width' => 'img|object|embed')); 

Jvamp February 14, 2016, at 12:59 PM

As it seems this cookbook is not supported on php5.5.

I tried to actualise it and it seems working correctly.

I changed thanks to Petko a line in swf.php

Markup('swf', '<urllink',

    \$GLOBALS['SwfTagFmt']), 'L')");

which becomes

Markup_e('swf', '<urllink',

    \$GLOBALS['SwfTagFmt']), 'L')");

Jvamp december,12,2015

Discussion for swf-sites.php

It seems Youtube video's are not working anymore (doesn't matter which browser). Anything wrong with the embed code? Adding $YouTube_enableNewPlayer=true; to config.php doesn't help either?

EDIT: Okay, fixed it. Didn't realize $YouTube_enableNewPlayer=true; should be added before including the recipe.

Jo Vermeulen March 1, 2014

Google Chrome version 33 has appeared recently (end of February 2014), and the embedded player for You Tube vanished from our wiki (Pacific Bulb Society). Everything is fine in Firefox or in older Chrome. I fixed this by commenting out nocookie (and hd which is apparently defunct action script 2).

David Pilling 25th February 2014

I installed version 2011-06-16b , and tried it on

YouTube consistently works for Firefox, Chrome, Opera, and SeaMonkey, and consistently gives me a blank video player for Safari and Omniweb that says "An error occurred, please try again later." I've tried this on two different computers. I can view the YouTube in Safari and Omniweb if I directly enter the URL in the browser's address bar.

Is this a problem with the recipe, or is it a browser configuration issue? I've looked at the browser preferences and haven't noticed any problems with the browser configuration.

- RandyB February 16, 2014, at 11:21 PM

On iPad, the default browser couldn't play embedded videos. I am pretty sure it was Safari. Not just in pmwiki and for youtube, but in various forums and for various video sites.
Another browser could play the embedded videos properly. It might have been Diigo, or some browser that looks like Diigo.
So... it was a Safari issue.
Does your Safari have issues with embedded videos, on other, non-pmwiki, web sites, as well?

- nikos?

Thanks for the suggestions. I found the solution: I set $YouTube_enableNewPlayer=true in config.php. Now it works for both OmniWeb, and on Safari - both under IOS and OSX.

- RandyB February 17, 2014, at 10:09 AM

Discussion for swf.php

Note: the swf.php script is using the Flash 6 player (applets generated with Flash MX). For MX2004 and later (or earlier, if you're using some obsolete Flash features), you'd have to alter the $SwfTagFmt string to fit html generated by that version of Flash (or AfterShock). -Radu
When I try using an absolute URL to an swf file, the height and width don't seem to work. It will wrap the object tag with a span of the specified height and width, but it won't put the height and width into the object tag itself. -bdk?

Here is an informative blog entry for standards compliant flash.

This one is almost useless, since most .flv videos are too large to attached (exceed 5000kb), and, .flv is not an allowed extension for attachments. tonybaldwin February 21, 2011, at 09:58 AM
hi tony. don't know much about this recipe, but pretty positive it only works for swf. however, you can use the player below to play flv's that are uploaded to overtones99 February 21, 2011, at 04:04 PM

Discussion for flash.php & flash2.php

very strange: I tried uploading a working version that I had locally stored, and the version on the server remains corrupted; perhaps the file's permissions need to be adjusted? shi March 19, 2008, at 07:38 PM

I have fixed a number of bugs in flash.php and uploaded it as flash2.phpΔ - the old version broke attachments in a subtle way (which appeared after the flash video on a given page) - Ed Wildgoose (contact me via

The server's settings may be set to disallow the overwriting of uploaded files. See UploadsAdmin for info.

flash.php External Data Issue

  • just having a small problem with this. my flash file loads some external movie clips and this is not happening on my wiki pages. the flash file runs fine when embeded in a normal html page. would like to fix this if i knew how.
  • I'm experiencing some difficulty with flash.php and external data as well. From what I can tell, it's a relative path issue. It seems that relative paths inside flash movies do not resolve correctly within the pmWiki file structure. I'll test for absolute paths later. Is this a known issue? Does pmWiki have problems parsing other relative paths?
  • just something it took me a day to realize: it appears that when embedding a flash video that is uploaded to a different group within the same Site than the page you're putting it on (say it's uploaded to MainGroup, but you're now trying to embed it onto a page in ThisOtherGroup), one must treat it like an external URL, and provide an absolute link:
for instance, this doesn't work (presuming flashfile is uploaded to a different group on the same site)
(:flash Attach:MainGroup/flashfile.swf width=150 height=100:)
but this DOES work with the absolute address:
(:flash width=150 height=100:)
overtones99 April 21, 2008, at 08:17 PM
Couldn't get this to work. Then again, my video is .flv, not .swf. This only works with .swf? I wonder if I can convert the .flv or .mpg to .swf...probably with ffmpeg? tonybaldwin February 21, 2011, at 10:14 AM
Note, there doesnt seem to be a way of handling parameters to flash. E.g. This is what we need:
<object type="application/x-shockwave-flash" data="" 
width="139" height="202"> <param name="movie" value=""> 
<param name="wmode" value="transparent"> <param name="quality" value="best"> <param name="flashvars" 
bgcolor=%23DFE5F4&amp;rows=4&amp;cols=3&amp;el_size=45"> </object>

Any ideas? SimonH

PL 8 October 2009
Flash videos produced at include video and audio controls in the exported swf. No extra files to deal with as are produced for example by Camtasia. Registration is free.
hi simon. see the audioo recipe below - it's a standalone recipe that permits parameters to be passed along to Flash. perhaps it can be used as a template for developing a plugin for the player. overtones99 October 20, 2009, at 08:21 PM

The flash.php and flash2.php are using the deprecated /e modifier for preg_replace(). A possible solution is to change the following line:
Markup('flash', '<img', "/\\(:flash (.*?:)(.*?)(\\s.*?)?\\s*?:\\)/e", "ShowFlash('$1','$2','$3')");
Markup_e('flash', '<img', "/\\(:flash (.*?:)(.*?)(\\s.*?)?\\s*?:\\)/", "ShowFlash(\$m[1],\$m[2],\$m[3])");

rigo 1 April 2017

Updates for flash.php

  • 2006-07-23: Added missing type declaration. Updated to newer version.
  • 2006-09-19: Fixed some confusion of " and ' to quote strings in the "<object>...</object>" code. Now Firefox even display the flash again.

YouTube, Vimeo, and GoogleVideo and Flickr Video (Flickr has moved into a separate recipe - see below)

swf-sites.phpΔ enables embedding YouTube, Vimeo, and Google Video videoplayers into wiki pages.


Question - Is there any way to set the start time of a google video? I think you are supposed to be able to do that but I could not get it to work. Perhaps it has to be done on the flash instead of the google video? Example, suppose I want the video to start and 35 seconds from the start, how would I do that? 11/4/10

Answer - Hi - currently, with this recipe, there is not a way to do this – but there will be soon – I just found some pages online that explain how to do this and I will update the recipe accordingly hopefully as soon as I can get to it. Stay tuned. overtones99 November 04, 2010, at 02:29 PM

Hi again - i cleaned up the code and with the new recipe you can now for sure use 'initialTime=XXX' in the GoogleVideo markup to set a start time for a video. the time is measured in seconds... overtones99 November 05, 2010, at 04:46 AM
Ha! THIS ONE works! I have it working here. THANKS! tonybaldwin February 21, 2011, at 10:14 AM

Discussion for swf-sites.php

Hi. Im using the swf-sites recipe. (:youtube tgbNymZ7vqY:) works fine. (:youtube tgbNymZ7vqY width=425 height=344:) - which is listed as possible code above - doesn't work at all. No video is shown. Also "scale" as "default variable" doesn't have any effect on the video's dimension. And YES I added it before the "include"-line. What am I doing wrong? me - Feb 15 2010

hi. sorry you're having trouble with the recipe. the examples you've provided above work fine on my site - - i'm running pmwiki 2.2.6, and 2009-10-25 version of the swf-sites recipe. i'll try updating my pmwiki to the latest version in the next day or two to see if any problem arises, though i don't think that will change anything. in the meantime, can you tell me what you included in your config? what exactly did you add above the "include"-line? my setup looks like this and works fine:

$YouTubeDefaultParams['rel'] = '0';

overtones99 February 16, 2010, at 02:56 AM

Hi. My config.php

$YouTubeDefaultParams['scale'] = '1.3';
$YouTubeROEenabled = 'false';

Other recipes like svg, flashmediaplayer works quite fine. 'm running 2.2.11. At the moment only your to lines are added for including swf-sites.php. me - Feb 16 2010

hi. it looks like it might be a php-version issue. i followed the link you left on my page and i get the error message: "Fatal error: Call to undefined function: array_diff_key() in /homepages/45/d67474843/htdocs/test/cookbook/swf-sites.php on line 443" - which tells me that your server is probably running a version of php less than 5.1.0 (see can you confirm this by checking your phpinfo page? if indeed this is the case, then i'll try as soon as possible (sometime soon, but unfortunately probably not today or this week) to figure out a workaround.
also - was this error msg showing up all along, or is it new for this go-round? you didn't mention any error msg in your first post - it just sounded like the video just wasn't showing up on the page. is the error new?
overtones99 February 16, 2010, at 08:46 AM

Hi. First I saw, that you're running another recipe-version then me. No idea where I downloaded an older one. After uploading the actual one - i got the error-message. So I checked the php-version. It was 4.4.9. In contrast my provider claims he offers php5... [sic] I checked the help-pages and read that I have to activate php 5 on my own - by default php4 is used... now it works - so you don't need to make a workaround. Sorry for the first "error" (shame on me) - the second error I could fix on my own. me - Feb 16 2010

glad to hear it works now! overtones99 February 17, 2010, at 04:03 AM

Discussion for other flash media sites

Is there an update now that GodTube has become Tangle? Thanks - Think1

I would really appreciate it if someone could write up a cookbook for embedding mp3 audio files: see
Added January 2009. or even for embedding mp4 video files. Thanks again. LFS


The following code works,
but I don't know if it is secure.
I placed it at the end of swf-sites.php
liveleak.txtΔ nikos 2010-04-02

The code for posting would be...

(:liveleak video_id:)

For example, for...


      (:liveleak 807_1205822827:)

end the result will be like this...ΚιθάραΜεΤοΚουτάλι

nikos 2010-04-02

Plenty of uselles code,
but it works!.
Place the code of fileqip.txt at the end of swf-sites.php

The code for posting would be...

(:fileqip video_id:)

For example, for...


      (:fileqip 125176227/1a44fc37:)

nikos 2010-04-08

Talk page for the Flash recipe (users).

Edit - History - Print - Recent Changes - Search
Page last modified on April 03, 2017, at 02:27 AM