Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us

GuestPost v1.3

edited May 2008 in Questions

Make a guest user account and define the username and password in the default.php file and it should just add the add comments form to all pages and allow guests to post. It will log them in and immediately back out again in order to do so. I suggest you choose a hard to guess password since otherwise someone will just log into the guest account properly, change its password, and break the extension. If people are posting while not logged in it will add a warning that they are posting as guest.

The extension will not work in conjunction with the AddComments extension since that requires the fields to be filled in (if you're php savvy you could just remove that requirement from the addcomments/default.php and it should work fine)

As of v1.3, if a guest enters their own name into the Username box and leaves the password box free, it will head up the post with their name. This requires the HTML formatter to be installed.

Let me know how it goes.


  • Works good so far. Awesome Mini, you will please many people.
  • amazing, mini DID it
  • Great work Minisweeper!

    Btw. in addons it says requires version 1.0.1 but works fine with my 1.0 as well (if someone is interested).

    One suggestion: As for now, the guest can only participate in threads. Would it be too complicated to allow it to make new threads as well?

    Thanks again!
  • Yeah, I wrote it using the new SetDefinition method but then realised nicks forum (which i used to test it) is still only running v1 so i had to go back to the old method. I might change it back to the new way at some point though.

    As for making whole discussions, it is a lot more work yes. There's a whole load more permission checking in place at a higher level than for just adding comments (un-signed in users cant even view the post.php page - all users can see the comment grid it's just a matter of adding more stuff to it)
  • At first I was like "what, cant post?" but then realized you can post comments, just not start discussions. Which I kind of like better.
  • Well the thing is if users have nothing to gain by registering an account then they wont. I think this is a pretty good compromise. In any case it was literally about 10 minutes work so aslong as it keeps some people happy i dont really care :D
  • I think you are right, this way it may be for the better. I am happy. :)
  • The extension will not work in conjunction with the AddComments extension since that requires the fields to be filled in (if you're php savvy you could just remove that requirement from the addcomments/default.php and it should work fine)
    Can you show us how? We're keen to learn :)
  • Actually, come to think of it it wouldnt work since both extensions are adding to the same delegate so whichever one added itself last would take precedence (i assume - either that or it'd just generally break). If people want it I could release another version of this extension which allowed people to enter login details or post as a guest?
  • I think it makes sense to allow users to start discussions if you have it limited to one category in which they can do so. For example, a help forum if they are having troubles logging in, rumor mill, etc.
  • It's not a matter of choosing them to allow it, it's getting round the permissions problem for someone who isnt logged in (this extension only logs people in to post their comment then logs them back out again).
  • hi mini, if you could improve the extenion (i couldn't really get what u were trying to say after ur explanation for my question, my bad), I would b grateful to try it out. Cheers.
  • Um. yeah. I'll try and get onto it tonight it shouldnt take long. If you could post again in like 6 hours that would probably help :D
  • Here you go. Grab the latest source from here: It's not tested but I think it should work. Let me know how it goes.
  • hm ... i think i have a spam problem with this extension :(
  • That doesnt surprise me. Yet another reason to make people register. I guess i could add requirements for email addresses/captcha but by that time its easier just to register. The form is only like 5 inputs long.
  • edited October 2006
    Some problems were encountered
    The requested username and password combination could not be found.

    I get the above error.
    I've made the guest account and entered the details in default.php
    I tested the account by logging in with the details.
    Any ideas?

    I manually entered the guest account details and they were accepted, post successful.
    Somehow, they are not being picked up from the default.php definitions.

    Yes I double-checked my typing.
  • ^ I'm having the exact same issue.
  • Is this with the version I uploaded the other day (1.1)?
  • Yup, version 1.1 here boss :-)
  • Hmm. That doesnt really surprise me. I'm not all too familiar with the define function.

    Grab the new version 1.1f and see if that helps.
  • Sorry Minisweeper, same error.
    Shame, I've had over 1400 unique visitors in the last 4 weeks, only 2 registered, I'd like to try allowing guests to post and see if it makes a difference.
  • Err. Try dropping the single quotes round $GU and $GP on lines 64 and 65 and see if that works. If it doesnt then replace those lines with just $Username = $GU; and $Password = $GU; and see if that works. Bit confused what's up there.

    Before you do that, I assume it works if you put a username and password in..?
  • Hey Minisweeper, that worked BUT...

    After the comment is added, Guest remains logged in with access to the Account tab, not good!
  • What worked, removing the ''s? If so try changing the bit lower down where it references GuestUsername to $GU?
  • edited October 2006
    Minisweeper, removing the single quotes on lines 64 and 65 worked.

    Also, changing GuestUsername to $GU on line 84 now logs out the guest properly.

    Thanks sincerely for your interest and patience not to mention talent!

    Later: Also, line 54 should be...
  • Ok for anyone else with trouble i've uploaded a v1.2.

    No probs though, no talent about it it's entirely guesswork :D Seriously though I'm not sure why any of those things fixed it... Hmm...
  • Thanks heaps Mini, this is a truly useful extension for anyone with fairly itinerant and not very committed visitors, to encourage some comment, and hopefully growing involvement. It seems to work perfectly for me, but I guess time will tell.
  • I realy sux at PHP, so please bright me up - define the guest account username and password-?? In witch line exucatly i need to change and what, if for example my login will bee "guest" and psw will bee "abrakadabra". Im already made a guest account ar roles and perrmissions. I got latest versions of sources, but still I see that error "Some problems were encounteredThe requested username and password combination could not be found." Thanks !
This discussion has been closed.