1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

What do I have to do?

Discussion in 'XenForo Development Discussions' started by Mr. Goodie2Shoes, Nov 13, 2011.

  1. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    okay... most of the regarding the add-on is done... now I need to add an option in the Node editing page in ACP... what do I have to do...
     
  2. Fuhrmann

    Fuhrmann Well-Known Member

    You mean, in here:

    4.png

    ?
     
  3. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    Yes! :D

    btw, Furhmann... didn't ask you this question cuz I dont wanna ask too much from one person only :p :oops:
     
    Fuhrmann likes this.
  4. Fuhrmann

    Fuhrmann Well-Known Member

    That's ok! ;)

    To add an option in there, you need to create a code event listener using the template_post_render OR template_hook if the template have a hook.

    If you want to add an option in the forums edit page, you need to look for a hook inside the template forum_edit. This is an admin template, so you will look for it in the "Development" tab and then "Admin Templates".

    After you take a look and realize that there is a hook, you create a code event listener to the template_hook and add your option.
     
  5. Fuhrmann

    Fuhrmann Well-Known Member

    If you want to add a new tab, you can use the hook admin_forum_edit_tabs. This hook is in the admin template forum_edit.

    You can use the hook admin_forum_edit_panes, forum_edit_basic_information or admin_forum_edit_forum_options! There is a plenty of hooks in there. Take a look and try something.
     
  6. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    okay thanks I'll look into it :)
     
  7. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    okay... I think this is the last question :D

    How do I add the code which will add the content to a row called "blah" in the table "xf_node"?
    Note: I have already added the code to create the new row in the add-on installation file...
     
  8. dmnkhhn

    dmnkhhn Active Member

    Take a look at the DataWriter, that's where the magic happens. ;)
    The _setFields()-method is where you define the new column and you can then use the DataWriter (inside the controller) to save the information to the database.

    Sorry, I don't have access to the code right now but that should give you a hint. :)
     
  9. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    okay thanks... I'll look into it...
     

Share This Page