PDA

View Full Version : Change Threads/Posts Owner


Phalynx
04-10-2006, 10:00 PM
A version compatible with vBulletin 3.7 GOLD can be found here:
https://vborg.vbsupport.ru/showthread.php?t=178208

What does this hack do?
It can change the owner of multiple threads and post. For this, it adds another option to your mod actions on forumdisplay and showthread. After selecting some threads or posts, you can choose the new owner by name or UserID. By name works with the AJAX namesuggestion, we all know it from writing a PM. After changing the name(s), it rebuilds thread/forum counters.

This hack makes use of phrases, simple group permissions and is creating an entry into the moderation log.

Tested only on vB 3.5.4, but should work also for vB 3.5.0 up to 3.5.4

Contains: 8 phrases, 3 additional templates, 2 Options
Installtime: <1 minutes
Difficulty: easy (1 product)

Demo is not available, due to missing permissions on my board.

Please click INSTALL, otherwise I will not support you.

Changes from 1.0:
-Ability to change also the owner of posts. If you change the owner of the firstpost, the owner of the thread will be also changed

- Added group permission. This works not with Bitfields, because I didn't want to have a file to upload. Instead, you can enter usergroups that should have access to that feature. Due to performance, it is checked only by calling the function, the links are showed for all mods. If you don't enter any group, the forum permission is checked (like it was in 1.0).

- Added possibility to enter also the UserID of a user

- "forumdisplay_changethreadsowner" is still uncached, because its not used quiet often and don't need to be cached.

How to install?- Simply import product


Options are not displayed. How do I add them manually?
If you choose to not automatically add both options you have to add that options manually.

1. Disable automatic template edit in the Change threads/posts owner settings


2. Open the template FORUMDISPLAY.

Search for:
<option value="mergethread">$vbphrase[merge_threads]</option>

Add after it:
<option value="changethreadsowner">$vbphrase[changethreadsowner_link]</option>



3. Open the template SHOWTHREAD

Search for:
<option value="undeleteposts">$vbphrase[undelete_posts]</option>

Add after it:
<option value="changepostsowner">$vbphrase[changethreadsowner_link]</option>

Deagle Man
04-11-2006, 09:06 AM
* Deagle Man installs.

Woot first post :).

Ziki
04-11-2006, 10:05 AM
Ziki clicks install!

sensimilla
04-11-2006, 10:24 AM
Looks like a very handy hack especially while you have multiple accounts as admin.

Thanks!

BoYagoob
04-11-2006, 11:56 AM
Installed .. Thanks :P

yinyang
04-11-2006, 04:17 PM
*installed*

is it possible, in the future, to also change the owner of a single post using this?

akanevsky
04-11-2006, 04:59 PM
Nice hack, does it also change the owner of the first post?
And does it update postcounts?

SHalliday
04-11-2006, 05:04 PM
Very Nice and useful too :) Installed and worked first time right out of the box without problem. Well done and thank you!

Phalynx
04-11-2006, 05:24 PM
is it possible, in the future, to also change the owner of a single post using this?
As I mentioned in the description: Yes, this is planned for an update.

Nice hack, does it also change the owner of the first post?
And does it update postcounts?
Yes, it changes the first post, too. It also updates postcount.

Oblivion Knight
04-11-2006, 05:40 PM
If only this had come out a few days sooner.!

What a great April Fools joke it could have been used for.. ;)

Snake
04-11-2006, 05:41 PM
Oh goodie! Thanks for the hack! :D

The Chief
04-11-2006, 05:42 PM
love this hack, will install soon :)

yinyang
04-11-2006, 08:53 PM
As I mentioned in the description: Yes, this is planned for an update.

see, this explains why my SAT scores were so low in English.... bad reading comprehension skills.

nasser71
04-16-2006, 07:04 PM
can you make it bye member number insted of name
and make a group permission to use this

ben_erhan
04-16-2006, 07:19 PM
in my opinion this is very nice.
but if it has a group permission it will be better.

thanks

brvheart
04-17-2006, 07:15 PM
*install* but would like to see it added in the dropdown menu for thread tools cant wait for the update ;)

Essam
04-18-2006, 12:59 AM
its great thanks ,
can you add " changing thread date and time " too ?
edit = clicked install :cool:

Phalynx
04-18-2006, 06:31 AM
I'll try to implement most of the wishes to the new version - if you click on install ;)

brvheart
04-24-2006, 07:27 PM
Edit, nm, got it working again.

