Forums / Cotonti / Extensions / Pages for guests - new plugin

Allow guests to submit pages, protected with CAPTCHA

ez
#32863 2012-01-21 21:18

@foxhound:
The rights for pages are actually all in the sed_auth table..

I quickly looked:
`sed_auth` (`auth_id`, `auth_groupid`, `auth_code`, `auth_option`, `auth_rights`, `auth_rights_lock`, `auth_setbyuserid`)
 

You probably need to unlock the group by changing the auth_rights_lock value...
And then you can probably change the rights via the admin panel....
The default grp_id for guests is '1'...

So try to change that auth_rights_lock for 1 article category and see if your red cross for the 'W' part dissapear in admin panel.

ow yeah its binary so calculate the new value by using this:
    $mn['R'] = 1;
    $mn['W'] = 2;
    $mn['1'] = 4;
    $mn['2'] = 8;
    $mn['3'] = 16;
    $mn['4'] = 32;
    $mn['5'] = 64;
    $mn['A'] = 128;

you prob need to clear bit 'W' so substract 2 from the value in the database !

By the way,,, i havent looked where the default locking for pages come from... yet...
 

Small update on the locking.... i found it..
It is HARDCODED inside a function to make new pagecategories locked...

its in functions.admin.php look for function called: sed_structure_newcat

look at this bit:

               if ($v['id']==1)
                {
                    $ins_auth = 5;
                    $ins_lock = 250;
                }

That is your default locking (red crosses thing.... in admin panel) change $ins_lock value (prob to 248) and new cats can be unlocked for guests to WRITE ub.

Good luck !

 

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, 12 years ago)