Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 04-02-2008, 10:53 AM
Dima Dima is offline
 
Join Date: Sep 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Move Specific Threads from Trash

Is it possible, maybe through an sql query, to move specific threads from one section (the 'Trash') into another section.

The scenario is alot of threads, into the hundreds, were incorrectly moved to the trash. I have manually gone through and moved 300+ threads back however thats barely made a dint in the total. I'm hoping there is some way to move threads moved by a certain user that were trashed on a certain day into another section.

Hope its not a difficult task. Otherwise my only option is manually moving them. Thanks.
Reply With Quote
  #2  
Old 05-17-2008, 01:32 PM
Dima Dima is offline
 
Join Date: Sep 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No one? Can anyone point me in the right direction. Where in the database does it store the user that moved the thread and time/date etc?
Reply With Quote
  #3  
Old 05-17-2008, 01:40 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I believe the only place that information is stored is in the moderator log. The table is called "moderatorlog" and it has such columns as dateline, userid, threadid, postid, action, etc. As you have found, there is no way to mass move threads by picking all threads "moved by moderator xyz". I'm not great at writing these sort of queries, so I'm not gonna even try it.
Reply With Quote
  #4  
Old 05-17-2008, 02:12 PM
Dima Dima is offline
 
Join Date: Sep 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a ton. Do you know how the dateline relates to a time/date? i.e. 1211033315 in dateline is 00:08, 18th May 2008 when viewed on the forum. If i find out that i may be able to work something out.

edit: Nevermind really (although it would be handy in the future to know). I have found the right query to display all those threads that were moved by the specific user between those dates. Now i just need to figure out how to move those threads back using another query.


Edit2: Alright ive figure out the queries to show the threads. Would the below command work to change which forum they belong to? (bear in mind i have limited SQL knowledge and that knowledge doesnt involve vbulletin etc.)

Code:
update thread set forumid = (new forumid) where threadid in (select threadid from moderatorlog where userid = 3722 and dateline > 1203261021 and dateline < 1203419415)
Reply With Quote
  #5  
Old 05-17-2008, 02:34 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's a page to convert your unixtimestamp (the dateline column) into a regular date: http://www.converteverything.com/con.../unix_time.htm
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 02:50 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03866 seconds
  • Memory Usage 2,189KB
  • Queries Executed 11 (?)
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
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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_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
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete