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.

Re: [Release] Author Update

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.

3 (edited by guardian34 2006-11-19 17:08)

Re: [Release] Author Update

A couple of fixes and additions are already in progress?

Edit: A new version has been uploaded.

Re: [Release] Author Update

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!

5 (edited by cal 2007-02-06 10:48)

Re: [Release] Author Update

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?

Re: [Release] Author Update

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.

7 (edited by cal 2007-02-25 17:04)

Re: [Release] Author Update

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)

Re: [Release] Author Update

Awesome mod. Thanks!

Check Maid maid service

9

Re: [Release] Author Update

Is it possible to make this mod available not only for admins but also for certain (not all) mods?

Re: [Release] Author Update

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.

11

Re: [Release] Author Update

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. big_smile


Cheers,

Matt

Re: [Release] Author Update

Try removing the if not exists, then paste any error you get

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

13

Re: [Release] Author Update

Smartys wrote:

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

Re: [Release] Author Update

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());
http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

15

Re: [Release] Author Update

Cheers. That has sorted that error. smile

Getting one from the second line after it, (below), now. big_smile

$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

Re: [Release] Author Update

$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

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

17

Re: [Release] Author Update

That works beautifully. Thanks. smile Just tested it and it's doing exactly as it should now. smile


Thanks again,

Matt

Re: [Release] Author Update

Thanks Smartys. smile

19

Re: [Release] Author Update

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?