Announcement

Collapse
No announcement yet.

Image verification of comments error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ming Keong
    replied
    A more elegant solution will be to create a new blog option to determine if the forum owners would like image verification for comments from unregistered users. Eg, to use something like $vbulletin->options['blogcommentimagecheck'] instead of $vbulletin->options['postimagecheck']

    This will give users more flexibility in configuration (and will save me the trouble of hacking future blog revisions as I need image verification for comments and none for forum posts )

    Leave a comment:


  • Ming Keong
    replied
    I've managed to fix the issue. This is probably specific to my case. I have GD enabled for new registrations but I've disabled image verification for new posts as I couldn't figure out how to integrate the image verification into the feedback form I use for our oscommerce customers.

    Line 1544 of blog_post.php trips because of this set up.

    Code:
        if ($vbulletin->options['postimagecheck'] AND !$vbulletin->userinfo['userid'] AND $vbulletin->options['regimagetype'])
        {
            require_once(DIR . '/includes/functions_regimage.php');
            $imagehash = fetch_regimage_hash();
            eval('$imagereg = "' . fetch_template('imagereg') . '";');
        }
        else
        {
            $imagereg = '';
        }
    Changing this to the following resolves the problem for me.

    Code:
        if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['regimagetype'])
        {
            require_once(DIR . '/includes/functions_regimage.php');
            $imagehash = fetch_regimage_hash();
            eval('$imagereg = "' . fetch_template('imagereg') . '";');
        }
        else
        {
            $imagereg = '';
        }
    Another bug fix required will be to change line 1289 from

    Code:
        if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['regimagetype'])
        {
            require_once(DIR . '/includes/functions_regimage.php');
            if (!verify_regimage_hash($vbulletin->GPC['imagehash'], $vbulletin->GPC['imagestamp']))
            {
                $blogman->error('register_imagecheck');
              }
        }
    to

    Code:
        if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['regimagetype'] AND $vbulletin->options['postimagecheck'])
        {
            require_once(DIR . '/includes/functions_regimage.php');
            if (!verify_regimage_hash($vbulletin->GPC['imagehash'], $vbulletin->GPC['imagestamp']))
            {
                $blogman->error('register_imagecheck');
              }
        }
    Note: The first fix is specific to my case. The second fix however should go into the blog codes for future versions.
    Last edited by Ming Keong; Fri 14th Sep '07, 2:36am.

    Leave a comment:


  • Ming Keong
    replied
    I'm assuming that a sort of image verification will appear on the same page "new comments" page but it does not.

    GD works fine on the server ( http://forum.istyles.com/register.php?do=register ) . If I disable the image verification settings, new comments can be posted. Is anyone running their Blog with Unregistered posting comments + image verification successfully or is this a bug?

    With GD disabled, comments go through but there should be an if statement to disable avatars as an unregistered user does not have an avatar and the comment shows a broken image: http://forum.istyles.com/blog.php?b=3

    Leave a comment:


  • Ming Keong
    replied
    To add further - I just disabled every product on the forum with the exception of the Blog but it's still not working.

    Leave a comment:


  • Ming Keong
    replied
    Thanks for the suggestion. I created a new style with no parent and the same issue still occurs even after a complete flush of the browser cache (+reload)

    Leave a comment:


  • Steve Machol
    replied
    Looks like a problem with your custom style. Try this. Create a new style and choose no parent style. This will force it to use the default templates. Then change to this style and view your forums with it. Do you have the same problem?

    If you do, empty your browser cache, close all browser windows and try again.

    Leave a comment:


  • Ming Keong
    started a topic Image verification of comments error

    Image verification of comments error

    I've allowed unregistered users to post comments in the blog in the permissions but they're still unable to do so. Whenever a new comment is posted, the user will encounter the following error:

    The following errors occurred when this message was submitted:
    1. The string you entered for the image verification did not match what was displayed.
    The problem is that no image verification was displayed in the page prior to the comment form submission.

    Here's a sample URL: http://forum.istyles.com/blog_post.php?do=comment&b=3 . Does anyone know what might be wrong or whether a particular template might be responsible? Our templates are hardly modified - only the header, footer and headinclude templates were changed. I could not find any settings to disable/enable image verification for comments or did I miss that out?

    Comments made by registered users do not encounter such problems.
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X