Kihon Kata
05-06-2006, 04:13 AM
Installed on 3.5.4! But it didn't work for me! :( I tried to troubleshoot it myself, it only added 2 templates in each style, and some phrases. But when I look in forumdisplay there is no option for "change threads owner" or when I look at showthread. :( any ideas?

Phalynx
05-06-2006, 07:38 AM
Do you have a modifed FORUMDISPLAY template?

Boofo
05-06-2006, 08:50 AM
Can this be set up for admin use only?

Kihon Kata
05-06-2006, 11:59 AM
Do you have a modifed FORUMDISPLAY template?
I do, BUT, I also have a stock vB one. It's not even on that one either. Any other ideas?

Stop
05-07-2006, 02:59 PM
Can this be set up for admin use only?

Installed.
But still looking for the group permission.

mawby
05-10-2006, 07:20 PM
I just installed this and after selecting several threads and typing in a new name I got the following error when pressing the change owner button...

Fatal error: Only variables can be passed by reference in /vbb/inlinemod.php(220) : eval()'d code on line 74

Any clues what the problem might be?

mawby
05-12-2006, 08:38 AM
Fatal error: Only variables can be passed by reference in /vbb/inlinemod.php(220) : eval()'d code on line 74Any suggestions greatly appreciated.

Phalynx
05-12-2006, 08:45 AM
What PHP-version are you using?

mawby
05-12-2006, 10:00 AM
What PHP-version are you using?5.0.5

mawby
05-16-2006, 06:45 AM
Any clues from the PHP version?

Phalynx
05-16-2006, 08:08 AM
I cannot test it on 5.x, have here only 4.x

mawby
05-16-2006, 10:51 AM
I cannot test it on 5.x, have here only 4.xDoes this page help explain the problem? http://bugs.php.net/bug.php?id=33643

Snake
05-16-2006, 11:42 AM
Just what I have been looking for. :)

* Snake installs

rmxs
05-26-2006, 07:32 PM
i just found that one teplate Uncached.

forumdisplay_changethreadsowner (1)

On the change owner screen..

How can i cache this??

Aeolian
05-29-2006, 10:52 PM
is it possible to limit this power within Administrator Group ONLY?

thanks!!

D.Ilyin
05-30-2006, 12:16 PM
BTW, for the next version, I plan to integrate it with posts.
Will be waiting.... :)
BTW what about group permisions for this hack and uncashed template?

Phalynx
05-30-2006, 12:19 PM
They are already included, but I cannot release it this week due to missing time.

Kihon Kata
05-31-2006, 10:48 PM
Installed on 3.5.4. Problem: It doesn't work LOL

I am not getting the option in the drop down at all. Any ideas?

Phalynx
06-01-2006, 10:18 AM
To fix that, you have to add that option manually. Open the template FORUMDISPLAY.

Search for:
<option value="mergethread">$vbphrase[merge_threads]</option>


Add after it:
<option value="changethreadsowner">$vbphrase[changethreadsowner_link]</option>

D.Ilyin
06-01-2006, 12:20 PM
They are already included, but I cannot release it this week due to missing time.
WOW! It's greate! :bunny:

Kihon Kata
06-01-2006, 12:20 PM
To fix that, you have to add that option manually. Open the template FORUMDISPLAY.

Search for:
<option value="mergethread">$vbphrase[merge_threads]</option>


Add after it:
<option value="changethreadsowner">$vbphrase[changethreadsowner_link]</option>
that worked! wonder why it didn't work before?

D.Ilyin
06-01-2006, 01:35 PM
Changes from 1.0:- Ability to change also the owner of posts. If you change the owner of the firstpost, the owner of the thread will be also changed
- Added group permission. This works not with Bitfields, because I didn't want to have a file to upload. Instead, you can enter usergroups that should have access to that feature. Due to performance, it is checked only by calling the function, the links are showed for all mods. If you don't enter any group, the forum permission is checked (like it was in 1.0).
- Added possibility to enter also the UserID of a user
- "forumdisplay_changethreadsowner" is still uncached, because its not used quiet often and don't need to be cached.
Clicked install twice!! ;)

D.Ilyin
06-01-2006, 01:53 PM
but.....
Database error in vBulletin 3.5.4:

Invalid SQL:

SELECT thread.forumid, firstpostid, postid, parentid, thread.threadid
FROM vb_post
INNER JOIN vb_thread as thread ON (thread.threadid=post.threadid)
WHERE post.postid IN (2);

