Extending Node Options in the Default Edit Node View

Jawsh

Active member
What exists: http://i.imgur.com/l68Vyvf.png
What I want: http://i.imgur.com/8CDTqVL.png

What I have:
1. I've created the add-on.
2. I've set up an Install.php with SQL containing a table details to store the information.

There's a couple more settings I want to add for this (such as a select where to display the rules, on top of all pages / thread list / only when posting / posting new thread / posting reply ), but if I can just figure out the hooks for the Zend/XenForo classes I can probably handle the rest myself.
 
Step 1: You need add new column into xf_forum
Step 2: You need using an hook (you can find it on template forum_edit *ACP) to display your fields.
Step 3: Extends xf_forum and save data from input :)
 
Step 1: You need add new column into xf_forum
Step 2: You need using an hook (you can find it on template forum_edit *ACP) to display your fields.
Step 3: Extends xf_forum and save data from input :)
Hey, I'm getting very close, I just have one more question. To pass more data into the view, I need to modify this class:

XenForo_ControllerAdmin_Forum

I assume that actually touching that PHP file is hacky, so what's the proper way to modify the returns of some methods? Can I just extend this class & overload the methods to have it "just work"?
 
I'm getting kind of annoyed, because it's taking hours to get every step figured out and then the next step is immediately a total blockade. Information is very hard to find for something that is relatively simple.

WcklOjK.png


I now have a living event listen. It hooks on both template_create (hijacking forum_edit) and load_class (looking at XenForo_Model_Forum).

What I need now is the ability to include Ash_ForumRules_Model_ForumRules and Ash_ForumRules_DataWriter_ForumRules when the respective _Forum_ models are loaded. xf_ash_forum_rules.node_id fks xf_forum.node_id

The gap is the model and inserting the data into the $params for forum_edit so that the templates can actually handle it... and then I guess I'll need to save it, too...

I have template hooks in this even though it's not visible. I think the <xen> helpers notice that the fields I'm requesting are not set so they ignore them.
 
Top Bottom