View Single Post
  #901  
Old 10-07-2008, 11:43 AM
J98680Bxxxxx J98680Bxxxxx is offline
 
Join Date: Jan 2008
Location: Bridge - Enterprise
Posts: 325
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Update in version 1.635
The following bug Fix by vbboarder has been implemented

Quote:
Originally Posted by vbboarder View Post
IMPORTANT: UPGRADE TO VERSION 1.63 BEFORE DOING BUG FIXES.

Bug Fix ? close old & start new contest thread: The current contest thread will not close and a new contest thread will not begin if your computer/ server was down or you had the nominate topic cron task disabled when the cron task is scheduled to run. As Data noted in his script: ./includes/cron/nominate_topic_cron.php in line #247 (in v1.63), you can uncomment a line to get the current contest thread to close and a new one to begin. Basically, you change ?// $createNewThread = 1;? to ?$createNewThread = 1;? then run the nominate topic cron task manually, then put the ?// ? back into ?$createNewThread = 1;? To run the cron task manually, on the AdminCP left side column, go to Scheduled Tasks > Scheduled Task Manager > find Nominate Topic Mod and click ?Run Now? (make sure it?s enabled first ? should have a check mark next to the title).

Bug Fix ? ?can?t find phrase? error in PM subject: There are some missing code in ./includes/cron/nominate_topic_cron.php file:
FIND:
PHP Code:
 eval(fetch_email_phrases($nt_awardwinner_pm)); 
.
ADD ABOVE THAT:
PHP Code:
 $get_phrase $vbulletin->db->query_read("SELECT * FROM `"TABLE_PREFIX ."phrase` WHERE `varname` = 'nominate_topic_awardwinner_pm_subject'");
$fetchphrase $vbulletin->db->fetch_array($get_phrase);
$nt_awardwinner_pm_subject $fetchphrase['text']; 
.
FIND:
PHP Code:
 $pmdm->set('title'$nt_awardwinner_pm_subject); 
.
ADD ABOVE THAT:
PHP Code:
 $pmdm->set('title'$nt_awardwinner_pm_subject); 
.
The PM subject should now be phrased to whatever you set for the nominate_topic_awardwinner_pm phrase, which defaults to ?Award Winner Topic Nomination Contest!? Note that this setting will not take effect till the current contest thread is over.

Bug Fix ? correctly displaying contest thread title:
For monthly nominations, this code is written so that a new thread is only created on the last day of the month. If you set ?Display Next Cycle Time On Contest Header? to ?Yes? which is the default, this is not a good condition to test for since the # of days varies every month and the month phrases for the thread title & posts are created by adding 1 to the current month. Thus, when users had new monthly threads created on Sept. 30, adding 1 month would result in Oct. 30, so users got a new thread titled ?Topic of the Month October, 2008? which is incorrect IF the above setting is enabled since the contest running now in Oct. should have posts in the ?Topic of the Month November, 2008? thread. There?s 2 fixes for this problem:

Quick fix for current threads:
For the October, 2008 thread title, you need to wait till Oct. 1 or later to do this fix. On the AdminCP left side column, click Nominate Topic > Refresh Poll Thread. Click on or refresh the nomination forum and you should see the new month November, 2008 in the thread title, which should be saved.

Permanent fix for new threads: This fix requires editing ./includes/cron/nominate_topic_cron.php. FIND 2 occurrences of:
.
REPLACE BOTH WITH:
.
This fix will require the mod to create new threads on the first day on the month to fix the thread titles bug. . Note that this setting will not take effect till the next new contest thread is created.

Note: If you do not want the thread title & posts to be named for the next month, then set ?Display Next Cycle Time On Contest Header? to ?No? in Nominate Topic settings. If set to ?No?, then the contest running now in Oct. will have posts in the ?Topic of the Month October, 2008? thread. This makes more sense, similar to how vbulletin.org runs their nomination contest. Note that this setting will not take effect till the next new contest thread is created.

Data, hope this relieves some debugging strain for you ?cause you have an excellent mod!
Thank you vbboarder, I really appreciate this bug fix. :up:
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01140 seconds
  • Memory Usage 1,809KB
  • Queries Executed 11 (?)
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
  • (4)bbcode_php
  • (1)bbcode_quote
  • (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_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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete