Hook Node Permission Manager

Vincent Gabriel

Active member
Is there any way to hook into the node permission manager without actually modifying any files or templates. I am talking about adding another input field in the following location:

Screen Shot 2014-01-11 at 12.01.15 AM.webp

Thank You.
 
Here is another one, How would you add aN html field in the forum edit screen? something like a plain text field or a text box?

In this section:

Screen Shot 2014-01-12 at 9.55.45 PM.webp

Thank You.
 
You can use data type string or a named template.

Thanks, I tried searching for named template got one result but it was talking about the admin style properties in particular. I am not sure how the data type string is used, Searching for that came up with nothing.

Thanks Again.
 
If you would like to create a style property, it is basically the same steps as the permissions, just within the style properties section.
 
If you would like to create a style property, it is basically the same steps as the permissions, just within the style properties section.

The thing is that i don't want to create a style property. In this case i'd like to add an additional field right under the Description field in the screenshot above. When that form is saved it should save the additional field i'll add as well. I assume i'll need to add a field to the xf_forum table for that work that way. I am just not sure how to get the field in there, make it save when the form is saved, and how to properly add an additional column to the table.

Thanks again.
 
That's a bit more involved. You'll need to utilize an admin template edit to add the field to the page, and then modify the datawriter's & controllers via the Class Proxy System to save and retrieve the information.
 
That's a bit more involved. You'll need to utilize an admin template edit to add the field to the page, and then modify the datawriter's & controllers via the Class Proxy System to save and retrieve the information.

By admin template edit you mean i'll have to actually edit an existing template? i'm not going to be able to do this using a hook for example?
 
By admin template edit you mean i'll have to actually edit an existing template? i'm not going to be able to do this using a hook for example?

There should be a hook available. First you need to find the template that is being called. Look under development - admin templates. I'm on my phone so I can't give you the exact name but there is most likely a hook in there.

As for the db field it is recommended to prefix your field as to avoid conflict. Then as Jeremy said, you'll have to extend the data writer the same way you did the controller or model (I forget which but I remember you doing it from one of your posts).
 
By admin template edit you mean i'll have to actually edit an existing template? i'm not going to be able to do this using a hook for example?
Im sure Jeremy was referring to TM's/ATM's/ETM's. Admin templates have their own 'Admin Template Mods' just like Templates (frontend) and Email Templates do. I'd suggest using ATM's for what you want to do instead of hooks as hooks have been depreciated.
 
There should be a hook available. First you need to find the template that is being called. Look under development - admin templates. I'm on my phone so I can't give you the exact name but there is most likely a hook in there.

As for the db field it is recommended to prefix your field as to avoid conflict. Then as Jeremy said, you'll have to extend the data writer the same way you did the controller or model (I forget which but I remember you doing it from one of your posts).

Got it. Yeah i extended the controller not the model or data writer yet. Thanks.

Im sure Jeremy was referring to TM's/ATM's/ETM's. Admin templates have their own 'Admin Template Mods' just like Templates (frontend) and Email Templates do. I'd suggest using ATM's for what you want to do instead of hooks as hooks have been depreciated.

Thank You. I'll do some research for the admin template modifications.
 
Back
Top Bottom