Thread: Show Thread Enhancements - Week / Month Topic Nominations
View Single Post
  #2  
Old 09-19-2009, 07:59 PM
vbboarder's Avatar
vbboarder vbboarder is offline
 
Join Date: Jun 2008
Location: Silicon Valley, CA
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Troubleshooting:
If the nominate button, award icon, and/or nominating users box do not show up, then it?s due to 4 possible problems:
1. 16 settings affect ability to nominate & display of nomination button:
  • enable mod?, enable mod for blogs?
  • forums to enable nominations for all posts
  • forums to enable nominations in first posts, enable nominations in first post only?
  • 4 settings: users & usergroups not allowed to be nominated, users & usergroups not allowed to nominate
  • waiting time required for awarded posts to be renomination
  • can user nominate own post?, minimum # of posts required to nominate
  • maximum # of nominations user can give per cycle, max # of nominations user can receive per cycle
  • nominate posts from last month?, disable nominating posts older than X days?
2. You must have 3 hooks in the postbit template (present in VB?s non-customized template) or other postbit templates if you don?t use the default postbit. The 3 required hooks are (add them if you?re missing any):
$template_hook[postbit_controls]
$template_hook[postbit_end]
$template_hook[postbit_userinfo_left]

3. You are using another mod that uses one of the above hooks and its plugin code does an assignment instead of a concatenation when adding content to the $template_hook. For example, another mod may use:
$template_hook[postbit_controls] = ?content?
OR: $template_hook[?postbit_controls?] = ?content?
WHEN IT SHOULD USE:
$template_hook[postbit_controls] .= ?content?
OR: $template_hook[?postbit_controls?] .= ?content?

IMPORTANT: notice the dot before the ?=? sign; leaving out that one character can cause other content not to show when multiple mods use the same hooks.
TO FIX: install this plugin, Search plugincode, and search & replace the one character error.

4. You did not upload all the files or you did not upload the files using FTP. Don't use non-FTP programs, like Dreamweaver and other WYSIWYG editors, to upload the files because they can mess up the file encoding when uploading. Also, if you have custom skins, you need to upload the images to EACH custom skin's "images" folder.

Limitations:
  • This mod should work with postbit_legacy template. Blog nominations can be enabled, but is not supported.
  • For automatic weekly nominations, a new nomination poll should start on the 1st day (Monday) of every week; for fortnight nominations, a new nomination poll should start on the 1st & 16th of the month; for monthly nominations, a new nomination poll should start on the 1st of every month. Manual nominations can occur on any date via: ACP side menu -> Nominate Topic -> Special Actions -> Create New Poll Thread.
  • This mod adds 1 extra query per post that is nominated and shown in showthread. For example, if a thread has 20 posts per page and 10 posts were nominated, but only 2 nominated posts are shown on a given page, then there?s only 2 extra queries.
  • When posts or threads are deleted, only those that are in the current contest will update the user?s nominated_posts & nominated_times because the post table only tracks past awards, not past nominations.
  • The poll can display a maximum of the top 10 nominated entries (setting is in Nominations options). Users can still nominate other entries, but they will not show up in the poll unless their # of nominations are in the top 10.
  • The Hall of Fame can display a maximum of the top 9 most awarded members and the 9 most recent topic winners (3 winners per contest). Note: top 10 is not allowed because it?s hard coded to display 3 columns in 3 rows.
  • Winning posts must met the required waiting time when the cron task runs (a new poll thread is created) in order for the post to enter the new contest. In other words, the waiting time criteria for winning posts is only checked once per contest.
  • The award postbit image does not display when a post enters a new contest and gets nominated because the nominated postbit image will show. After the contest is over, the past award image will display again if the post does not win. If the post wins again, its postbit image changes to its new award. The advantage is that it receives a new award date so that it?s displayed in the Hall of Fame page, but a possible disadvantage is that its new winning position may be less than its past winning position (ie: past award was 1st place and new award is 3rd place, but 3rd place award with the current date will show).
Changelog (changes from v1.636 to v2.0.0):
  • 50+ bugs fixed & 30+ phrases changed for clarification
  • Removed 4 settings: max_per_day that allowed limiting # of nominations per day (users can still limit nominations per contest), header_nextcyle for creating contest titles with a future time period (titles are now always for current contest time), forum_off to specify which forums? posts can not be nominated (redundant: just don?t specify these forums in the forum_on setting), display_quicklink to show quick link for the nomination poll thread (changed to ?find all nominations? link).
  • Removed 2 recount functions, recount users? past nominations and recount # of past times nominated, since this mod only tracks past wins, not past nominations.
  • Added new setting, max # of nominations user can receive, to prevent a poll being dominated by a single user.
  • Added new function to recount # of current nominations received and past awards.
  • Added new function to run the cron task: finalize the current contest, close the old poll thread, and create a new poll thread.
Known Bugs & Fixes:
  1. If you set "topics to display on polls" to 10 in Topic Nominations settings, you may lose your nominees in the poll. Solution: simply set that setting to 9 or less. Also, if you lose your nominees in the poll, you can get them back by ACP > Topic Nominations > Refresh Poll action.
  2. Posts that received reputation from a user can not be nominated BY THAT USER if you enabled reputation points for receiving nominations. Solution: to prevent this bug and its sql error, simply set the setting, 'Reputation', to 0 in Topic Nominations settings.
For users who are testing this mod:
For users who want to REMOVE ALL POST AWARDS AND USERS' NOMINATION STATS:
  1. Download the file clear_nominations.php below
  2. UPLOAD THIS SCRIPT TO THE '/forum/admincp/' FOLDER
  3. BACKUP YOUR DB TABLES
  4. Access the page with your browser
  5. DELETE clear_nominations.php IMMEDIATELY AFTER RUNNING IT FOR SECURITY
Attached Files
File Type: php clear_nominations.php (1.1 KB, 47 views)
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01409 seconds
  • Memory Usage 1,811KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_attachment
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete