<?php /* ==================== [BEGIN_COT_EXT] Hooks=forums.newtopic.tags Tags= [END_COT_EXT] ==================== */ /** * Polls * * @package Polls * @copyright (c) Cotonti Team * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt */ defined('COT_CODE') or die('Wrong URL'); if ($cfg['forums']['cat_' . $s]['allowpolls']) { cot_poll_edit_form('new', $t, 'MAIN.POLL'); $t->parse('MAIN.POLL'); }
<?php /* ==================== [BEGIN_COT_EXT] Hooks=forums.editpost.tags Tags= [END_COT_EXT] ==================== */ /** * Polls * * @package Polls * @copyright (c) Cotonti Team * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt */ defined('COT_CODE') or die('Wrong URL'); if ($is_first_post && $usr['isadmin'] && cot_module_active('polls') && cot_poll_edit_form($q, $t, 'MAIN.POLL', 'forum')) { $t->parse('MAIN.POLL'); }
if ((int) $poll_id > 0) { $adminpath[] = array(cot_url('admin', 'm=polls' . $poll_filter . '&n=options&id=' . (int) $poll_id . '&d=' . $durl), $L['Options'] . " (#{$poll_id})"); $formname = $L['editdeleteentries']; $send_button = $L['Update']; } else { $formname = $L['Add']; $send_button = $L['Create']; } } else { $poll_id = 0; $formname = $L['Add']; $send_button = $L['Create']; } foreach ($variants as $val) { $checked = $filter == $val[1] ? " selected='selected'" : ""; if ($val[1]) { $val[1] = '&filter=' . $val[1]; } $t->assign(array('ADMIN_POLLS_ROW_FILTER_VALUE' => cot_url('admin', 'm=polls' . $val[1]), 'ADMIN_POLLS_ROW_FILTER_CHECKED' => $checked, 'ADMIN_POLLS_ROW_FILTER_NAME' => $val[0])); $t->parse('MAIN.POLLS_ROW_FILTER'); } cot_poll_edit_form($poll_id, $t, 'MAIN'); $t->assign(array('ADMIN_POLLS_CONF_URL' => cot_url('admin', 'm=config&n=edit&o=module&p=polls'), 'ADMIN_POLLS_ADMINWARNINGS' => $adminwarnings, 'ADMIN_POLLS_PAGINATION_PREV' => $pagenav['prev'], 'ADMIN_POLLS_PAGNAV' => $pagenav['main'], 'ADMIN_POLLS_PAGINATION_NEXT' => $pagenav['next'], 'ADMIN_POLLS_TOTALITEMS' => $totalitems, 'ADMIN_POLLS_ON_PAGE' => $ii, 'ADMIN_POLLS_FORMNAME' => $formname, 'ADMIN_POLLS_FORM_URL' => (int) $poll_id > 0 ? cot_url('admin', 'm=polls' . $poll_filter . '&d=' . $durl) : cot_url('admin', 'm=polls'), 'ADMIN_POLLS_EDIT_FORM' => $poll_text, 'ADMIN_POLLS_SEND_BUTTON' => $send_button)); cot_display_messages($t); /* === Hook === */ foreach (cot_getextplugins('polls.admin.tags') as $pl) { include $pl; } /* ===== */ $t->parse('MAIN'); $adminmain = $t->text('MAIN');