ZenphotoCMS Forum
Starting a iPhone Theme - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Themes (https://forum.zenphoto.org/forum-5.html)
+--- Thread: Starting a iPhone Theme (/thread-4095.html)

Pages: 1 2 3 4 5


Starting a iPhone Theme - acrylian - 2010-03-18

I know that it's not an original theme from you..;-) I don't remember under what licence this was released but I would guess modifications would be fine.

However, a good idea would be to contact its original author first, since it is not that old and may simply fit his needs so he did not see any need to update it.




Starting a iPhone Theme - soumenb - 2010-05-01

I have posted the updated theme in my website. Here's the link to the post: http://ubercyber.net/2010/04/zenphoto-and-iphone-theme/
Since this theme is specifically for iPhone, some hacks are required so that a proper theme is displayed depending on where the gallery is opened from. The details are in the post, but please note that for full functionality some modifications are required to ZenPhoto core functionality.
Acrylian has posted a link to my site in the iPhone theme page. A big "thank you" for acrylian. :)




Starting a iPhone Theme - sbillard - 2010-05-01

There should not need to be any hacks once you move to the 1.3 development base. There are filters that will allow you to "alter" the theme loading.




Starting a iPhone Theme - sbillard - 2010-05-01

There should not need to be any hacks once you move to the 1.3 development base. There are filters that will allow you to "alter" the theme loading.




Starting a iPhone Theme - soumenb - 2010-05-02

I installed the latest nightly build from 4-30 trunk, and in setup.php got an warning:
"Perhaps there was a problem with the upload. You should check the following files:"
And it seemed it listed ALL files under themes (which, of course, I did not update during the installation). I ignored it and went ahead, and now my gallery homepage shows:
"Fatal error: Only variables can be passed by reference in ...themes/stopdesign/index.php on line 82"
Should I revert back to the last stable build?




Starting a iPhone Theme - acrylian - 2010-05-02

I would actually suggest to try a reinstall. Sometimes ftp clients mess up files while uploading.




Starting a iPhone Theme - sbillard - 2010-05-02

Definately reload. That line does not seem correct for the current nightly build. There are no function calls on it.




Starting a iPhone Theme - soumenb - 2010-05-02

It worked on a full reload. Thanks guys!
A question for sbillard: could you elaborate a bit more/point me to the documentation regarding the "filters that will allow ... to "alter" the theme loading." you had mentioned?
Not sure if I should continue this discussion on this thread. If required, I will start a new thread for further discussions.




Starting a iPhone Theme - sbillard - 2010-05-03

The filters are fully defined in the article http://www.zenphoto.org/2010/04/zenphoto-plugin-architecture/.

The most likely filter for you to use would be "load_theme_script" which would let you change the file that gets loaded.




Starting a iPhone Theme - omatzyo - 2010-06-04

Hi all! Soumen, thanks for keeping the iphone project going! I did reply to your inquiry a while back. Please let me know if you have any other additions for the theme.
(http://groups.google.com/group/zenphoto-iphone/browse_thread/thread/213a7438f45ebb20/c451916fe06f6316?lnk=gst&q=Bhattacharya#c451916fe06f6316)

I have previously completed some other major changes to the theme. I just uploading it to the google code site.I included your updates and a login update from PigsLipstick a while back which allows for login. This brings the iphone theme to version 1.3.1!

Acrylian, would you please include the original link to the google-code site in the listing?

http://code.google.com/p/zenphotoiphone/




Starting a iPhone Theme - acrylian - 2010-06-05

I will update the entry. Best probably you two try to join forces I guess.




Starting a iPhone Theme - gdodinet - 2010-11-01

Hi Omatzyo,

A few days ago i installed the zenphotoiphone theme. Just wanted to give you a very positive feedback. It works like a charm. However you may want to update the install instructions to make it work for more mobile devices than just the iphone. I used the script provided by http://detectmobilebrowsers.mobi/ (free for personal use) and i can browse the site with an android device. Thanks again.




Starting a iPhone Theme - acrylian - 2010-11-01

That detection script is sadly not licence compatible with Zenphoto themes which as derivative works from Zenphoto (code wise) are GPL v2 as well.




Starting a iPhone Theme - gdodinet - 2010-11-01

I understand this script can't be shipped with neither zenphoto nor zenphotoiphone. However i was only suggesting to omatzyo to update the install instructions to include a reference to this script -- or any other script by the way (i didn't search very long as this one popped up immediately). While there is a large base of iphone users, there is also a lot of other mobile os users. Just my 2 cents..




Starting a iPhone Theme - acrylian - 2010-11-02

Sure, I understand what you mean. Just wanted to mention it since even for example a photographer's portfolio website might be basically considered a "commercial" use.




Starting a iPhone Theme - gdodinet - 2010-11-02

Indeed. Actually i just realized that modifying zp functions.php core file might not needed. Shouldn't we use a setupTheme filter instead?

That filter could be provided with zenphotoiphone. If the script detection is found then we use it, otherwise we use the simple iphone detection switch. I guess this would simplify the theme installation.

That way it would be up to the user to download the detection script and abide to the license agreement. I'm gonna try that tonight and will come back to you (whether i succeed or not).




Starting a iPhone Theme - acrylian - 2010-11-02

There is a filter load_theme_script already that probably could be used for this. Zenphoto 1.3.2 (scheduled for January now) will also include a theme_head filter to load other css for example. See the user guide plugin documentation for the complete filter list




Starting a iPhone Theme - gdodinet - 2010-11-03

I didn't find the load_theme_filter, but i came up with a somehow functional POC that involves at least two filters (a controller and a list of voters). The latter decide if the client is a mobile device.

I registered a listener on 'setupTheme'. In the "setupTheme" event handler (the "controller"), the 'mobile_detector' event is fired. It is handled by the "voters". If there is at least one filter that votes for a mobile device, the mobile theme is applied.

The said mobile theme is defined by the user through an option exposed by the "controller".

I paste the controller and a voter example below. Please feel free to move the code elsewhere if you find it more appropriate.

The "controller" :

`

`




Starting a iPhone Theme - acrylian - 2010-11-03

Best would be to make this a plugin and provide it as download (don't forget to label it PHP 5+ only).




Starting a iPhone Theme - gdodinet - 2010-11-04

It is done. The plugin can be downloaded here: http://gilles.dodinet.fr/news/mobile-theme-filter

I've also changed the code slightly and fixed a few bugs. The article linked above also includes some minimal doc.

Regards