Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites
View Statistics - Next Notice - Previous NoticeDirectory filter : [ all ] / postnuke_official / html / includes [ view in CVS ]
| Date | Directory [filter] | File(s) [view] | Author [filter] |
| 03 Aug 2002 02:59:09 | postnuke_official/html/includes | pnTemplate.php,1.40,1.41 | Paul Rosania |
| moved tag registration to *_init() | |||
Update of /home/cvsroot/postnuke_official/html/includes
In directory ns7.hostnuke.net:/tmp/cvs-serv31832
Modified Files:
pnTemplate.php
Log Message:
moved tag registration to *_init()
Index: pnTemplate.php
===================================================================
RCS file: /home/cvsroot/postnuke_official/html/includes/pnTemplate.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** pnTemplate.php 29 Jul 2002 17:08:27 -0000 1.40
--- pnTemplate.php 3 Aug 2002 02:59:06 -0000 1.41
***************
*** 265,273 ****
if (isset($args[$attr_name])) {
// check that type matches
- // FIXME: order needs to be: string, bool, int, float
$attr_types = $attr->getAllowedTypes();
if ($attr_types & PN_TPL_STRING) {
continue;
} elseif (($attr_types & PN_TPL_INTEGER)
&& eregi('^\-?[0-9]+$', $args[$attr_name])) {
--- 265,275 ----
if (isset($args[$attr_name])) {
// check that type matches
$attr_types = $attr->getAllowedTypes();
if ($attr_types & PN_TPL_STRING) {
continue;
+ } elseif (($attr_types & PN_TPL_BOOLEAN)
+ && eregi ('^(true|false|1|0)$', $args[$attr_name])) {
+ continue;
} elseif (($attr_types & PN_TPL_INTEGER)
&& eregi('^\-?[0-9]+$', $args[$attr_name])) {
***************
*** 276,282 ****
&& eregi('^\-?[0-9]*.[0-9]+$', $args[$attr_name])) {
continue;
- } elseif (($attr_types & PN_TPL_BOOLEAN)
- && eregi ('^(true|false|1|0)$', $args[$attr_name])) {
- continue;
}
--- 278,281 ----
***************
*** 335,397 ****
}
- // Examples of tag registration
-
- /*
- pnTplRegisterTag('base', 'var',
- array(new pnTemplateAttribute('name', PN_TPL_STRING|PN_TPL_REQUIRED),
- new pnTemplateAttribute('scope', PN_TPL_STRING|PN_TPL_OPTIONAL)),
- 'base_userapi_handleVarTag');
-
- pnTplRegisterTag('base', 'block',
- array(new pnTemplateAttribute('name', PN_TPL_STRING|PN_TPL_REQUIRED),
- new pnTemplateAttribute('module', PN_TPL_STRING|PN_TPL_REQUIRED),
- new pnTemplateAttribute('title', PN_TPL_STRING|PN_TPL_OPTIONAL),
- new pnTemplateAttribute('template', PN_TPL_STRING|PN_TPL_OPTIONAL),
- new pnTemplateAttribute('type', PN_TPL_STRING|PN_TPL_OPTIONAL)),
- 'base_userapi_handleBlockTag');
-
- pnTplRegisterTag('base', 'blockgroup',
- array(new pnTemplateAttribute('name', PN_TPL_STRING|PN_TPL_REQUIRED),
- new pnTemplateAttribute('template', PN_TPL_STRING|PN_TPL_OPTIONAL)),
- 'base_userapi_handleBlockgroupTag');
-
- pnTplRegisterTag('base', 'module',
- array(new pnTemplateAttribute('name', PN_TPL_STRING|PN_TPL_OPTIONAL),
- new pnTemplateAttribute('main', PN_TPL_BOOLEAN|PN_TPL_OPTIONAL)),
- 'base_userapi_handleModuleTag');
-
- pnTplRegisterTag('base', 'if',
- array(new pnTemplateAttribute('condition', PN_TPL_STRING|PN_TPL_REQUIRED)),
- 'base_userapi_handleIfTag');
-
- pnTplRegisterTag('base', 'elseif',
- array(new pnTemplateAttribute('condition', PN_TPL_STRING|PN_TPL_REQUIRED)),
- 'base_userapi_handleElseifTag');
-
- pnTplRegisterTag('base', 'else', array(), 'base_userapi_handleElseTag');
-
- pnTplRegisterTag('base', 'loop',
- array(new pnTemplateAttribute('name', PN_TPL_STRING|PN_TPL_REQUIRED),
- new pnTemplateAttribute('key', PN_TPL_STRING|PN_TPL_OPTIONAL)),
- 'base_userapi_handleLoopTag');
-
- pnTplRegisterTag('base', 'set',
- array(new pnTemplateAttribute('name', PN_TPL_STRING|PN_TPL_REQUIRED),
- new pnTemplateAttribute('scope', PN_TPL_STRING|PN_TPL_OPTIONAL)),
- 'base_userapi_handleSetTag');
-
- pnTplRegisterTag('base', 'baseurl',
- array(),
- 'base_userapi_handleBaseurlTag');
-
- pnTplRegisterTag('base', 'mlstring',
- array(new pnTemplateAttribute('name', PN_TPL_STRING|PN_TPL_OPTIONAL)),
- 'base_userapi_handleMlstringTag');
- pnTplRegisterTag('blocks', 'blocks-stateicon',
- array(new pnTemplateAttribute('bid', PN_TPL_STRING|PN_TPL_REQUIRED)),
- 'blocks_userapi_handleStateIconTag');
- */
-
-
/**
* print a page template to the screen, compile if necessary
--- 334,337 ----
***************
*** 598,604 ****
if (!pnTplCheckTagAttributes($tag_name, $args)) {
! // tag is invalid - pass exception down (add line/page?)
!
! return;
}
--- 538,544 ----
if (!pnTplCheckTagAttributes($tag_name, $args)) {
! // tag is invalid - pass exception down (add line/page?)
!
! return;
}
View Statistics - Next Notice - Previous Notice
| Visit Developer Site - Browse CVS Repository |
Syndicate via backend.rss (max. once per hour please) | Powered by CVSNotice 0.1.3 |