Author Topic: More and better hooks for posts and topics  (Read 2855 times)

Offline JohnR

  • Semi-Newbie
  • *
  • Posts: 22
More and better hooks for posts and topics
« on: February 15, 2012, 06:06:51 AM »
Hooks shouldn't just be about "integration" with some other platform. To grow, SMF needs (IMHO :) ) to better support customizations within posts and topics themselves. For example, if I want to add an extra field to the post form.
« Last Edit: February 21, 2012, 10:16:07 AM by Norv »

Offline Suki

  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,196
  • Kaizoku Jotei
    • MissAllSunday on GitHub
    • SMF mods
Re: More and better hooks for posts and topics
« Reply #1 on: February 15, 2012, 08:21:39 AM »
That will not really be a hook, since adding an extra field in the posting areas involves several files.  A hook, most of the times, is a simple line of code that appends content to an existing array.

Porting that idea to a form could be possible if such a form is generated via a form generator class, with a class if will be easy to build a method to add extra fields, you will just have to specify the parameters like the type, value, name and all that stuff. Of course this isn't possible with SMF at the moment.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Look at them. They're just asking for it. Maybe the human race deserves to be wiped out.