WordPress.org

Ready to get started?Download WordPress

Forums

WP Bulletin Board
[resolved] Call to undefined function absnt() (8 posts)

  1. iamanelf
    Member
    Posted 1 year ago #

    Hi there,
    Been having a problem with the edit post function.

    When saving the update i get the following message.

    Fatal error: Call to undefined function absnt() in /home/iamaelf/public_html/wp-content/plugins/wp-bulletin-board/php/wpbb-edit-topic.php on line 302

    Also on a side note i have been having problems with usernames when someone makes a post it (not all the time) changes after some time to say guest instead of the user that posted it.

    Any help would be fantastic.

    lootah

    http://wordpress.org/extend/plugins/wp-bulletin-board/

  2. codebycarter
    Member
    Plugin Author

    Posted 1 year ago #

    Hey,

    If you could open wp-bulletin-board/php/wpbb-edit-topic.php at line 302 and change:

    $post_author = absnt($_POST['wpbbpostauthor']);

    To:

    $post_author = absint($_POST['wpbbpostauthor']);

    Just a typo, will be fixed in the next version, thanks!

    Also on a side note i have been having problems with usernames when someone makes a post it (not all the time) changes after some time to say guest instead of the user that posted it.

    That could be happening because of that typo where its not assigning a correct value for the post author when editing a topic but do let me know if you encounter this again.

    Thanks

  3. iamanelf
    Member
    Posted 1 year ago #

    hey thanks that solved the first problem however whenever a user edits the post the their name still changes to guest, I checked the database and i can tell you what happens:

    If a user posts then there is no problem.
    If a user edits a post the author becomes guest.

    Any help would be fantastic

    Thanks

    Lootah

  4. codebycarter
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry for the late reply. I'd made an error when checking the author field input.

    Please open wp-bulletin-board/php/wpbb-edit-topic.php around line 295 and find:

    if (isset($_POST['wpbbpostauthor'])) {
    			if (is_numeric($_POST['wpbbpostauthor'])) {
    				// Strip all tags from the authors name
    				$post_author_name = wp_strip_all_tags($_POST['wpbbpostauthor']);
    				// Retrieve ID back from username
    				$post_author = wpbb_parse_author_name(NULL, $post_author_name);
    			} else {
    				$post_author = absnt($_POST['wpbbpostauthor']);
    			}
    		}

    Replace with:

    if (isset($_POST['wpbbpostauthor']))
    		{
    			if (is_numeric($_POST['wpbbpostauthor']))
    			{
    				$post_author = absint($_POST['wpbbpostauthor']);
    			}
    			else
    			{
    				$post_author_name = wp_strip_all_tags($_POST['wpbbpostauthor']);
    				$post_author = wpbb_parse_author_name(NULL, $post_author_name);
    			}
    		}

    Thanks for letting me know. Please let me know if you need any further help :)

    Cheers

  5. iamanelf
    Member
    Posted 1 year ago #

    Thanks that's fixed it :)

  6. Doremdou
    Member
    Posted 1 year ago #

    Hi,

    I have the same problem but changing the code didnt fix it.

    ""If a user posts then there is no problem.
    If a user edits a post the author becomes guest.""

    Do we have to change something else? (I downloaded the last version available)

  7. codebycarter
    Member
    Plugin Author

    Posted 1 year ago #

    It's a bug that's been fixed in the latest version just testing as much as I can before releasing it.

    To fix it temporarily please look at my post above, that's all you have to do.

  8. jayrec
    Member
    Posted 1 year ago #

    Hey,

    I have the latest version of this plug-in and I still have the guest status display as doremdou does when replying to a comment made.

    Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic