in _include/parser_c_value.inc.php
Suche:
Code: Alles auswählen
global $key, $content, $_type, $_name, $db_autor, $db_email, $db_initial, $db_nr, $db_template, $db_idx, $db_pub_datum, $db_verfallsdatum, $db_titel, $db_content, $db_changer;
Code: Alles auswählen
global $key, $content, $_type, $_name, $db_autor, $db_email, $db_initial, $db_nr, $db_template, $db_idx, $db_pub_datum, $db_verfallsdatum, $db_titel, $db_content, $db_changer, $db_rubric_id;
Code: Alles auswählen
}
?>
Code: Alles auswählen
case stristr(strtolower($key), 'rubric'):
$db_content->query('SELECT directory, name, settings FROM '.CPO_RUBRIC." WHERE id='".addslashes($db_rubric_id)."' ");
if ($db_content->next_record()) {
$rub_settings = unserialize($db_content->v('settings'));
$content[$key] = array(
'type' =>$_type,
'name' =>$_name,
'rubricid' => $db_rubric_id,
'rubricname' => $db_content->v('name'),
'rubricdir' => $db_content->v('directory'),
'rubrictitle' => $rub_settings['title']
);
}
break;
Suche:
Code: Alles auswählen
/* FIXME These fields might be used too
Code: Alles auswählen
case stristr(strtolower($key), 'rubric'):
$replacement = sprintf('<a href="../%s/index.php?rubric=%s">%s</a>',
htmlspecialchars($content[$key]['rubricdir']),
htmlspecialchars($content[$key]['rubricid']),
htmlspecialchars($content[$key]['rubrictitle'])
);
if (array_key_exists('rubricid', $parameters)) {
$replacement = htmlspecialchars($content[$key]['rubricid']);
}
if (array_key_exists('rubricname', $parameters)) {
$replacement = htmlspecialchars($content[$key]['rubricname']);
}
if (array_key_exists('rubricdir', $parameters)) {
$replacement = htmlspecialchars($content[$key]['rubricdir']);
}
if (array_key_exists('rubrictitle', $parameters)) {
$replacement = htmlspecialchars($content[$key]['rubrictitle']);
}
break;
Außerdem können Parameter benutzt werden.
Diese geben folgendes aus:
<!-- Value: rubric; rubricid; --> => Rubrik-ID
<!-- Value: rubric; rubricname; --> => Rubrik-Name
<!-- Value: rubric; rubricdir; --> => Rubrik-Verzeichnis
<!-- Value: rubric; rubrictitle; --> => Rubrik-Titel
Ich benutze diese Platzhalter in Latest News, um die Rubrik mit angeben zu können:
Code: Alles auswählen
<div class="internallink"><a href="../<!-- Value: Value: rubric; rubricdir; -->/index.php?rubric=<!-- Value: rubric; rubricname; -->"><!-- Value: rubric; rubrictitle; --></a></div>
-> http://community.conpresso.de/viewtopic ... 6297#16297
aber ich habe es eben jetzt gebraucht...