|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
State of Gallery 387 days left, and here's where thing stand now. We've now got a primitive gallery that lets us view albums and photos, using the new UI mockups. I've put in place a fairly simple theming system based on what I've seen from Habari/WordPress. Each block in the sidebar now comes from its own module. Tim has created a user module which you can install/uninstall via the scaffolding, but currently it doesn't do more than just create the tables for you. We have 23 unit tests covering our framework code. None of our controllers are currently tested. Things you can do with the latest code: * Walk through a basic install process * Create lots of random photos/albums * View an album * View a photo The theming system works like this. When you're viewing an album, we load up some basic data, and then look for a file called album.html.php. That file is provided by the theme, and is in charge of displaying the page. We provide a theme library with the following methods in it: url($path) Returns the url to a path inside the current theme. themes that use this won't have references to their own theme name in their files, which means you can just copy a theme dir to clone it example: <link ... href="<?= $theme->url("css/styles.css") ?>" /> item() Returns the current item we're viewing (album or photo). Example: Album name: <?= $theme->item()->title ?> display($file) Load up another file and display it. Example: $theme->display("header.html") This will find the first file on the load path called header.html.php. The current theme's files will be used first, then the backup theme, then any modules. blocks() Return an array of HTML blocks. Currently used in sidebar.html.php like this: <? foreach ($theme->blocks() as $block): ?> <?= $block ?> <? endforeach ?> modules can register blocks and the theme will just run them in the right order. Right now the block selection and order is hardcoded, and the block modules themselves are showing only mock data. Take a look at the current theme files here: http://gallery.svn.sourceforge.net/viewvc/gallery/gallery3/trunk/themes/default/views/ A simple module that provides a block is here: http://gallery.svn.sourceforge.net/viewvc/gallery/gallery3/trunk/modules/carousel/helpers A slightly more complex one is here: http://gallery.svn.sourceforge.net/viewvc/gallery/gallery3/trunk/modules/gmaps/helpers/ note that its HTML comes from here: http://gallery.svn.sourceforge.net/viewvc/gallery/gallery3/trunk/modules/gmaps/views/ Lots left to do. All feedback welcome! -Bharat ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ __[ g a l l e r y - d e v e l ]_________________________ [ list info/archive --> http://gallery.sf.net/lists.php ] [ gallery info/FAQ/download --> http://gallery.sf.net ] |
| Free embeddable forum powered by Nabble | Forum Help |