## ## Mod title: Auto Poll ## ## Mod version: 1.0 ## Works on PunBB: 1.2.* ## Release date: 2009-09-07 ## Author: Koos (pampoen10@yahoo.com) ## Original Author: Mediator (med_mediator@hotmail.com) ## Contributors: BN (http://la-bnbox.fr) ## ## Description: Adds poll functionality to your forum. ## ## Affected files: moderate.php ## post.php ## search.php ## viewforum.php ## viewtopic.php ## include/functions.php ## ## Affects DB: New tables: ## 'polls' ## New column in 'topics' table: ## 'question' ## New column in 'forum_perms' table: ## 'post_polls' ## New options in 'config' table: ## 'o_poll_enabled' ## 'o_poll_max_fields' ## 'o_poll_mod_delete_polls' ## 'o_poll_mod_edit_polls' ## 'o_poll_mod_reset_polls' ## ## DISCLAIMER: Please note that "mods" are not officially supported by ## PunBB. Installation of this modification is done at your ## own risk. Backup your forum database and any and all ## applicable files before proceeding. ## # #---------[ 1. UPLOAD ]------------------------------------------------- # Upload the file install_mod.php to forum root. # #---------[ 2. RUN ]---------------------------------------------------------- # install_mod.php # #---------[ 3. DELETE ]------------------------------------------------------- # install_mod.php # #---------[ 4. OPEN ]--------------------------------------------------------- # moderate.php # #---------[ 5. FIND (line: 431) ]--------------------------------------------- # // Delete any subscriptions $db->query('DELETE FROM '.$db->prefix.'subscriptions WHERE topic_id IN('.$topics.')') or error('Unable to delete subscriptions', __FILE__, __LINE__, $db->error()); # #---------[ 6. BEFORE, ADD ]--------------------------------------------------- # // POLL MOD: Delete polls $db->query('DELETE FROM '.$db->prefix.'polls WHERE pollid IN('.$topics.')') or error('Unable to delete poll', __FILE__, __LINE__, $db->error()); # #---------[ 7. FIND (line: 606) ]--------------------------------------------- # num_views, num_replies # #---------[ 8. AFTER, INSERT ]--------------------------------------------------- # , question # #---------[ 9. FIND (line: 660) ]--------------------------------------------- # if ($cur_topic['sticky'] == '1') # #---------[ 10. BEFORE, ADD ]--------------------------------------------------- # // POLL MOD: require PUN_ROOT.'lang/'.$pun_user['language'].'/poll.php'; if ($cur_topic['question'] != '') $subject = $lang_poll['Poll'] . ': '.$subject; # #---------[ 11. OPEN ]--------------------------------------------------------- # post.php # #---------[ 12. FIND (line: 323) ]--------------------------------------------- # redirect('viewtopic.php?pid='.$new_pid.'#p'.$new_pid, $lang_post['Post redirect']); # #---------[ 13. BEFORE, ADD ]--------------------------------------------------- # require PUN_ROOT.'include/poll/poll_post.php'; # #---------[ 14. FIND (line: 509) ]--------------------------------------------- # if ($pun_config['o_smilies'] == '1') $checkboxes[] = '