Topic: [Release] Author Update
Version 2.0 has been uploaded: http://punbb.org/download/plugins/AP_Author_Update.zip
This plugin allows admins to change the author of a single post or to transfer all posts by a certain user to another user.
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → [Release] Author Update
Version 2.0 has been uploaded: http://punbb.org/download/plugins/AP_Author_Update.zip
This plugin allows admins to change the author of a single post or to transfer all posts by a certain user to another user.
Hello.
Thank you for this plugin. I have just tried it, but I have this error :
Fatal error: Call to a member function on a non-object in /home/local/apache/htdocs/.../forum/plugins/AP_Author_Update.php on line 36
Do you know why ?
Thank you.
A couple of fixes and additions are already in progress?
Edit: A new version has been uploaded.
Excellent mod. I play three characters in my RP forum and I hate it when I post with the wrong one. This mod saves me the trouble of editting, what is it: 3, 4? database tables. Thank you!
And though unused as of yet, changing one user to another could be very helpful!
I get this error when I am trying to use this plugin.
Warning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' cannot be used twice in /glftpd/site/www/nolltid/forum/include/functions.php on line 924
An error was encountered
Error: Unable to fetch post info.
How can I solve this problem?
Not sure what that warning is about (it's coming from inside the `error` function).
As for the actual error, you'll need to repost the error after you turn on debug mode.
This is what it says when Debug Mode is enabled.
Warning: ob_start() [ref.outcontrol]: output handler 'ob_gzhandler' cannot be used twice in
/glftpd/site/www/nolltid/forum/include/functions.php on line 924
=======================================================================
An error was encountered
File: /glftpd/site/www/nolltid/forum/plugins/AP_Author_Update.php
Line: 43
PunBB reported: Unable to fetch post info
Database reported: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY posted LIMIT 1' at line 1 (Errno: 1064)
Is it possible to make this mod available not only for admins but also for certain (not all) mods?
Renaming the plugin prefix from AP_ to AMP_ will make it available for all the moderators, I don't know if there's a simple way to restrict it to some mods only.
Would anyone happen to know the pgsql version of this line?
$db->query('CREATE TEMPORARY TABLE IF NOT EXISTS '.$db->prefix.'post_counts SELECT poster_id, count(*) as new_num FROM '.$db->prefix.'posts GROUP BY poster_id') or error('Creating temporary table failed', __FILE__, __LINE__, $db->error());
It throws a wobbler on trying to synchronise the post counts.
Cheers,
Matt
Try removing the if not exists, then paste any error you get
Try removing the if not exists, then paste any error you get
Line: 121
PunBB reported: Creating temporary table failed
Database reported: ERROR: syntax error at or near "SELECT" at character 42
Cheers,
Matt
Aha
$db->query('CREATE TEMPORARY TABLE '.$db->prefix.'post_counts AS SELECT poster_id, count(*) as new_num FROM '.$db->prefix.'posts GROUP BY poster_id') or error('Creating temporary table failed', __FILE__, __LINE__, $db->error());
Cheers. That has sorted that error.
Getting one from the second line after it, (below), now.
$db->query('UPDATE '.$db->prefix.'users, '.$db->prefix.'post_counts SET num_posts=new_num WHERE id=poster_id') or error('Could not update post counts', __FILE__, __LINE__, $db->error());
The error message is:
Line: 125
PunBB reported: Could not update post counts
Database reported: ERROR: syntax error at or near "," at character 19
Thanks.
Matt
$db->query('UPDATE '.$db->prefix.'users SET num_posts=new_num FROM '.$db->prefix.'post_counts WHERE id=poster_id') or error('Could not update post counts', __FILE__, __LINE__, $db->error());
Try that
That works beautifully. Thanks. Just tested it and it's doing exactly as it should now.
Thanks again,
Matt
Thanks Smartys.
For me it doesn't grab the right post ID !
e.g. if inserting ID 36 it takes 21, but i can't see any reason why?
How can I change the file to show up the menu on load instead of the textfields?
PunBB Forums → PunBB 1.2 modifications, plugins and integrations → [Release] Author Update
Powered by PunBB, supported by Informer Technologies, Inc.