Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #1  
Old 06-08-2010, 11:13 PM
xsultanx xsultanx is offline
 
Join Date: Jun 2010
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Moving posts from one user to another...

Hi.

I want to move posts, private messages from one user to another one, from user 2 (membership 2) to user 4 (membership 4). I don't want to delete user 2 but I want his posts to be 0 and his posts will be moved to user 4.

Please tell me about the SQL query or any code to do this.

My vBulletin Version is 3.8.5
Reply With Quote
  #2  
Old 06-09-2010, 03:43 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That is not an easy task. Better would be to merge the account and then create a new account with the old name.
Reply With Quote
  #3  
Old 06-09-2010, 06:59 AM
xsultanx xsultanx is offline
 
Join Date: Jun 2010
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you tell me how to do the task which is not easy because I need very importantly to have the user 2 with the ID 2?

Thank you.
Reply With Quote
  #4  
Old 06-09-2010, 09:05 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The new user would get a new id.

What is the reason you need the user to have id = 2? Id's are only internal reference numbers and have no special meaning.
Reply With Quote
  #5  
Old 06-09-2010, 11:58 AM
xsultanx xsultanx is offline
 
Join Date: Jun 2010
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry I need that because we have VIP membership numbers and most important membership will get the first numbers. Can you help please?
Reply With Quote
  #6  
Old 06-10-2010, 12:40 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Marco van Herwaarden View Post
The new user would get a new id.

What is the reason you need the user to have id = 2? Id's are only internal reference numbers and have no special meaning.
Is there a reason why changing the userid of the 'new' member in the user table back to '2' wouldn't work so long as there is no existing entry for user '2.'?
Reply With Quote
  #7  
Old 06-10-2010, 04:29 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Userid's are referenced in many places, so it is not a simple change.

@xsultanx
I strongly suggest you change your method, as this is really limiting your options. A userid is only a reference number and should never be given any meaning.
Reply With Quote
  #8  
Old 06-10-2010, 05:01 PM
xsultanx xsultanx is offline
 
Join Date: Jun 2010
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK is there a ways to change the user ID from starting from 1 to start from 0? or to start from 10 for example?

The problem is that in posbit_lagacy template I have a field which shows the membership number which is the same as ID
Reply With Quote
  #9  
Old 06-10-2010, 05:13 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by xsultanx View Post
OK is there a ways to change the user ID from starting from 1 to start from 0? or to start from 10 for example?

The problem is that in posbit_lagacy template I have a field which shows the membership number which is the same as ID
Although this would be a 'dirty' fix you could include a conditional so that "if userid = 750, display userid = 2" in the postbit... If this is the only member you need to do this for it will work but would totally suck for multiple members.
Reply With Quote
  #10  
Old 06-10-2010, 07:26 PM
xsultanx xsultanx is offline
 
Join Date: Jun 2010
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will try this but how should I write the code exactly?
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:08 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.02374 seconds
  • Memory Usage 2,235KB
  • 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
  • (2)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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (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
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete