function generate_content(&$title) { global $serendipity; $title = $this->get_config('title'); serendipity_common_pollbox::poll(); echo '<br /><a class="votearchive" href="' . $serendipity['baseURL'] . $serendipity['indexFile'] . '?serendipity[subpage]=votearchive">' . ARCHIVES . '</a>'; }
function show() { global $serendipity; if ($this->selected()) { if (!headers_sent()) { header('HTTP/1.0 200'); header('Status: 200'); } if (!is_object($serendipity['smarty'])) { serendipity_smarty_init(); } $_ENV['staticpage_pagetitle'] = preg_replace('@[^a-z0-9]@i', '_', $this->get_config('pagetitle')); $serendipity['smarty']->assign('staticpage_pagetitle', $_ENV['staticpage_pagetitle']); echo '<div class="serendipity_poll">'; if (serendipity_db_bool($this->get_config('articleformat'))) { echo '<div class="serendipity_Entry_Date"> <h3 class="serendipity_date">' . $this->get_config('articleformattitle') . '</h3>'; } echo '<h4 class="serendipity_title"><a href="#">' . $this->get_polldata('title') . '</a></h4>'; if (serendipity_db_bool($this->get_config('articleformat'))) { echo '<div class="serendipity_entry"><div class="serendipity_entry_body">'; } echo '<div class="serendipity_poll_body">'; if (isset($serendipity['GET']['voteId'])) { serendipity_common_pollbox::poll($serendipity['GET']['voteId']); } else { serendipity_common_pollbox::poll(); } echo '</div>'; echo '<br /><div class="serendipity_poll_archive">'; PLUGIN_POLL_ARCHIVE . '<br />'; $polls =& $this->fetchPolls(); if (is_array($polls)) { foreach ($polls as $poll) { echo '<a href="' . $serendipity['baseURL'] . $serendipity['indexFile'] . '?serendipity[subpage]=' . $this->get_config('pagetitle') . '&serendipity[voteId]=' . $poll['id'] . '">' . (function_exists('serendipity_specialchars') ? serendipity_specialchars($poll['title']) : htmlspecialchars($poll['title'], ENT_COMPAT, LANG_CHARSET)) . '</a>, ' . serendipity_strftime(DATE_FORMAT_ENTRY, $poll['timestamp']) . '<br />'; } } echo '</div>'; if (serendipity_db_bool($this->get_config('articleformat'))) { echo '</div></div></div>'; } echo '</div>'; } }