PDA

View Full Version : Week / Month Topic Nominations



thanhdia
23-09-2009, 08:21 PM
Week / Month Topic Nominations

Acknowledgments:
This release would not have been possible without the existence of the former “Topic Nominations” by J98680B2423E (Data) and "Post Thank You" by Abe1, which provided the mod’s core structure. A nice set of button and awards images have also been provided by princeedward. You can view screenshots at the original mod's thread: VB 3.7 Topic Nominations (http://www.vbulletin.org/forum/showthread.php?t=184155)

What is Topic Of The Week/Fortnight/Month?
It adds a "Topic Of The Week/Month" nomination system for your community.
Topic of the Week/Month is a contest that select posts on which your community can nominate as the best and then discuss them during the course of the selected week/fortnight /month. Any listed topic (post, thread) is eligible for the Topic of the Week/Fortnight /Month selection. This mod should also work in VB 3.7.x, but it has only been tested in VB 3.8.

Features of New 2.0 Version:

50+ bugs fixed & 30+ phrases changed for clarification.
Fixed ajax functionality for adding & removing nominations.
16 settings to determine which users can nominate and which posts can be nominated.
Documented this mod’s limitations & changelog in the 2nd post.
Fixed Hall of Fame to to correctly display most awarded members and topic winners from the past 3 contests (3 awards per contest).
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 manually finalize the current contest, close the old poll thread, and create a new poll thread.
An option to enable blog nominations is available and should work (coded by Data), but is not supported (I do not have VB Blog).
You must have 3 VB default hooks in the postbit template: see troubleshooting below for details. If you ask for help with a problem, you must state in your post if you have reverted ALL nomination templates and read the troubleshooting tips in the 2nd post. If you haven’t, do so otherwise you will be ignored & can debug it yourself.

Installation instructions:

Upload the content of the "upload" folder into your forum root directory
Import the "product_nominate_topic.xml" product via your ACP:
ACP -> Plugins & Products -> Manage Product -> Add/Import Product (Allow overwrite for updating)
For upgrades only, REVERT ALL nominate_topic templates in ACP -> “Find Updated Templates” or top FYI section of Control Panel. This mod will work only if ALL templates are reverted since major changes were done to them. Reapply custom phrasing to changed phrases as needed.
Adjust & save the mod settings to your preference in ACP -> VB Options. It is strongly recommended that you use the default, preset options.
Specify the Forum ID that will receive nomination threads. Also specify the User ID of the nomination thread owner.
For new installs only, start a new nomination poll at:
ACP side menu -> Nominate Topic -> Special Actions -> Create New Poll Thread
Read the 2nd post for Troubleshooting Tips & Mod Limitations.

Version History:
2.0.0: Initial Release.
2.0.2: Fixed table column bug.

thanhdia
23-09-2009, 08:21 PM
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 the plugincode (http://www.vbulletin.org/forum/showthread.php?t=203933), and search & replace for 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.

thanhdia
23-09-2009, 08:22 PM
Features:

1. Uses AJAX technology.
2. Uses one query per show thread page
3. Places an easy to use "Nominate Post" button next to the edit button
4. Fully phrased to allow (language translation) (addition v 1.3)
5. Displays a varying nomination stamps on posts that have been nominated for the contest. The color of the nomination stamps varies depending on how many users have nominated the post. (addition v 1.2)
6. Displays an award winner stamp op award winner posts at the end of the Topic Of The Week/Month contest. (addition v 1.2)
7. Via postbit pop-up, displays link to find all nominations made by a user (addition v 1.2)
8. Via postbit pop-up, allows selected usergroups (e.g. Moderators or SuperModerators) can withdraw all user’s nominees from all posts (addition v 1.2)
9. Automatically create a nomination thread for discussions on nominees
10. Nominated posts titles hot linked in the poll to actual thread/post of the forum. Links displaying on the same page (No. popups) (addition v 1.3)
11. Automatically closes the nomination thread at end of the contest cycle time (weekly/monthly)
12. Quick link to nomination thread via the "Quick Navigation" menu
13. Quick link to award winners page via the "Quick Navigation" menu
14. Automatically update the nomination poll whenever a post is nominated or withdraw from the contest.
15. Option to select the maximum number of topics that must be displayed in the poll (addition v 1.2)
16. Separate looks for postbit and postbit_legacy
17. Places all post nominees in one small box
18. Displays award winners in one small box
19. Quick link to nomination thread via the "small box" on the thread page
20. Option to allow award winners to re-enter the contest after X days
21. Option to take or not into account for nomination only posts made during the month preceding the nomination cycle time (addition v 1.2)
22. Option to consider the maximum number of posts a user can nominate per cycle time (addition v 1.2)
23. Users cannot nominate the same post twice
24. Option to not allow users to nominate their own post
25. Counts nominees submitted by a user
26. Counts how many times a nominee is submitted
27. Shows how many nominees a user submitted in every post of his
28. Shows info in member's profile
29. Option to search for posts nominated by a user
30. Option to search for all nominated posts
31. Administrator can withdraw all nominees of a single post
32. Selected usergroups (e.g. Moderators or SuperModerators) can withdraw all nominees of a single post (addition v 1.10)
33. Users can withdraw their own nominee
34. Option to disable the mod on selected forums
35. Option to disable the mod on all but the first post of a thread
36. Option to disable the mod on all but first post of a thread in specific forums
37. Option to enable/disable view of nomination date on specific or all forums
38. Option to add to post count when someone nominates a post.
39. Option to give reputation points to the user whose post is nominated.
40. Option to ban selected usergroups from using the mod
41. Option to ban selected users from using the mod
42. Option to display user’s nomination statistics on postbit (addition v 1.10)
43. Option not to display nomination statistics on postbit for selected users
44. Option not to display nomination statistics on postbit for selected usergroups (addition v 1.50)
45. Option to display or not the hall of fame link in Quick-Links (addition v 1.3)
46. Option to select forums on which nominations must be considered
47. Hall of fame re-designed to handle a Top 10 award winners, all time accumulated (addition v 1.3)
48. Option to refresh the poll thread if for some reason a post referenced in the poll came to be deleted (addition v 1.3)
49. Option to use the current week number or month, or the next week number or month, in the contest title (addition v 1.3)
50. Option for archiving nominations in the “Nomination Thread” automatically.
51. Option to automatically send a PM to award winners at the end of the contest (addition v 1.4)
52. Option to automatically add points to award winners’ reputation at the end of the contest (addition v 1.4)
53. If the current “Nomination Thread” is deleted for whatever reason, a single manual run of the cron file will suffice to create a new thread, avoiding a clean install of the product.
54. Option to nominate blog entries (addition v 1.6)
55. Option to have award winners or nominated posts icons displayed on posts, so that nominated posts can be easily identified when listing posts.