Hi, nice add-on
I have some thoughts and opinions:
- it says permisson error if CAPTCHA test doesn't pass, there should be some 'Please try it again' or 'Please enter the code'.
- it is necessary to fill CAPTCHA if I use my login name, it shouldn't be so, because if I am identified, I won't spam :)
- prefixing comment body by "<strong>$UserDefined:</strong><br/><br/>" requires Html formatter installed, so I would recommend to use plain text as default, and make this prefix customizable or switchable in admin (not sure how to manage already posted comments, maybe just leave them).
- requires creating guest user by user and setting it in default.php (together with CAPTCHAenable/disable setting), but guest user can be created by add-on as an option and the settings can be saved/changed in admin.
I'll probably solve the error message issue, maybe others.
If so then I'd post diffs here
Also there was some question about limiting a non-registered user to only some specific category or list of categories. I think this might be solved by using CategoryRoles and by using some new role for the guest user.
klip said:Also there was some question about limiting a non-registered user to only some specific category or list of categories. I think this might be solved by using CategoryRoles and by using some new role for the guest user.
Yes, technically that would work. But the Guest Post form would still be added to all categories. Personally, I find that annoying, and potentially confusing for guests. Hence the need to hack the extension and add the "if category" condition.
So there is also another place to filter categories where we want to display the GuestPost form. Now I'm not sure if $CommentGrid is available when default.php is called by core. If you filter it by category id in a delegated function, it is available.
If you want the guest post form to be displayed on a certain category only, you have to add the CategoryID filter into the condition (on line 33):
&& ($CommentGrid->Discussion->CategoryID == 5)
where 5 is CategoryID of category you want the guest form to be displayed only at.
So the code looks like this function CommentGrid_ShowGuestPostForm(&$CommentGrid) { if ($CommentGrid->ShowForm == 0 && $CommentGrid->Context->Session->UserID == 0 && ($CommentGrid->pl->PageCount == 1 || $CommentGrid->pl->PageCount == $CommentGrid->CurrentPage) && ((!$CommentGrid->Discussion->Closed && $CommentGrid->Discussion->Active && ($CommentGrid->Discussion->CategoryID == 5))) && $CommentGrid->CommentData ) $CommentGrid->ShowForm = 1; }
Thanks Klip, I'm just realising that you're answering to my request, though I don't use myself GuestPost. I would have myself tried to use a config table for non PHP techies. Those snippets are not tested (thanks to Klip for the pre-work): // among config items // This array contains the discussion ids where you want to show the GuestPost form $Context->PassThruVars['CategoriesForGuestPost'] = array(5,6,7);
// instead of Klip's hack //... // was ...($CommentGrid->Discussion->CategoryID == 5)... // now is ...in_array($CommentGrid->Discussion->CategoryID, $Context->PassThruVars['CategoriesForGuestPost'])... //...
NOTE: We may need $CommentGrid->Context instead of $Context here.
i did everything and still geting this: Some problems were encountered The requested username and password combination could not be found. You do not have permission to add comments to discussions.
I went to the default.php and add a user name' GuestUsername' use the default name 'Guest' & and 'Guestpassword" change to my own 'passwordhere' I also created a new role call "Guest" and allow this role to add comment and HTML.
on the Readme, when you state "you will need to set up a guest account if you do not already have one" Do i have to to create a new role? for example "Guest" or Register an account, like a regular user? user"Guest" & pass"12345" and put that info on the default.php?
No not a new role, simply a new member account called Guest with a password.
Nobody will actually use this account directly, the GuestPost add-on will do all the work of signing in unregistered visitors using this account, that's why it needs the username/account details.
I'm not sure you want to allow this mate, before I installed Guest Post it was cool for a while, then the SPAMMERS got hold of my forum and they went wild adding spam content.
Now with Guest Post I get an attempt maybe once every 2 months but my members jump on it quickly, notifying me and it gets deleted, they soon give up, it's too much trouble for them.
Besides, you want people to register don't you? Dangling the "new discussion" carrot is a good way to do it.
Letting guests post new discussions also has an technical issue---the DiscussionForm does a UserID check and spits out a fatal error is the user is a guest. This means you would have to either modify the core DiscussionForm class, or you would have to write some sort of alternate posting class for guests.
Obvious it can be done, but it makes things more complicated.
Thanks for everyone's feedback.
Wanderer- I totally agree with you. Here's why I want to? First, The client wants it. Second, our users are not the most technical savvy users so posting to a forum will likely be new, Finally, we're a new forum. In the beginning, it's nice to just get the conversation going. Then, once the discussion posts reaches critical mass, I'll shut off the guest's ability to post new discussions.
For Spam, I was thinking of integrating akismet.com 's Web Service as an extenion to assist with Spam checks. I might do this anyway. If I do I'll try to add that to extension list. We'll see.
If spam became more of an issue, I would add more of an intrusive method such as use reCaptcha or one of the other Captcha methods combined with some unintrusive spam checks like require email addresses (use dns and mx entries to make sure they are real) and honeypot techniques to set-up for spam automators.
timfire- This exactly what I was worried about. I was wondering if it was a technical issue or not. Like I said I have not delved into the source code much, I was hoping someone else had done this so I did not want to have to recreate the wheel.
Minisweeper - good work on what you did. It's excellent, and does just what you say you do. Although, I had an a little error with install (I did not read the read me, I just looked at the code). I installed GuestPost 1.4 in my extensions when it needs to be GuestPost.
Minisweeper- Huh? What don't you understand? Now, I'm confused.
Basically, I want Guests to have the ability to create new Discussions, and it looks like no one has done it and given it back to the community (save for marikka).
It looks like I'll have to dig into it and see how difficult it will be.
Otherwise, The first part of my response was in response to wanderer who said don't give Guests the ability to posts new discussions because of spam. My thoughts are there are ways to make it so that spam can be limited even if they have the ability to create new discussions.
As for my error, the javascript file for your captcha was specifically looking for a directly in the /extensions/GuestPost .
I had my extension in the folder: /extensions/GuestPost 1.4
Consequently, the captcha did not work at first. This would have been solved if I just read your readme and followed the directions which said install the extension into a folder named; GuestPost.
Just can't get it to work!
I've followed all the steps. Created an account with un=Guest and pw=1234 (example), then changed the fields GuestPost 1.4 default.php file to match those. When I try to post as a guest I get the error mentioned throughout the threads here:
Some problems were encountered
You do not have permission to add comments to discussions.
I saw HTML formatter mentioned, so I installed that too - still doesn't work. Help? Am I missing something?
edit: I also don't see any CAPTCHA on the guest post.
Just checking back on this...thought I would see if anyone figured out the problem.
I'm using the Default Vanilla theme with Vanilla 1.1.4. The captcha doesn't show on mine either and I only get the above mentioned error when I try to guest post.
Here's a live link to my forum, but I'll be playing around with Guest Post and other extensions over the next couple of days so I might solve the issue. If I do, I be sure to repost.
http://www.lascrucesclicks.com/forums/pets/comments.php?DiscussionID=43&page=1#Item_0
Comments
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •I think this might be solved by using CategoryRoles and by using some new role for the guest user.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Now I'm not sure if $CommentGrid is available when default.php is called by core. If you filter it by category id in a delegated function, it is available.
If you want the guest post form to be displayed on a certain category only, you have to add the CategoryID filter into the condition (on line 33):
&& ($CommentGrid->Discussion->CategoryID == 5)
where 5 is CategoryID of category you want the guest form to be displayed only at.
So the code looks like this
function CommentGrid_ShowGuestPostForm(&$CommentGrid) {
if ($CommentGrid->ShowForm == 0
&& $CommentGrid->Context->Session->UserID == 0
&& ($CommentGrid->pl->PageCount == 1 || $CommentGrid->pl->PageCount == $CommentGrid->CurrentPage)
&& ((!$CommentGrid->Discussion->Closed && $CommentGrid->Discussion->Active && ($CommentGrid->Discussion->CategoryID == 5)))
&& $CommentGrid->CommentData ) $CommentGrid->ShowForm = 1;
}
you can add more categories by adding this:
&& (
($CommentGrid->Discussion->CategoryID == 5) ||
($CommentGrid->Discussion->CategoryID == 6) ||
($CommentGrid->Discussion->CategoryID == 7)
)
where 5, 6, 7 are ids of categories where it is going to be displayed
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •I would have myself tried to use a config table for non PHP techies. Those snippets are not tested (thanks to Klip for the pre-work):
// among config items
// This array contains the discussion ids where you want to show the GuestPost form
$Context->PassThruVars['CategoriesForGuestPost'] = array(5,6,7);
// instead of Klip's hack
//...
// was ...($CommentGrid->Discussion->CategoryID == 5)...
// now is ...in_array($CommentGrid->Discussion->CategoryID, $Context->PassThruVars['CategoriesForGuestPost'])...
//...
NOTE: We may need $CommentGrid->Context instead of $Context here.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •I just think inarray() should be in_array()
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •The requested username and password combination could not be found.
You do not have permission to add comments to discussions.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Posted: Friday, 28 December 2007 at 9:38AM
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •thanks!
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •define('GuestUsername', 'Guest');define('GuestPassword', '12345');
I just checked with incorrect entries and I got the same error as you, then I corrected the entries and it works again.
Later: If you are using CAPTCHA, are you sure you entering the correct code?
Posted: Saturday, 29 December 2007 at 9:01AM
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •on the Readme, when you state "you will need to set up a guest
account if you do not already have one" Do i have to to create a new role? for example "Guest" or Register an account, like a regular user? user"Guest" & pass"12345" and put that info on the default.php?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Nobody will actually use this account directly, the GuestPost add-on will do all the work of signing in unregistered visitors using this account, that's why it needs the username/account details.
Posted: Saturday, 29 December 2007 at 10:07AM
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Thank you for your help. I was using the new role option. Is working flawless now.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Now with Guest Post I get an attempt maybe once every 2 months but my members jump on it quickly, notifying me and it gets deleted, they soon give up, it's too much trouble for them.
Besides, you want people to register don't you? Dangling the "new discussion" carrot is a good way to do it.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Obvious it can be done, but it makes things more complicated.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •