Announcement

Collapse
No announcement yet.

what is a hook?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • what is a hook?

    with the release of the new 3.5.0 beta versions all everyone is ever talking about are the hooks. i've tried searching this forum for anything hook related but came up with nothing. can someone please give me some insite on what hooks are what their purpose is?

    thanks in advance,
    warren

  • #2
    Previously, if you wanted to add a feature in, you'd have to change the code (a.k.a "hacking" the code). With vB 3.5, the developers added in numerous places that are like little insertion points. In the Admin CP, you can specify which insertion point you want, give it some code you want to execute, and then whenever this point is reached through the execution of the script/page, that insertion point will be populated with your code and the code will be executed. So basically, a hook is a place in the code that allows for code insertion without actually changing the files, you can do it all through the Admin CP.
    Bugdar: PHP bug tracking software that is beautiful, fast, and robust.

    Comment


    • #3
      a hook is what pirates have as hands, or what you can use to put on the end of fisihing wire to catch fish

      Comment


      • #4
        In general, a hook in any code lets a product execute external code at a specific program state. The same applies to vB 3.5: for example, a hook could execute external (third-party) code when posting a thread.
        --filburt1, vBulletin.org/vBulletinTemplates.com moderator
        Web Design Forums.net: vB Board of the Month
        vBulletin Mail System (vBMS): webmail for your forum users

        Comment


        • #5
          thank you guys for the quick reply and for the information. hooks sound awesome and they will definately make it easier to "hack" the .php files and also cause less error incase you over write or delete something by accident while "hacking" .php files conventionally.

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X