Allow guests to submit pages, protected with CAPTCHA
foxhound |
|
---|---|
I am trying to make my first "own" plugin, I am using the com4guest plugin as a base (dont worry, when released I will credit them for all the original work).
Right now I am stuck, I need to give guests write acces to pages (so they can actually submit a page) and I read to be able to do that I need to change the database value. I have been looking at the database for a while but have no idea what value it is and where it is. When all works guests should be able to submit pages and the CAPTCHA will prevent spammerts to misuse this feature. If a dev reads this and already knows this will never work feel free to tell me to not futher waist my time :)
I am making this plugin since a new site we have has registration disabled (except for staff), however we allow guests to comment on news and pages and it would be nice if guests could also submit pages.
PS: this is for Genoa! <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
|
This post was edited by foxhound (2012-01-21 16:10, 13 years ago) |
fade2k |
|
---|---|
Hmm, I'd look at pages and comments for guests for relevent db information + permission info. It might be wise to record names / emails / websites with page submissions too. Although, I don't have a use for something like this - I don't understand why one can't just change permissions to allow guests to submit pages in general (or for page comments for that matter!). - Be Kind, Please Rewind -
|
ez |
|
---|---|
@foxhound:
You probably need to unlock the group by changing the auth_rights_lock value...
you prob need to clear bit 'W' so substract 2 from the value in the database !
Small update on the locking.... i found it.. its in functions.admin.php look for function called: sed_structure_newcat look at this bit:
if ($v['id']==1)
p.s. I couldnt believe that this is hardcoded.... not very friendly ==- I say: Keep it EZ -==
|
|
This post was edited by ez (2012-01-21 21:36, 13 years ago) |
foxhound |
|
---|---|
Thanks for the info EZ, I had some time to further dig into this and thanks to your help I did manage to get a lot further now. But, I cant get my CAPTCHA to work, the page will be submitted even though the code has not even been entered. This is what I have in my page.add.tpl: <tr> <td colspan="3" class="valid"> <!-- IF {PHP.usr_can_publish} --> <input name="rpublish" type="submit" class="submit" value="{PHP.L.Publish}" onclick="this.value='OK';return true" /><input type="submit" value="{PHP.L.Putinvalidationqueue}" /> <!-- ELSE --> {PHP.L.User}: {PAGE_OWNER} {PAGE_VERIFY_IMG}: {PAGE_VERIFY} <input type="submit" value="{PHP.L.Submit}" /> <!-- ENDIF --> </td> </tr>
The whole verify thing is completely ignored. I guess it has to do with the fact that the "submit" is folowed no matter a valid CAPTCHA code or not. <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
ez |
|
---|---|
Your answer lies in the captcha code... did you installed captcha manager and the right captcha ?.
Also maybe captcha was not used for pages ??? ==- I say: Keep it EZ -==
|
foxhound |
|
---|---|
I am using math captha on that site and the captcha manager is installed even though I am not sure its required sine I use only 1 captcha.
Originally no, thats what I am making :) In page4guests.validate.php: /* ==================== [BEGIN_SED_EXTPLUGIN] Code=pages4guests Part=validation File=pages4guests.validate Hooks=page.add Tags= Order=10 [END_SED_EXTPLUGIN] ==================== */ page4guests.tags.php /* ==================== [BEGIN_SED_EXTPLUGIN] Code=pages4guests Part=page.tags File=pages4guests.tags Hooks=page.add.tags Tags=page.add.tpl: {PAGE_OWNER}, {PAGE_VERIFY_IMG}, {PAGE_VERIFY} Order=10 [END_SED_EXTPLUGIN] ==================== */ Maybe I should change Part=validation in page4guests.validate.php to Part=submit? But again, I have no idea what I am doing :) <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|
ez |
|
---|---|
I should really have to dive into pages combined with captcha... but i cant :( I have very little time... ==- I say: Keep it EZ -==
|
foxhound |
|
---|---|
Well, thanks anyway for the help EZ, I appreciate it. No plugin for this than. I guess I just enable page submission for guests by default and the admins can sort the spam. <img src="http://www.armaholic.com/datas/thumbs/green-sea-battalion-uniforms-version-03-preview_4.jpg" alt="green-sea-battalion-uniforms-version-03-" />
|