vBulletin 5.2.0, PHP Hooks and You.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 74122

    vBulletin 5.2.0, PHP Hooks and You.

    vBulletin 5.2.0 adds PHP Hooks to the system. While the basic system is in place, we need to know where you would like the hook locations to be within the processing of the code. We can't just replicate every vBulletin 4.X hook due to changes in the template structures. If you're interested in developing vBulletin 5 addons, we're asking you were good places to put the hooks would be.

    Please download the current Alpha of vBulletin 5.2.0 and let us know where you would like them to be placed. Create a separate entry in JIRA for each request.

    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API
  • napy8gen
    Senior Member
    • Jul 2001
    • 525
    • 6.X

    #2
    Better late than never -

    I hope you guys consider more aggressive approach in attracting developers to come back.
    Email them. Ask vbulletin.org to collect emails of former developers who left and still developing.
    Give them discount to vb5 copy or free developer copy of vb5.
    Get Our vbulletin 6 themes

    Comment

    • William Thomas Jr
      Senior Member
      • Nov 2014
      • 526
      • 5.1.x

      #3
      Originally posted by napy8gen
      Better late than never -

      I hope you guys consider more aggressive approach in attracting developers to come back.
      Email them. Ask vbulletin.org to collect emails of former developers who left and still developing.
      Give them discount to vb5 copy or free developer copy of vb5.
      The impression I get from sites like Theadminzone, is that Vbulletin has burnt down the bridge spanning developers and Internet brands. Vbulletin is going to have to construct a new bridge, working to repair relationshiops through incentives for these disgruntle and bitter developers to come back.

      Personally, I like VB 5, the only complaints I have are the lack of 3rd party products. Glad to see that VB is doing something now, but hopefully they will do enough. One of the threads in Theadminzone concerns the volatile environment in Xenforo, a software company a lot of VB users went to. If they are so volatile to people of their own product base, well, good luck with bringing them back!

      Comment

      • Mark.B
        vBulletin Support
        • Feb 2004
        • 24287
        • 6.0.X

        #4
        Please can we keep this thread specificlly for suggestions for hook locations in vB5....many thanks.
        MARK.B
        vBulletin Support
        ------------
        My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
        My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

        Comment

        • William Thomas Jr
          Senior Member
          • Nov 2014
          • 526
          • 5.1.x

          #5
          Please excuse my post Mark. I thought it relevant to address "the silence" from developers which seems to be louder than words.

          Point taken.

          William

          Comment

          • Brad Padgett
            Senior Member
            • Jul 2014
            • 420
            • 5.1.x

            #6
            EDIT: Nevermind. You can erase this post
            "Do not go where the path may lead, instead go where there is no path and leave a trail." - Ralph Waldo Emerson

            Comment

            • In Omnibus
              Senior Member
              • Apr 2010
              • 2310

              #7
              Originally posted by Wayne Luke
              vBulletin 5.2.0 adds PHP Hooks to the system. While the basic system is in place, we need to know where you would like the hook locations to be within the processing of the code. We can't just replicate every vBulletin 4.X hook due to changes in the template structures. If you're interested in developing vBulletin 5 addons, we're asking you were good places to put the hooks would be.

              Please download the current Alpha of vBulletin 5.2.0 and let us know where you would like them to be placed. Create a separate entry in JIRA for each request.

              http://tracker.vbulletin.com/secure/...1&issuetype=12
              Where are we on this? I'm still unclear on if vB5 has any hooks. Is there a list of these? Is it still open for JIRA requests?

              Comment

              • Wayne Luke
                vBulletin Technical Support Lead
                • Aug 2000
                • 74122

                #8
                vBulletin 5 does have PHP hooks. Your hooks would be stored in the /core/packages folder. They aren't stored in the database like vBulletin 4 because that has proven to be insecure on several occasions. Especially if an attacker gains access to the AdminCP. You can see the list of PHP Hooks in the /do_not_upload/development/hooks.txt folder. We even include a test package that provides sample code.

                If you have a specific location in the code where a PHP hook would be beneficial, then a JIRA would be appreciated. Make sure to mention that a PHP hook is requested and the more specific, the more likely it is to get implemented. Also note that vBulletin 5 can be extended using PHP Classes to extend the API, Template Hooks, Templates can call API functions directly, and developers can add new modules (and/or pages) with their own specific functionality.
                Translations provided by Google.

                Wayne Luke
                The Rabid Badger - a vBulletin Cloud demonstration site.
                vBulletin 5 API

                Comment

                • glennrocksvb
                  Former vBulletin Developer
                  • Mar 2011
                  • 4021
                  • 5.7.X

                  #9
                  In Omnibus, I have an open JIRA request to add PHP hooks for posts. Vote for it.


                  Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

                  Comment


                  • In Omnibus
                    In Omnibus commented
                    Editing a comment
                    Voted. Watching. Hoping.
                • glennrocksvb
                  Former vBulletin Developer
                  • Mar 2011
                  • 4021
                  • 5.7.X

                  #10
                  To add to what Wayne Luke mentioned, you can also create custom modules (that you cam also drag and drop in Sitebuilder) without modifying existing templates or PHP files. I've done that in some of the mods I created.

                  Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

                  Comment

                  • In Omnibus
                    Senior Member
                    • Apr 2010
                    • 2310

                    #11
                    Originally posted by Glenn Vergara
                    To add to what Wayne Luke mentioned, you can also create custom modules (that you cam also drag and drop in Sitebuilder) without modifying existing templates or PHP files. I've done that in some of the mods I created.
                    Here's what I'm looking at doing: Taking a handful of the most popular vB4 mods and writing them for vB5. The problem is I really don't know what I'm doing. I've only coded for vb4 and then only for myself or a very few customers. In vB4 it was possible to write a simple mod using nothing more than XML. In vB5, not so much. I figured I'd start with a very simple one that is in high demand but is out of code. First I'll try to get it working and then I'll see what functionality or features I can add to it without breaking it. This particular code is not marked reusable so I'm starting from scratch and winging it. I'm not even sure if I need to use hooks for this mod or where but it's good to know they exist in certain locations just in case.

                    Is the API really that confusing that virtually every third party developer abandoned ship over the lack of hooks?

                    Comment

                    • glennrocksvb
                      Former vBulletin Developer
                      • Mar 2011
                      • 4021
                      • 5.7.X

                      #12
                      Originally posted by In Omnibus
                      In vB4 it was possible to write a simple mod using nothing more than XML. In vB5, not so much.
                      That's still possible in vB5 as long as the API you need and you're​ calling from the template exists. If not, then you'd have to extend the API or create your own frontend controller both of which you can also directly call from the templates.

                      There may be cases the API you need exists but you need further processing or logic that you can't do in the templates. vB template syntax (<vb:xxxx> or {vb:xxxx}) is limited and not all PHP syntax and functions have corresponding vB template syntax tags. In that case you'd have to extend the API or create your own frontend controller and call the existing API and do the additional logic from there.

                      Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

                      Comment

                      • Wayne Luke
                        vBulletin Technical Support Lead
                        • Aug 2000
                        • 74122

                        #13
                        vBulletin 4.X was mostly procedural code. This allowed you to do a lot of things inline via hooks. If the variable was available or you could run a query to get the data, it was open. As such many of the Addons are very "hackish" in a brute force kind of way. This is easier to program.

                        vBulletin 5 is class based. So you have to worry about the state of the class, where you are in the code and how to retrieve variables from other classes. It is more complicated and the simple ways used in vBulletin 4.X will not always work.
                        Translations provided by Google.

                        Wayne Luke
                        The Rabid Badger - a vBulletin Cloud demonstration site.
                        vBulletin 5 API

                        Comment


                        • In Omnibus
                          In Omnibus commented
                          Editing a comment
                          I picked up on this somewhat from looking at some of the existing add-ons and template modifications code. Is it possible to create classes or are we limited to the existing ones?

                        • Wayne Luke
                          Wayne Luke commented
                          Editing a comment
                          You can create your own classes in your Packages. You can extend many of the existing classes with your own methods.

                          My site has the Mobile API mapped out here: http://vb5support.com/resources/mapi/
                          And the full API mapped out here: http://vb5support.com/resources/api/

                          This is based on the inline documentation and there may be places where it isn't fully documented.

                      Related Topics

                      Collapse

                      Working...