hi garvin,
thanks a lot for your help. i followed your instructions, and the "yes" buttons are perfect now. only the "no" buttons should be far more left and next to the radio button, not over it. at the moment it looks like this:
[img]
http://www.kexy.de/screenshot_2.jpg[/img]
i marked red, how it should look like.
***
i also played around with the smarty "IF" tags and deleted all "index" commands, but that didn't help :( i still get the index.php over the "feedback-sentence". at the moment my .php-file looks in the smarty section like this:
if ($this->sendComment(
$this->get_config('email'),
$serendipity['POST']['name'],
$serendipity['POST']['email'],
$serendipity['POST']['comment'])) {
$serendipity['smarty']->assign('is_contactform_sent', true);
return true;
} else {
// Unkown error occurred.
$serendipity['smarty']->assign(
array(
'is_contactform_error' => true,
'plugin_contactform_error' => PLUGIN_CONTACTFORM_ERROR_HTML
)
);
}
return false;
}
function show() {
global $serendipity;
if ($this->selected()) {
if (!headers_sent()) {
header('HTTP/1.0 200');
}
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->assign('staticpage_pagetitle', preg_replace('@[^a-z0-9]@i', '_',$this->get_config('pagetitle')));
$this->checkSubmit();
$serendipity['smarty']->assign(
array(
'plugin_contactform_articleformat' => $this->get_config('articleformat'),
'plugin_contactform_name' => PLUGIN_CONTACTFORM_TITLE,
'plugin_contactform_pagetitle' => $this->get_config('pagetitle'),
'plugin_contactform_preface' => $this->get_config('intro'),
'plugin_contactform_sent' => $this->get_config('sent', PLUGIN_CONTACTFORM_SENT_HTML),
'plugin_contactform_message' => PLUGIN_CONTACTFORM_MESSAGE,
'commentform_action' => $serendipity['baseURL'],
'commentform_sname' => $serendipity['GET']['subpage'],
'commentform_name' => htmlspecialchars(strip_tags($serendipity['POST']['name'])),
'commentform_email' => htmlspecialchars(strip_tags($serendipity['POST']['email'])),
'commentform_data' => htmlspecialchars(strip_tags($serendipity['POST']['comment'])),
'comments_messagestack' => $serendipity['messagestack']['comments'],
'commentform_entry' => array(
'timestamp' => 1, // force captchas!
)
)
);
$tfile = serendipity_getTemplateFile('plugin_contactform.tpl', 'serendipityPath');
if (!$tfile) {
$tfile = dirname(__FILE__) . '/plugin_contactform.tpl';
}
$inclusion = $serendipity['smarty']->security_settings[INCLUDE_ANY];
$serendipity['smarty']->security_settings[INCLUDE_ANY] = true;
$content = $serendipity['smarty']->fetch('file:'. $tfile, null, null, false);
$serendipity['smarty']->security_settings[INCLUDE_ANY] = $inclusion;
if ($this->get_config('markup') == TRUE) {
$entry = array('body' => $content);
serendipity_plugin_api::hook_event('frontend_display', $entry);
echo $entry['body'];
} else {
echo $content;
}
}
}
function selected() {
global $serendipity;
if (!empty($serendipity['POST']['subpage'])) {
$serendipity['GET']['subpage'] = $serendipity['POST']['subpage'];
}
if ($serendipity['GET']['subpage'] == $this->get_config('pagetitle') ||
preg_match('@^' . preg_quote($this->get_config('permalink')) . '@i', $serendipity['GET']['subpage'])) {
return true;
}
return false;
}
function generate_content(&$title) {
$title = PLUGIN_CONTACTFORM_TITLE.' (' . $this->get_config('pagetitle') . ')';
}
function event_hook($event, &$bag, &$eventData, $addData = null) {
global $serendipity;
$hooks = &$bag->get('event_hooks');
if (isset($hooks[$event])) {
switch($event) {
case 'genpage':
$args = implode('/', serendipity_getUriArguments($eventData, true));
if ($serendipity['rewrite'] != 'none') {
$nice_url = $serendipity['serendipityHTTPPath'] . $args;
} else {
$nice_url = $serendipity['serendipityHTTPPath'] . '?/' . $args;
}
if (empty($serendipity['GET']['subpage'])) {
$serendipity['GET']['subpage'] = $nice_url;
}
if ($this->selected()) {
$serendipity['head_title'] = $this->get_config('pagetitle');
$serendipity['head_subtitle'] = $serendipity['blogTitle'];
}
break;
case 'entry_display':
if ($this->selected()) {
if (is_array($eventData)) {
$eventData['clean_page'] = true; // This is important to not display an entry list!
} else {
$eventData = array('clean_page' => true);
}
}
if (version_compare($serendipity['version'], '0.7.1', '<=')) {
$this->show();
}
return true;
break;
case 'entries_header':
$this->show();
return true;
break;
default:
return false;
break;
}
} else {
return false;
}
}
}
any clue where to change, that the feedback-page is displayed without the index.php on top?