I pasted this in the IRC channel yesterday but thought I might as well send it to the list as well.
This is an example theme I've come up with that tries to implement as many of the features of PHPTemplate as possible, and respect as many of the settings as possible.
It's XHTML 1 and pure CSS.. and hopefully structured in a useful way. I think it's a lot cleaner in structure than bluemarine and might be a better starting point for new themers? (eg: All blocks, boxes, nodes, comments have the same basic structure with a main title div and content div).
Example theme: http://stasis.org/~rowan/projects/drupal-example-theme/4.6/
Discuss.. :)
-Rowan
Thanks for sharing this. Looking at the page template, I have a thought: Since it's pure css, what if you place the main content first, and then the header and sidebars?
Some conditionals to handle the css parameters for different sidebar activations also might be worth embedding.
I don't know what else to say. It's a css theme and the css is empty. ;)
pingVision http://www.pingv.com | interactive media design *Laura Scott*, President laura@pingv.com • 303.459.4859
Rowan Kerr wrote:
I pasted this in the IRC channel yesterday but thought I might as well send it to the list as well.
This is an example theme I've come up with that tries to implement as many of the features of PHPTemplate as possible, and respect as many of the settings as possible.
It's XHTML 1 and pure CSS.. and hopefully structured in a useful way. I think it's a lot cleaner in structure than bluemarine and might be a better starting point for new themers? (eg: All blocks, boxes, nodes, comments have the same basic structure with a main title div and content div).
Example theme: http://stasis.org/~rowan/projects/drupal-example-theme/4.6/
Discuss.. :)
-Rowan _______________________________________________ themes mailing list themes@drupal.org http://lists.drupal.org/mailman/listinfo/themes
On 04/12/05, Laura Scott laura@pingv.com wrote:
I don't know what else to say. It's a css theme and the css is empty. ;)
That was my first impression too. If you have any other comments on what should be in a basic theme, I'm trying to put together some thoughts on it for one that I use: http://brandedthoughts.co.uk/node/114
-- David Carrington
The CSS is empty mainly because I had done this theme as a test to simplify and expose Drupal/PHPTemplate's main features for designers at work who weren't super-experienced at digging through CSS. (As DC quoted on his page)
Placing both sidebar markup sections below the main content is a definite possibility. One other thing that's come to mind as missing is more accessibility features like anchors, access keys, etc.
And I forgot to wrap the post information and terms in conditionals in case they aren't being displayed to avoid printing out empty divs. Actually, on my wishlist for phptemplate is finer-grained control of date/time/author variables for a node (instead of just $submitted).
-Rowan
On 05/12/05, Rowan Kerr rowan0@gmail.com wrote:
Actually, on my wishlist for phptemplate is finer-grained control of date/time/author variables for a node (instead of just $submitted).
You have access to $node, so you can make it anything you like:
<?php t('Scribbled quickly by %a on %b.', array('%a' => theme('username', $node), '%b' => format_date($node->created))); ?>
-- David Carrington
Is there a documentation page somewhere that lists/describes all the methods of $node that can be accessed in a template?
David Carrington wrote:
On 05/12/05, Rowan Kerr rowan0@gmail.com wrote:
Actually, on my wishlist for phptemplate is finer-grained control of date/time/author variables for a node (instead of just $submitted).
You have access to $node, so you can make it anything you like:
<?php t('Scribbled quickly by %a on %b.', array('%a' => theme('username', $node), '%b' => format_date($node->created))); ?>
-- David Carrington _______________________________________________ themes mailing list themes@drupal.org http://lists.drupal.org/mailman/listinfo/themes
On 12/5/05, Tao Starbow starbow@citris-uc.org wrote:
Is there a documentation page somewhere that lists/describes all the methods of $node that can be accessed in a template?
http://drupal.org/phptemplate and http://drupal.org/node/11816
Basically, the entire node object is available from a node's phptemplate file, but I'm not sure how many of drupal's functions are.
On Mon, 2005-12-05 at 16:03 -0500, Rowan Kerr wrote:
On 12/5/05, Tao Starbow starbow@citris-uc.org wrote:
Is there a documentation page somewhere that lists/describes all the methods of $node that can be accessed in a template?
http://drupal.org/phptemplate and http://drupal.org/node/11816
Basically, the entire node object is available from a node's phptemplate file, but I'm not sure how many of drupal's functions are.
Most everything is there.. Objects in drupal pretty much only use properties, so you won't be finding any node methods....
You can try a '<pre>' . print_r($node, true). '</pre>' to see what all is in the node.
If you want to see all the function availble from within php template you can try some of php's introspection functions. ....
<ul> <?php $functions = get_defined_functions(); foreach($functions['user'] as $function) { ?> <li>$function</li> <?php } ?> </ul>
...
you can also use get_defined_vars and get_defined_constants, etc...
themes mailing list themes@drupal.org http://lists.drupal.org/mailman/listinfo/themes
Darrel O'Pry wrote:
On Mon, 2005-12-05 at 16:03 -0500, Rowan Kerr wrote:
On 12/5/05, Tao Starbow starbow@citris-uc.org wrote:
Is there a documentation page somewhere that lists/describes all the methods of $node that can be accessed in a template?
http://drupal.org/phptemplate and http://drupal.org/node/11816
Basically, the entire node object is available from a node's phptemplate file, but I'm not sure how many of drupal's functions are.
Most everything is there.. Objects in drupal pretty much only use properties, so you won't be finding any node methods....
You can try a '<pre>' . print_r($node, true). '</pre>' to see what all is in the node.
If you want to see all the function availble from within php template you can try some of php's introspection functions. ....
<ul> <?php $functions = get_defined_functions(); foreach($functions['user'] as $function) { ?> <li>$function</li> <?php } ?> </ul>
...
you can also use get_defined_vars and get_defined_constants, etc...
Thanks, that a great way to find the stuff left off the documentation at node/11816. I had to fiddle just a bit with your examples to get them to work from inside a sample node.tpl.php file
<!-- All node properties --> <pre> <?php print_r($node, false) ?> </pre>
<!-- The Drupal API as seen from the template --> <ul> <?php $functions = get_defined_functions(); foreach($functions['user'] as $function) { ?> <li><?php print $function ?></li> <?php } ?> </ul>
On Mon, 2005-12-05 at 15:29 -0800, Tao Starbow wrote:
Darrel O'Pry wrote:
On Mon, 2005-12-05 at 16:03 -0500, Rowan Kerr wrote:
On 12/5/05, Tao Starbow starbow@citris-uc.org wrote:
Is there a documentation page somewhere that lists/describes all the methods of $node that can be accessed in a template?
http://drupal.org/phptemplate and http://drupal.org/node/11816
Basically, the entire node object is available from a node's phptemplate file, but I'm not sure how many of drupal's functions are.
Most everything is there.. Objects in drupal pretty much only use properties, so you won't be finding any node methods....
You can try a '<pre>' . print_r($node, true). '</pre>' to see what all is in the node.
If you want to see all the function availble from within php template you can try some of php's introspection functions. ....
<ul> <?php $functions = get_defined_functions(); foreach($functions['user'] as $function) { ?> <li>$function</li> <?php } ?> </ul>
...
you can also use get_defined_vars and get_defined_constants, etc...
Thanks, that a great way to find the stuff left off the documentation at node/11816. I had to fiddle just a bit with your examples to get them to work from inside a sample node.tpl.php file
<!-- All node properties -->
<pre> <?php print_r($node, false) ?> </pre>
<!-- The Drupal API as seen from the template -->
<ul> <?php $functions = get_defined_functions(); foreach($functions['user'] as $function) { ?> <li><?php print $function ?></li> <?php } ?> </ul>
Should of mentioned I just typed that up on the top of my head... I found its useful code to know for working on any foreign project or templating system...
one caveat with that though, you don't get full function definitions and it might not be wise to grab any function and use it unless you verify with a developer you are using it in an appropriate way. Not all functions are atomic :)...
Why not contribute it as a theme to drupal.org?
Op zaterdag 03 december 2005 20:55, schreef Rowan Kerr:
I pasted this in the IRC channel yesterday but thought I might as well send it to the list as well.
This is an example theme I've come up with that tries to implement as many of the features of PHPTemplate as possible, and respect as many of the settings as possible.
It's XHTML 1 and pure CSS.. and hopefully structured in a useful way. I think it's a lot cleaner in structure than bluemarine and might be a better starting point for new themers? (eg: All blocks, boxes, nodes, comments have the same basic structure with a main title div and content div).
Example theme: http://stasis.org/~rowan/projects/drupal-example-theme/4.6/
Discuss.. :)
-Rowan _______________________________________________ themes mailing list themes@drupal.org http://lists.drupal.org/mailman/listinfo/themes