| version 1.37, 2007/12/16 06:09:48 |
version 1.38, 2007/12/31 13:45:40 |
|
|
| * http://platon.sk/projects/Metafox/ |
* http://platon.sk/projects/Metafox/ |
| */ |
*/ |
| |
|
| /* $Platon: Metafox/subst.inc.php,v 1.36 2007-11-25 02:05:12 nepto Exp $ */ |
/* $Platon: Metafox/subst.inc.php,v 1.37 2007-12-16 06:09:48 nepto Exp $ */ |
| |
|
| require_once 'cfgldr.inc.php'; |
require_once 'cfgldr.inc.php'; |
| require_once 'error.inc.php'; |
require_once 'error.inc.php'; |
| Line 134 $ezin_db_poll = ''; |
|
| Line 134 $ezin_db_poll = ''; |
|
| if ($ezin_cgi['author_id'] > 0 || $ezin_cgi['output'] == 'author' || $ezin_cgi['output'] == 'author_edit') { /* {{{ */ |
if ($ezin_cgi['author_id'] > 0 || $ezin_cgi['output'] == 'author' || $ezin_cgi['output'] == 'author_edit') { /* {{{ */ |
| //var_dump($ezin_cgi); |
//var_dump($ezin_cgi); |
| $ezin_db_author = ezin_get_author($ezin_cgi['author_id']); |
$ezin_db_author = ezin_get_author($ezin_cgi['author_id']); |
| |
if (! empty($ezin_db_author['author_template_key'])) { |
| |
$ezin_tmpl_key .= $ezin_sys['tmpl']['delim'].$ezin_db_author['author_template_key']; |
| |
} |
| if (! empty($ezin_db_author['author_link']) && $ezin_cgi['output'] == 'author') { |
if (! empty($ezin_db_author['author_link']) && $ezin_cgi['output'] == 'author') { |
| ezin_handle_author_link($ezin_db_author['author_link']); |
ezin_handle_author_link($ezin_db_author['author_link']); |
| } |
} |
| Line 156 if (! empty($ezin_cgi['article_id'])) { |
|
| Line 159 if (! empty($ezin_cgi['article_id'])) { |
|
| } /* }}} */ |
} /* }}} */ |
| /* {{{ section - always (at least editorial is fetched) */ |
/* {{{ section - always (at least editorial is fetched) */ |
| $ezin_db_section = ezin_get_section($ezin_cgi['section_id']); |
$ezin_db_section = ezin_get_section($ezin_cgi['section_id']); |
| |
if (! empty($ezin_db_section['section_template_key'])) { |
| |
/* What si not good here: if we have "author" page, we add also section |
| |
template key, what is not neccessary and most-likely unwanted. */ |
| |
$ezin_tmpl_key .= $ezin_sys['tmpl']['delim'].$ezin_db_section['section_template_key']; |
| |
} |
| if (! empty($ezin_db_section['section_link']) && $ezin_cgi['output'] == 'section') { |
if (! empty($ezin_db_section['section_link']) && $ezin_cgi['output'] == 'section') { |
| ezin_handle_section_link($ezin_db_section['section_link']); |
ezin_handle_section_link($ezin_db_section['section_link']); |
| } |
} |
| Line 167 if (! empty($ezin_db_section['section_li |
|
| Line 175 if (! empty($ezin_db_section['section_li |
|
| */ |
*/ |
| |
|
| if (strlen($_REQUEST['ezin_template_key']) > 0) { |
if (strlen($_REQUEST['ezin_template_key']) > 0) { |
| $ezin_db_section['section_template_key'] = $_REQUEST['ezin_template_key']; |
$ezin_tmpl_key = $ezin_sys['tmpl']['delim'].$_REQUEST['ezin_template_key'].$ezin_tmpl_key; |
| |
//$ezin_db_section['section_template_key'] = $_REQUEST['ezin_template_key']; |
| |
//$ezin_db_author['author_template_key'] = $_REQUEST['ezin_template_key']; |
| } |
} |
| |
|
| switch ($ezin_cgi['output']) { /* {{{ */ |
switch ($ezin_cgi['output']) { /* {{{ */ |
| Line 204 switch ($ezin_cgi['output']) { /* {{{ */ |
|
| Line 214 switch ($ezin_cgi['output']) { /* {{{ */ |
|
| $ezin_tmpl_main_fname = $ezin_sys['tmpl']['article'].$ezin_tmpl_key; |
$ezin_tmpl_main_fname = $ezin_sys['tmpl']['article'].$ezin_tmpl_key; |
| break; |
break; |
| case 'section': |
case 'section': |
| $ezin_tmpl_main_fname = $ezin_sys['tmpl']['section']; |
$ezin_tmpl_main_fname = $ezin_sys['tmpl']['section'].$ezin_tmpl_key; |
| if (! empty($ezin_db_section['section_template_key'])) { |
|
| $ezin_tmpl_main_fname .= $ezin_sys['tmpl']['delim'] |
|
| . $ezin_db_section['section_template_key']; |
|
| if ($ezin_tmpl_key == '') { |
|
| $ezin_tmpl_key = $ezin_sys['tmpl']['delim'] |
|
| . $ezin_db_section['section_template_key']; |
|
| } |
|
| } |
|
| break; |
break; |
| case 'author': |
case 'author': |
| if (strlen($ezin_tmpl_key) <= 0) { |
if (strlen($ezin_tmpl_key) <= 0) { |