Migration from vbulletin 3.8.9 plugin / hooks system

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tylererdie
    New Member
    • Aug 2016
    • 12
    • 3.8.x

    Migration from vbulletin 3.8.9 plugin / hooks system

    Hello,

    I have recently migrated to a VPS server that will not display my website anymore. on php 7.0
    I've been reading some general stuff here and noticed its not really supported anymore.

    I was wondering if anyone might be able to tell me how the global hook system / templates are done now on vbulletin 5 / connect.
    I have some custom pages that i need to port and i have no idea... where or what i have to do.

    if anyone could assist me i would appreciate.
  • Mark.B
    vBulletin Support
    • Feb 2004
    • 24286
    • 6.0.X

    #2
    No plugins from vB3 will work at all with vB5 - it's not a php compatibility issue, the code in vB5 is completely different.
    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

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

      #3
      To elaborate on Mark's answer.

      vBulletin 5 doesn't allow you to store PHP Hooks in the database. Instead it relies on extensions to PHP Classes to hook in to the code. We do have PHP hooks in vBulletin 5 but they are accessed in a more secure manner. Behind the scenes, the variables used are accessed in different manners as well. Many variables are private and can only be accessed via the built-in API. Again this is a change for security.

      Though, due to vBulletin 5's improved template engine and the inclusion of Template Hooks, you may be able to do a lot of things without PHP, even if they required it in the past. There have been a lot of changes to the core systems.
      Translations provided by Google.

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

      Comment

      • tylererdie
        New Member
        • Aug 2016
        • 12
        • 3.8.x

        #4
        Basically let me sum it up...
        Can I do anything like this?

        Display Last PK global_start [Edit] [Delete]
        Display Last Softcore PK global_start [Edit] [Delete]
        Last 10 Softcore PKs global_start [Edit] [Delete]
        Last 10PK global_start [Edit] [Delete]
        Latest Use global_start

        these global hooks were stored on the main forum index in the center of the page below the nav bar.
        I basically want to accomplish the same thing on vbulletin 5. Who could assist me? Or point me in the right direction.



        I use to make templates as well like this for custom pages.
        $stylevar[htmldoctype]
        <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
        <head>
        $headinclude
        <title>$vboptions[bbtitle] - PKLog</title>
        </head>
        <body>
        $header
        $navbar
        <div>
        <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%">
        <tr>
        <td class="tcat" colspan="2">
        PK Log
        </td>
        </tr>
        </table>
        $pk
        </table>
        </div>
        <br>

        $pagenav
        $footer



        </body>

        </html>
        Attached Files
        Last edited by tylererdie; Wed 6 Jun '18, 9:32am.

        Comment

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

          #5
          Can you create plugins and assign them to different locations? Yes.

          However, the way the plugins work has drastically changed over the last 15 years. That is how old the vBulletin 3 Plugin System is. There is no global_start hook. That isn't a concept that exists in vBulletin 5.

          Better questions would be "Can I do XXX on YYY Page?" or "How can I show something in the User Information Panel on a post?"

          Since you have a vBulletin 5 license on your account, I suggest you download and install it on a test server and get used to the system. Use SiteBuilder and the Module system (which includes PHP Modules) and see what can be done with it. Then when you have specific questions, come ask them. We will be able to provide much better help.
          Translations provided by Google.

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

          Comment

          • tylererdie
            New Member
            • Aug 2016
            • 12
            • 3.8.x

            #6
            But if i wanted to do what is attached in that attachment is that possible from a plugin or some other method?

            Comment

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

              #7
              As far as I am aware, there is a Shoutbox addon for vBulletin 5. The other information would need to be converted to work with vBulletin 5. I guess it would depend on your programmer's skills.
              Translations provided by Google.

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

              Comment

              • tylererdie
                New Member
                • Aug 2016
                • 12
                • 3.8.x

                #8
                OK i will have to install 5.0 and see what i can do. I'll ask more specific questions. Thanks

                Comment

                • tylererdie
                  New Member
                  • Aug 2016
                  • 12
                  • 3.8.x

                  #9
                  Sorry to bother you. But im getting Error: Call to undefined function mysql_query() in ..../global.php(400) : eval()'d code on line 8 any idea why?
                  on php 7.0 on VB 3.8.11

                  Comment

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

                    #10
                    You have to use mysqli with PHP 5.6 and higher. You need to update your config.php to use mysqli instead of mysql.
                    Translations provided by Google.

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

                    Comment

                    • tylererdie
                      New Member
                      • Aug 2016
                      • 12
                      • 3.8.x

                      #11
                      Actually lets... ask a specific question.
                      How do I disabled products / plugins without being able to login to the admin cp due to that error.
                      my plugins use mysql_connect which i guess doesnt exist anymore in php 7 and use pdo_mysql or mysqli to connect.
                      but ya still getting global.php(400)

                      Comment

                      • tylererdie
                        New Member
                        • Aug 2016
                        • 12
                        • 3.8.x

                        #12
                        I changed the config but same issue?

                        Edit... added this to config
                        define('DISABLE_HOOKS', true);

                        and site loads.
                        but i cannot determine which one is the problem.
                        any tips on that? or is this the process of elimination?
                        Last edited by tylererdie; Wed 6 Jun '18, 10:37am.

                        Comment

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

                          #13
                          Then one of your addons is using mysql directly. The mysql library doesn't exist in PHP 7.0. The addon will need to be updated.
                          Translations provided by Google.

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

                          Comment

                          • tylererdie
                            New Member
                            • Aug 2016
                            • 12
                            • 3.8.x

                            #14
                            Originally posted by Wayne Luke
                            Then one of your addons is using mysql directly. The mysql library doesn't exist in PHP 7.0. The addon will need to be updated.
                            using global disable all hooks in config file. what tips can you give me to track down the problem?

                            Comment

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

                              #15
                              Error: Call to undefined function mysql_query() in ..../global.php(400) : eval()'d code on line 8 any idea why?
                              on php 7.0 on VB 3.8.11
                              All described in the error message.

                              Open global.php in a "real" text editor like notepad++

                              Look at the hook that is evaled on line 400.

                              Update all plugins installed using the hook. It will be line 8 of the offending plugin.

                              Repeat as necessary for each subsequent error.

                              Or contact the developers of your addons and have them upgrade them for you.
                              Translations provided by Google.

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

                              Comment

                              Related Topics

                              Collapse

                              Working...