Okay. Once upon a time there was a content management system that needed to render markup. So this Content Managment System returned strings of HTML. Well that really wasn't that great because there were these people out in the world called Front End Developers and it just so happens that Front End Developers actually care about what the HTML looks like. Oh, by the way, this Content Management System is named Drupal.
Read more: http://2013.drupalcampcolorado.org/sessions/rewriting-drupal-theme-layer
15. <?
global $user;
if (isset($user)) $cookie = explode(":", base64_decode($user));
if (isset($cookie[9])) include "themes/$cookie[9]/theme.class";
else include "themes/default/theme.class";
$theme = new Theme();
?>
51. [drupal-devel] phptemplate in core?
Dries Buytaert dries at buytaert.net
Sun May 1 15:49:22 UTC 2005
Previous message: [drupal-devel] Talk with Rasmus
Next message: [drupal-devel] phptemplate in core?
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Adrian et al,
here is what I'd like to see happen: get PHPTemplate in core. We'd
need to:
1. remove Xtemplate from core.
2. remove the Bluemarine theme from core (Xtemplate based).
3. remove the Pushbutton theme from core (Xtemplate based).
4. add PHPTemplate to core.
5. add a PHPTemplate-based theme to core.
...
52. [drupal-devel] phptemplate in core?
Adrian Rossouw adrian at bryght.com
Sun May 1 18:15:12 UTC 2005
Previous message: [drupal-devel] phptemplate in core?
Next message: [drupal-devel] phptemplate in core?
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 01 May 2005, at 5:49 PM, Dries Buytaert wrote:
> - What needs to be done to get PHPTemplate in core? From what I can
> tell, PHPTemplate's engine-specific settings (eg. the primary and
> secondary links) need some work.
My plan was to get this done this weekend, but unfortunately I didn't
have the time for it this week.
...
53. commit e274f97c879bff059511472a4d14a3584941393e
Author: Dries Buytaert <dries@buytaert.net>
Date: Wed May 4 18:12:18 2005 +0000
- Removed the Xtemplate engine and added the
PHPTemplate engine.
- Converted the Bluemarine theme from XTemplate to
PHPTemplate.
- Moved the the Pushbutton theme and the Xtemplate
engine to the contributions repository.
68. <?php
/**
* ...
* ENGINE_engine_variables(&$variables)
* This function should only be implemented by theme engines and is exists
* so that the theme engine can set necessary variables. It is commonly
* used to set global variables such as $directory and $is_front_page.
* ENGINE_engine_variables_HOOK(&$variables)
* This is the same as the previous function, but is called only per hook.
* ENGINE_variables_HOOK(&$variables)
* ENGINE_variables(&$variables)
* This is meant to be used by themes that utilize a theme engine; as it is
* good practice for these themes to use the theme engine's name for
* their functions so that they may share code. In PHPTemplate, these
* functions will appear in template.php
* THEME_variables_HOOK(&$variables)
* THEME_variables(&$variables)
* These functions are based upon the raw theme; they should primarily be
* used by themes that do not use an engine or by themes that need small
* changes to what has already been established in the theme engine version
* of the function.
*
* There are two special variables that these hooks can set:
* 'template_file' and 'template_files'. These will be merged together
* to form a list of 'suggested' alternate template files to use, in
* reverse order of priority. template_file will always be a higher
* priority than items in template_files. theme() will then look for these
* files, one at a time, and use the first one
* that exists.
* ...
*/
function theme() {
69. <?php
/**
* ...
* ENGINE_engine_preprocess(&$variables)
* This function should only be implemented by theme engines and is exists
* so that the theme engine can set necessary variables. It is commonly
* used to set global variables such as $directory and $is_front_page.
* ENGINE_engine_preprocess_HOOK(&$variables)
* This is the same as the previous function, but is called only per hook.
* ENGINE_preprocess_HOOK(&$variables)
* ENGINE_preprocess(&$variables)
* This is meant to be used by themes that utilize a theme engine; as it is
* good practice for these themes to use the theme engine's name for
* their functions so that they may share code. In PHPTemplate, these
* functions will appear in template.php
* THEME_preprocess_HOOK(&$variables)
* THEME_preprocess(&$variables)
* These functions are based upon the raw theme; they should primarily be
* used by themes that do not use an engine or by themes that need small
* changes to what has already been established in the theme engine version
* of the function.
* template_preprocess(&$variables)
* This function will only be called for theme functions registered by
* the named module. In general it is preferred to use the following
* function if possible, but it may not always be the case.
* template_preprocess_HOOK(&$variables)
* This is the same as the previous function, but is called only per hook.
*
* ...
*/
function theme() {