I have written up a tutorial on how to customize content managers (the
administrative interface forms for editing entities). The article is
here:
http://apps.carleton.edu/opensource/reason/developers/docs/content_managers/
Hope you find it helpful; please let me know if you have any questions.
-- Matt
On Thu, Nov 12, 2009 at 12:11 PM, Nathan White <
na...@natewhite.com> wrote:
> Hi Melissa -
>
> I think what you'd probably want to do is to make a custom version of the
> publication content manager. In that custom version, you can set comments to
> be off by default, and make the field visible only to administrators. Then
> only you and Matt would be able to change that setting on a blog.
>
> I don't think we have any online resources about creating a custom content
> manager so ... Matt Ryan is going to work on one and we'll post it within a
> week or so. Here is the broad outline:
>
> First you would create a file in your local area that extends the existing
> blog.php content manager - call the class BeloitBlogManager or something,
> and the file beloit_blog.php.
>
> In your BeloitBlogManager class you want to overload the method alter_data()
> - it should first call parent::alter_data() to do the normal customizations
> of the original content manager, and then do its customizations to the
> comment element(s). You probably want to check if the element allow_comments
> has a value, and if not, set its value to "false".
>
> You can check if the logged in user has privileges for advanced options like
> this:
>
> if(reason_user_has_privs( $this->admin_page->user_id,
> 'edit_form_advanced_options'))
>
> If the user does not have that privilege (and thus is not an admin), you
> probably want to change the comment fields to be hidden using the
> change_element_type disco method.
>
> After you've setup your custom content manager, you go to the Master Admin
> site and edit the "Blog" Type. You should then see your custom content
> manager in the list of content manager options and you can select it. The
> result should be something where comments default to being turned off and
> non-admin users do not have the ability to change that option.
>
> Nate
>
> On Thu, Nov 12, 2009 at 10:48 AM, Melissa <
melis...@gmail.com> wrote:
>>
>> Hello all,
>>
>> We'd like to disable comments for all blog/publication types either
>> globally or (ideally) on a site by site basis at the admin level.
>> Anyone have any thoughts on how to go about doing this?
>>
>> Melissa
>>
>>
>
>
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups
> "Reason Discussion" group.
> To post to this group, send email to
reason-d...@googlegroups.com
> To unsubscribe from this group, send email to
>
reason-discuss...@googlegroups.com
> For more options, visit this group at
>
http://groups.google.com/group/reason-discussion?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
>