Commit Graph

10 Commits

Author SHA1 Message Date
Bharat Mediratta
f3ba69c1d6 Make sure that helper functions are all static. Add new
File_Structure_Test to make sure we don't regress.

According to the PHP docs, the "public" keyword is implied on static
functions, so remove it.  Also, require private static functions to
start with an _.

http://php.net/manual/en/language.oop5.visibility.php
2009-01-14 04:12:02 +00:00
Bharat Mediratta
ae73ef3d57 Updated for new Form_Submit API.
OLD:
  $form->submit("Foo")  -->  <input type="submit" value="Foo">

New:
  $form->submit("foo_button")->("Foo") --> <input type="submit" name="foo_button" value="Foo">

Mostly we don't care what the button is so we leave the name blank.
2009-01-12 07:50:04 +00:00
Felix Rabinovich
5ee03eb9c8 Save individual theme values 2009-01-10 22:36:06 +00:00
Felix Rabinovich
705c55fb79 Submit theme values 2009-01-10 22:04:49 +00:00
Felix Rabinovich
72e9d20f3c Display theme details 2009-01-10 19:41:43 +00:00
Felix Rabinovich
48e73e9081 Theme Administration cleanup initialization 2009-01-09 23:54:40 +00:00
Felix Rabinovich
b647aa0f74 Theme Administration v. 2. Doesn't distinguish between regular and admin themes yet 2009-01-09 23:31:46 +00:00
Bharat Mediratta
630b0f26fc Restructure the theme code to be more like WordPress / Habari. Now,
the controller initiates a request to a top level page (eg:
album.html.php) which is then free to include whatever other page
chunks it wants with calls like <?= $theme->display('header.html') ?>

Variables like $item and $children are in the global space for all
views.

theme.php helper is now Theme.php library which lets us store the name
of the theme inside the variable itself.  This means that the theme
does not have to know its own name because you can use $theme->url()
for all urls to stuff inside the theme itself, which makes it possible
to cline a theme without changing a single line.

Still using the mock album UI.
2008-11-04 05:02:37 +00:00
Bharat Mediratta
8a4ab78bfb Oops, injecting the function name caused an extra call in the call
stack.  The test passed, but the actual code failed.  Fixed now.
2008-11-03 06:02:40 +00:00
Bharat Mediratta
6da6b8ed52 Theme helper. Right now it has one api method, theme::url which
returns a url local to the theme that you're in.  For example, if
you're in themes/foo/views/page_header.html.php and you call
theme::url("images/foo.png") then it'll create a url to:
themes/foo/images/foo.png
2008-11-03 05:52:13 +00:00