WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Call to undefined function absnt()

[Resolved] Call to undefined function absnt()

  • 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/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author codebycarter

    @codebycarter

    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

    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

    Plugin Author codebycarter

    @codebycarter

    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

    Thanks that’s fixed it 🙂

    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)

    Plugin Author codebycarter

    @codebycarter

    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.

    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?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] Call to undefined function absnt()’ is closed to new replies.