How to include external file?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • user 1-2-3
    Senior Member
    • Oct 2002
    • 210
    • 4.2.x

    How to include external file?

    Hi there,

    vB 4.2.3, PHP 5.6.30. I'm trying to include simple txt file into template navbar. I read documentation, but it doesn't work for me. I'm not sure where should I put this code:
    vB_Template::preRegister('FORUMHOME',array('includedphp ' => $includedphp));

    P.S. Couldn't find how to remove the smiles from the best forum software.
    Last edited by Wayne Luke; Fri 10 Nov '17, 10:04am. Reason: If you surround code with the [noparse], [code]. [html], or [php] bbcodes provided then it won't parse smilies in code. The last three are even provided on the editor menu.
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 73981

    #2
    Where you include a file depends on the scope that you want its contents to available. Going from your example, you should probably use one of the forumhome hooks under Plugins & Products -> Plugin Manager.

    Code:
        <hooktype type="forumhome">
            <hook>forumhome_start</hook>
            <hook>forumhome_event</hook>
            <hook>forumhome_loggedinuser_query</hook>
            <hook>forumhome_loggedinuser</hook>
            <hook>forumhome_complete</hook>
            <hook>forumhome_whovisited_list</hook>
            <hook>forumhome_whovisited_prelist</hook>
            <hook>forumhome_whovisited_postlist</hook>
            <hook>forumhome_whovisited_nonames</hook>
        </hooktype>
    You can find out more about registering variables and creating your own custom modifications at https://www.vbulletin.org.
    Translations provided by Google.

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

    Comment

    • user 1-2-3
      Senior Member
      • Oct 2002
      • 210
      • 4.2.x

      #3
      In version 3 it was clear how to include the external file. In 4x I don't know how to do that even after your answer. There is no clear manual how to do that. I've spent for vB $5K and every time I need to do something with it - I have a headache. Thank you.

      Comment

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

        #4
        vBulletin 3 and vBulletin 4 are not the same software. Where vBulletin 3 allowed any variable to be passed to a template in an insecure manner, vBulletin 4 requires that variables are registered and better adherence to scope is maintained. As with vBulletin 3, the documentation for customizing vBulletin 4 is available at https://www.vbulletin.org. There are hundreds of addons available. Reviewing them may help you. However, we've never provided support for customizing the code of the software. This is something that you do so at your own risk.

        Translations provided by Google.

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

        Comment

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