I'm sure that Steven will correct me if I'm wrong, but I
wanted to document my long slog through the Universal
Playback embeds (hoping that somebody will be helped in the
I think I've modified my code now so that it works the way
I want it to. E.g., see:
The description below may help explain some of my missteps
(and attempts to make things simpler) earlier on a different
http://www.simpleviewer.net/forum/viewt … p?id=14980
Also, I had many galleries working with the Universal embed
on another site by putting them in separate directories,
e.g. see http://weiderman.com/albums/Pond/ but not
reflecting the template of the original site.
The first thing I learned is never to mess with svcore
(unless you really know what you are doing). You may be
able to do more, but it really is not for the faint of
The Wickford YC index.php has remained the same, but
web/index.php has been updated. The way the older version
worked (with swfobject.embedSWF() rather than
load.simpleviewier()) was that all the galleries are in one
directory and it uses the fifth parameter (also the GET
parameter to the php code) to specify the gallery (the flikr
set number). Alas, it was Flash so mobile users could not
see my galleries. But you cannot use Universal Playback
with all the Mobile galleries in the same directory.
With the Universal embed all the galleries have to be in
separate directories (as it suggests in the documentation).
This is because, with the fifth parameter "true" you say you
want Flash if it is available. If it is false, you cannot
have these galleries in separate directories (flashvars
parameter) or rename them (from gallery.xml). So I cannot
have my cake (all the galleries in the same directory) and
eat it too (have the simpleviewer code reflect the template
of the website on small screens). Well maybe I could, but
that would mean more changes to web/index.php that I would
have to repeat for each directory.
So here's what I did. First I check whether the device is
iPhone, iPad, iPod, or Android using the USER_AGENT
parameter. My solution only is one way to check for mobile
devices and thus far it only checks for the devices that are
mentioned in the Universal Playback documentation.
(Presumably other mobile devices can handle the Flash.) If
it is one of four types of devices, I go to a separate
directory containing that gallery (and losing the template
of the Wickford site). If not, then I access the gallery
locally, as I did before (e.g no changes to the embed code
other than upgrading the calls to load.sumpleviewer(). My
admin code has to create a new directory and a new gallery
and the new Universal embed code, as well as the same
gallery in the same directory as before. So the admin code
does the heavy lifting and I have duplicate galleries and
duplicate embed code. Is there a better way?
Happy to (try) to answer questions.