2erlei/app/modules/basecontent/modul.php

68 lines
2.1 KiB
PHP

<?php
/**
* Modul: basecontent
*
* @package baseContent
* @subpackage basecontent
* @author Matthias Viehweger <kronn@kronn.de>
* @version 0.1.7
* @license All Rights Reserved
*/
/**
* Modul zentral registrieren
*/
$installed_modules[] = 'basecontent';
/**
* Allgemeines zum Modul
*/
class basecontent_modul extends fl_modul {
function get_options($modules) {
echo '<fieldset class="moduloptionen"><legend>allgemeine Optionen</legend>
<p><label for="seitentitel">Seitentitel</label><input type="text" class="text" name="fl[basecontent_seitentitel]" id="seitentitel" size="60" value="' . $this->_get_option('basecontent','seitentitel', 'value') . '" /></p>
<p><label for="defaultsection">Startbereich</label><select id="defaultsection" name="fl[basecontent_defaultsection]" size="1" class="dropdown">'."\n";
$modules = array('pages', 'basecontent');
foreach ( $modules as $module ) {
echo ' <option value="'.$module.'"' . ( ( $this->_get_option('basecontent', 'defaultsection', 'value') == $module )? ' selected="selected"' :'' ).'>'. ucwords($module) .'</option>'."\n";
}
echo '
</select></p>
<p><label for="option-adminhelp">Hilfe anzeigen</label>'.$this->get_dropdown('adminhelp', 'sichtbar=anzeigen,unsichtbar=verstecken').'</p>
</fieldset>'."\n";
}
function get_dropdown($field, $options) {
$options = explode(',', $options);
$aktuell = $this->_get_option('basecontent', $field);
$html = '';
$html .= "\n\t\t\t".'<select name="fl[basecontent_'.$field.']" id="option-'.$field.'" size="1" class="dropdown">'."\n";
foreach( $options as $option ) {
$option = explode('=', $option);
$option[1] = ( isset($option[1]) )? $option[1]: $option[0];
$selected = ( $aktuell == $option[0] )? ' selected="selected"': '';
$html .= "\t\t\t\t".'<option value="'.$option[0].'"'.$selected.'>'.$option[1].'</option>'."\n";
}
$html .= "\t\t\t".'</select>';
return $html;
}
function get_name() {
return FALSE;
}
function get_starttext() {
echo '';
}
function prepare() {
$this->factory->get_helper('minixml');
}
}
?>