Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions

Reply
 
Thread Tools Display Modes
  #11  
Old 09-13-2013, 06:27 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, i tested for a client, thats why i posted what i did & thats why it was rewrote because of that issue.
Reply With Quote
  #12  
Old 09-13-2013, 06:44 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is the rewrite in the latest download?
Or did you rewrite it for your client?
(and if so could you point me to the area to be rewritten?)
Reply With Quote
  #13  
Old 09-13-2013, 07:10 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, sorry its a private script rewrite that wasnt released here.
Reply With Quote
  #14  
Old 09-13-2013, 07:17 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by smirkley View Post
Which is why I used an = and then the ( 0, -1) in my first suggested example.

I see. It's IN (1, 2, 3) to check for one of a number of values, but = just checks one.

I'm quite sure that you just want to remove the word NOT from the existing case 3. (But I don't know anything about the other issue you guys were discussing).
Reply With Quote
  #15  
Old 09-13-2013, 07:28 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by snakes1100 View Post
No, sorry its a private script rewrite that wasnt released here.
No biggie. I will keep an eye out whilst I test this. So far I have it working but if something crops up, I am sure I can figure it out.

Quote:
Originally Posted by kh99 View Post
I see. It's IN (1, 2, 3) to check for one of a number of values, but = just checks one.

I'm quite sure that you just want to remove the word NOT from the existing case 3. (But I don't know anything about the other issue you guys were discussing).
Thanks kh99. Since I can only test this on a daily basis (on a test usergroup, without bothering going into the database to backdate test pm's), I am going to test it (since I have already implemented it in test) by combining case 1 contents with case 2 contents into case 3 removing the old case 3 contents, and changing the phrase in the template for acp. This may not be the most effecient use, but I know the cron runs atm with this change without error. I will just have to wait till tomorrow to find out if it indeed operated as desired as I dont have enough time today to force the issue. If it doesnt work, I will try your suggestion and then report back. If it does, then eureka!!

Thanks again.
Reply With Quote
  #16  
Old 09-13-2013, 07:32 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you're talking about trying the last code you posted above, that won't work because the only way the condition would be true is if pm.folderid was equal to -1 and to 0. If you wanted to do it that way you'd need an OR (and add parens), like:

Code:
$pms_query_where_clouse .= " AND (pm.folderid = '0' OR pm.folderid = '-1')";

But that's actually equivalent to "AND pm.folderid IN (0, -1)", which is what you get by removing the NOT.
Reply With Quote
Благодарность от:
smirkley
  #17  
Old 09-13-2013, 07:33 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Check the PM folders after it runs on its own for PM's that got deleted, but left the msg in the box, you will no longer be able to click or delete via the forum.
Reply With Quote
  #18  
Old 09-15-2013, 02:35 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
If you're talking about trying the last code you posted above, that won't work because the only way the condition would be true is if pm.folderid was equal to -1 and to 0. If you wanted to do it that way you'd need an OR (and add parens), like:

Code:
$pms_query_where_clouse .= " AND (pm.folderid = '0' OR pm.folderid = '-1')";

But that's actually equivalent to "AND pm.folderid IN (0, -1)", which is what you get by removing the NOT.
Forgot to return to this, but yes you are correct. My attempt didnt work as you suggested. Didnt prune anything in tests.

I will try your suggestion next and report back the results.

Is there a preferred methed? Use the OR or use the AND without the NOT?
Reply With Quote
  #19  
Old 09-15-2013, 02:52 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by smirkley View Post
Is there a preferred methed? Use the OR or use the AND without the NOT?
No, it's just two different ways of expressing the same condition.
Reply With Quote
  #20  
Old 09-15-2013, 11:02 PM
smirkley smirkley is offline
 
Join Date: Apr 2008
Posts: 627
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
If you're talking about trying the last code you posted above, that won't work because the only way the condition would be true is if pm.folderid was equal to -1 and to 0. If you wanted to do it that way you'd need an OR (and add parens), like:

Code:
$pms_query_where_clouse .= " AND (pm.folderid = '0' OR pm.folderid = '-1')";

But that's actually equivalent to "AND pm.folderid IN (0, -1)", which is what you get by removing the NOT.
That did the trick on a manual run of the cron. I will be testing it on auto cron tonight, but it looks like it worked perfect.

Thank you once again kh99
(I will likely post these changes on the original 3.7 thread)
(if it says reusable code, does that mean I can submit this in my name with original credits as a new 4.x mod?)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:23 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.11918 seconds
  • Memory Usage 2,262KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete