add('name', WRAPURL_TITLE . ': ' . $this->get_config('pagetitle', '')); $propbag->add('description', WRAPURL_TITLE_BLAHBLAH); $propbag->add('event_hooks', array('entries_header' => true, 'entry_display' => true, 'genpage' => true, 'frontend_generate_plugins' => true, 'css' => true)); $propbag->add('configuration', array('headline', 'permalink', 'pagetitle', 'wrapurl', 'height', 'wrapurl_append', 'hide_sidebar')); $propbag->add('author', 'Rob Antonishen, Ian (Timbalu)'); $propbag->add('version', '0.10.1'); $propbag->add('requirements', array( 'serendipity' => '0.7', 'smarty' => '2.6.7', 'php' => '4.1.0' )); $propbag->add('groups', array('FRONTEND_EXTERNAL_SERVICES')); $propbag->add('stackable', true); $this->pagetitle = $this->get_config('pagetitle', 'pagetitle'); } function introspect_config_item($name, &$propbag) { global $serendipity; switch($name) { case 'headline': $propbag->add('type', 'string'); $propbag->add('name', WRAPURL_HEADLINE); $propbag->add('description', WRAPURL_HEADLINE_BLAHBLAH); $propbag->add('default', ''); break; case 'wrapurl': $propbag->add('type', 'string'); $propbag->add('name', WRAPURL_URL); $propbag->add('description', WRAPURL_URL_BLAHBLAH); $propbag->add('default', ''); break; case 'wrapurl_append': $propbag->add('type', 'boolean'); $propbag->add('name', WRAPURL_URL_APPEND); $propbag->add('description', WRAPURL_URL_APPEND_BLAHBLAH); $propbag->add('default', false); break; case 'hide_sidebar': $propbag->add('type', 'boolean'); $propbag->add('name', WRAPURL_HIDE_SIDEBAR); $propbag->add('description', ''); $propbag->add('default', false); break; case 'permalink': $propbag->add('type', 'string'); $propbag->add('name', WRAPURL_PERMALINK); $propbag->add('description', WRAPURL_PERMALINK_BLAHBLAH); $propbag->add('default', $serendipity['rewrite'] != 'none' ? $serendipity['serendipityHTTPPath'] . 'wpages/pagetitle.html' : $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?/wpages/pagetitle.html'); break; case 'pagetitle': $propbag->add('type', 'string'); $propbag->add('name', WRAPURL_PAGETITLE); $propbag->add('description', WRAPURL_PAGETITLE_BLAHBLAH); $propbag->add('default', 'pagetitle'); break; case 'height': $propbag->add('type', 'string'); $propbag->add('name', WRAPURL_HIGHT); $propbag->add('description', WRAPURL_HIGHT_BLAHBLAH); $propbag->add('default', '1000'); break; default: return false; } return true; } function show() { global $serendipity; if ($this->selected()) { if (!headers_sent()) { header('HTTP/1.0 200'); header('Status: 200 OK'); } $url = $this->get_config('wrapurl'); if (serendipity_db_bool($this->get_config('wrapurl_append'))) { if (stristr($url, '?') === false) { $url .= '?'; } else { $url .= '&'; } foreach($_GET AS $key => $value) { if (is_array($value)) { // Arrays are skipped! continue; } $url .= (function_exists('serendipity_specialchars') ? serendipity_specialchars($key) : htmlspecialchars($key, ENT_COMPAT, LANG_CHARSET)) . '=' . (function_exists('serendipity_specialchars') ? serendipity_specialchars($value) : htmlspecialchars($value, ENT_COMPAT, LANG_CHARSET)) . '&'; } } $_ENV['staticpage_pagetitle'] = preg_replace('@[^a-z0-9]@i', '_',$this->get_config('pagetitle')); $serendipity['smarty']->assign('staticpage_pagetitle', $_ENV['staticpage_pagetitle']); echo '