MySQL Error : Unknown table 'post' in where clause
Error Number : 1109
Date : Thursday, June 1st 2006 @ 05:53:37 PM
Script : http://localhost/vb0/inlinemod.php
Referrer : http://localhost/vb0/inlinemod.php
IP Address : 127.0.0.1
Username : admin
Classname : vb_database
ONLY when try to change owner from inside thread :(.

UPDATED
And as a future suggestion:
decrease amount of posts old owner and adding amout to new owner of the thread.

Kihon Kata
06-01-2006, 02:02 PM
updated mine :)

Kihon Kata
06-01-2006, 02:03 PM
so, where are the usergroup perms again?

Phalynx
06-01-2006, 02:12 PM
but.....

ONLY when try to change owner from inside thread :(.


Should be fixed with the new XML named product-changethreadsowner151.xml, please download again.

so, where are the usergroup perms again?
In this case, vBulletin Options, "Change threads/posts owner"

D.Ilyin
06-01-2006, 03:29 PM
Should be fixed with the new XML named product-changethreadsowner151.xml, please download again.
Thank's all works without errors for now.

PS What about my suggestion?
On big boards rebuilding posts count after changing some authors thread will be to long :(.
so, where are the usergroup perms again?
PSS Maybe you mean that: ./admincp/options.php?do=options&dogroup=changethreadsowner

Jeordie015
06-03-2006, 02:09 PM
I have a suggestion. So I installed this and tried it out and it was about as painless as could be. But since I was having to go through pages and pages in the forums finding threads that needed to be changed, that's when I noticed it.

Say you're on the 10th page of a forum and that's the page in which you want to change a thread. You do that, and it brings you back to the first page of the forum. Is there a way it could bring you back to the 10th page?

Phalynx
06-03-2006, 05:15 PM
There should be no problem to implement this. Currently I'm calling the forum of the first thread. Lets see v1.6

On big boards rebuilding posts count after changing some authors thread will be to long
Right, next version will add/remove postings.

mawby
06-16-2006, 09:00 AM
I just installed this and after selecting several threads and typing in a new name I got the following error when pressing the change owner button...

Fatal error: Only variables can be passed by reference in /vbb/inlinemod.php(220) : eval()'d code on line 74

Any clues what the problem might be?In case it helps, this only happens if I use the option when looking at a forum (forumdisplay.php). If I use it when looking at a thread (showthread.php) then it works fine.

I'm happy with this, at least I can use it now. :)

HappyPike
07-24-2006, 04:11 AM
There should be no problem to implement this. Currently I'm calling the forum of the first thread. Lets see v1.6


Right, next version will add/remove postings.
Is the next version coming soon?

Staxed
07-25-2006, 10:02 AM
just thought i'd mention this works with 3.6 if anyone was wondering ;)

ahmed-samara
07-27-2006, 02:02 PM
Nice hack

parabat
07-31-2006, 01:19 PM
Has anyone else seen this. The mod works like a dream generally, but as soon as I try change to a user who's name starts with a number, it reverts to the admin's username.

Eg. Username 11Echo.
If I try to change the post to reflect the name of 11Echo, it reflects the admins username instead.

I have tested this with a few users who have the 1st letter as a digit. The internal search finds the user ok, but when you select to change, it doesn't and changes the post to reflect the admin.

Any ideas, or help on this one??

-Parabat

parabat
08-16-2006, 11:37 AM
Has anyone else seen this. The mod works like a dream generally, but as soon as I try change to a user who's name starts with a number, it reverts to the admin's username.

Eg. Username 11Echo.
If I try to change the post to reflect the name of 11Echo, it reflects the admins username instead.

I have tested this with a few users who have the 1st letter as a digit. The internal search finds the user ok, but when you select to change, it doesn't and changes the post to reflect the admin.

Any ideas, or help on this one??

-Parabat


Anyone, Anyone, Anyone?????

sillystuie
08-26-2006, 03:08 PM
been looking for this for a while - many thanks (installed)

SportsZone
08-27-2006, 07:57 AM
just thought i'd mention this works with 3.6 if anyone was wondering ;)

It didn't work for me. Did you do anything other than the instructions to get this hack to work?

Phalynx
08-27-2006, 11:42 AM
I tried this also on my new 3.6 and it works.

Snake
08-28-2006, 11:06 AM
Great seems to work just fine on 3.6. :)

Kihon Kata
09-02-2006, 01:50 PM
Didn't work for me in 3.6 (I previously had it installed and working on 3.5.4). So I edited forumdisplay and added:

<option value="changethreadsowner">$vbphrase[changethreadsowner_link]</option>

Worked

Phalynx
09-04-2006, 08:01 AM
Seems that your template was modified and automatic search & attach didn't work.

TigerWare
03-03-2007, 03:41 PM
Perfecto!

Installed on 3.6.4

I was looking to run a query directly on the DB, but this makes is so much easier... THANKS!

:up:

obmob
06-26-2007, 02:15 PM
Good, will try on 3.6.7 :D

jblackburn
11-07-2007, 04:34 PM
Nice hack! Installed and basically working on v3.5.5, but it didn't update the post count automatically. Anything I can do to fix that?

Djamil
11-11-2007, 04:28 PM
There should be no problem to implement this. Currently I'm calling the forum of the first thread. Lets see v1.6


Right, next version will add/remove postings.

Hi there,

did you abandon your plans to develop this hack further ?

Djamil

koxito
02-26-2008, 07:22 AM
Man, this is very util!! i used to love this hack..!!! 3.7 it PLZ!!! :P

Lumis Out.

Phalynx
02-26-2008, 08:16 AM
I'm using it unmodified on vB3.7 Beta 5 without problems.

hjmaier
03-20-2008, 03:45 PM
It works pretty well with vB 3.7.

Nice hack, Thank you.

I know this one is an old hack, but i wonder if you are thinking about working on it for a bit. I would suggest to update the posting counter of the user and get it working together with the great vBExperience AddOn.

Best regards
Hans-Joachim

Phalynx
03-20-2008, 03:49 PM
That's on my todo-list, I have to wait for the final vB3.7

BTW, how should this work with vBExperience? vBExperience calculates data real-time. If a post owner changed, the data for the user will be calculated next time he posts something.

Koroku
03-21-2008, 01:48 AM
Yep, works fine with vB3.7 RC1

I have a lot of "bots" that I use, and it makes it so much easier to just change post owners.

I've been using this hack for about a year now, and it's by far one of the most useful ones. <3

Koroku
04-28-2008, 08:30 AM
I'm not quite sure how to get this one to work with the security tokens - can someone please help?

I don't seen any <form>s...

readjono
04-29-2008, 12:49 PM
It's stopped working with 3.6.10 it seems.

TigerWare
05-03-2008, 10:54 AM
Security token needs to be added to the "forumdisplay_changethreadsowner" template to make this work with 3.6.10.

Load Style Manager locate the template under "Forum Display Templates"

Under:
<input type="hidden" name="s" value="$session[sessionhash]" />

Insert:
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />

Save. Refresh the Change Threads Owner form (so it picks up the new template version) and it works fine. I just fixed mine too because I forgot to test it before upgrading to 3.6.10.

If you do not add the security token, it won't work.

Phalynx
05-03-2008, 10:17 PM
I will do an update for 3.7 soon.

readjono
05-04-2008, 08:47 PM
Would be much appreciated.

Koroku
05-04-2008, 10:09 PM
Security token needs to be added to the "forumdisplay_changethreadsowner" template to make this work with 3.6.10.

Load Style Manager locate the template under "Forum Display Templates"

Under:
<input type="hidden" name="s" value="$session[sessionhash]" />

Insert:
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />

Save. Refresh the Change Threads Owner form (so it picks up the new template version) and it works fine. I just fixed mine too because I forgot to test it before upgrading to 3.6.10.

If you do not add the security token, it won't work.
THANK YOU

AScherff
05-05-2008, 11:45 AM
I will do an update for 3.7 soon.

Das ist sch?n, Danke.

Nice, Thanks

Phalynx
05-05-2008, 03:01 PM
A new version for 3.7 has been released here:
https://vborg.vbsupport.ru/showthread.php?t=178208

Changelog from 1.5:
- Post counter of old and new user will be updated
- Added moderation to search result
- Clean up code
- Made compatible with vBulletin 3.7 GOLD
- Minor fixes

AL-5JL
06-23-2009, 06:37 PM
thanks

longgsm
09-11-2009, 05:51 AM
How Change ThreadID? Help me!

Phalynx
09-14-2009, 06:52 AM
How Change ThreadID? Help me!

Crosspost. Answered here:
https://vborg.vbsupport.ru/showthread.php?p=1884432#post1884432