Thread: Mini Mods - Email Reminder for inactive users
View Single Post
  #378  
Old 05-20-2011, 01:55 PM
TalkVirginia's Avatar
TalkVirginia TalkVirginia is offline
 
Join Date: Oct 2008
Location: Virginia
Posts: 545
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by doobiefillin View Post
is the latest version 2.1.5 because I got the MySQL Error: 1064 with this version of the plugin.

PHP Code:
Database error in vBulletin 4.1.3:

Invalid SQL:
UPDATE user SET rmEmailDate UNIX_TIMESTAMP(), WHERE TIMESTAMPDIFF(DAYFROM_UNIXTIME(lastvisit), FROM_UNIXTIME(UNIX_TIMESTAMP())) >= 30 AND TIMESTAMPDIFF(DAYFROM_UNIXTIME(rmEmailDate), FROM_UNIXTIME(UNIX_TIMESTAMP())) = 30 AND options 16 AND usergroupid IN ('6','2','') AND rmoptout 0 LIMIT 10;;

MySQL Error   You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE TIMESTAMPDIFF(DAY, FROM_UNIXTIME(lastvisit), FROM_UNIXTIME(UNIX_TIMESTAMP(' at line 1
Error Number  
1064
Request Date  
FridayMay 20th 2011 01:30:51 AM
Error Date    
FridayMay 20th 2011 01:30:51 AM
Script        
http://www.xxxxxxxxxx.net/forums/cron.php?rand=1305869449
Referrer      http://www.xxxxxxxxxx.net/forums/showthread.php/1041-official-eurokracy-stache-procces!
IP Address    xx.xx.xx.xx
Username      
Unregistered
Classname     
vB_Database_MySQLi
MySQL Version 

Thank you for the info - I'll look into this and post a fix as soon as I can.

EDIT: AH, Ok.. I see the problem. If you don't mind and feel like you can make the change yourself. Here's how you can do it.

1. Open the <forum>\includes\functions_remindermail.php
2. Find:

Lines 91 and 212.
PHP Code:
"SET rmEmailDate = UNIX_TIMESTAMP(), "
3. Remove the comma at the end of TIMESTAMP() on both lines.

4. Save the file and you should be good to go.

If you decide you don't want to edit it yourself, I've attached a fixed file to this post. Just drop it in your forum includes folder.

Let me know if you have any other issues.

Thanks,
Jim
Attached Files
File Type: php functions_remindermail.php (15.7 KB, 9 views)
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01296 seconds
  • Memory Usage 1,809KB
  • 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
  • (2)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_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