Page 1 of 1

PunBB / ProtectedPages

Posted: Tue Apr 11, 2006 11:09 pm
by tamlyn
First off thanks so much to sjg for making this mod. He may call it a hack but it's a pretty well designed hack - I just used the code from a heavily modded punbb 1.2.11, ran the function renaming script and it worked! I had to run it on each of the install_mod.php scripts and run them on the db too but it was still easier than modding another forum from afresh.

My problem though is that the page permissions in CMS don't seem to be working. I added the magic tag to the default template so all pages come under access control. I then ticked the permissions box for every page but one and for every group. However I can still view the restricted access page no matter whether i am logged in or not. The login works fine for punbb and the loginform is working fine (it shows my username when I am logged in) but the access control isn't.

Can anyone spot something I'm doing wrong? I can pm a link to the site if it would help.

Re: PunBB / ProtectedPages

Posted: Wed Apr 12, 2006 12:02 am
by tamlyn
OK, answered my own question. It seems you need to place markers in the content (or the template) for where you want the content to be protected:


and


I couldn't find any mention of that in the module help.

Also in PunBB.module.php in AuthorizeCMSGroup() around line 431 it should be $this->cms->variables['content_id'] rather than $this->cms->variables['page'] which is usually the page alias. I guess that's caused by an update to CMS since the mod was written.

Re: PunBB / ProtectedPages

Posted: Thu Apr 13, 2006 6:42 am
by sjg
Hi!

The PunBB is overdue for an update, but my top priority right now is to finish the FormBuilder, which is the next generation of FeedbackForms.

There are some problems with the PunBB module under 0.12 and 0.12.1, since it requires passing an "action=" type parameter for some functionality, and the module API lost support for that between 0.11.x and 0.12 -- but it got restored after 0.12.1 in SVN, and will doubtless be in 0.12.2 or whatever the next release is.

I still would prefer to do a true bridge between CMS Made Simple and PunBB rather than wrap it, but that's such a huge project that I'm afraid to even contemplate it. :P

Thanks,
___Samuel___

Re: PunBB / ProtectedPages

Posted: Thu Apr 13, 2006 12:29 pm
by tamlyn
sjg wrote: There are some problems with the PunBB module under 0.12 and 0.12.1, since it requires passing an "action=" type parameter for some functionality, and the module API lost support for that between 0.11.x and 0.12 -- but it got restored after 0.12.1 in SVN, and will doubtless be in 0.12.2 or whatever the next release is.
Where do those problems arise? It seems to be working OK for me at the moment though I havent' really tested it extensively. In any case I expect the next version of CMS will probably be out before this web job is due (end of the month).

Re: PunBB / ProtectedPages

Posted: Thu Apr 13, 2006 5:32 pm
by sjg
I haven't experienced them myself, so I don't know exactly...

But I suspect they would arise any time you need to pass a specific action via the cms_module tag, like to present a login form or something.

At this point, I should probably shut up until I've actually tested and found examples :)

Thanks,
___Samuel___