No announcement yet.

including an html file .. tried everything you have here but still not showing it.

  • Filter
  • Time
  • Show
Clear All
new posts

  • [Forum] including an html file .. tried everything you have here but still not showing it.

    Hi guys.
    I tried to include an html file
    This is my file it has some javascripts and other stuff. ( )
    I tried php include.
    I tried the $html = implode('', file('./newsslider/latest.html'));
    then pasted the line :$html in the header.
    Also tried to do <? echo $html; ?>
    Also tried the {vb:raw html}

    basically I gave up.. what happed to the days when we just php include in any php file ??
    so please help me in here.

  • #2
    You've never been able to just php include a file in vB, sorry!


    • #3

      yeah I meant in a normal php file not vb..

      However, I tried this and it did not work. I tried it before I posted.
      this is what i did.
      Created new global start plugin .. named it includedhtml then copied the code : $includedhtml = implode('', file('./newsslider/latest.html'));
      then copy pasted in header the code : {vb:raw includedhtml}
      i doesn't work .
      sure something I am doing is wrong but can't know what!


      • #4
        This sounds more like a discussion than a standard product aspect, as you are talking customising outside the scope of the software.


        • #5
          Totally not getting your point (?_?)


          • #6
            Totally not getting your point (?_?)
            Modifications, hacks etc. are dealt with over at


            • #7

              I wrote those instructions. I see they've been updated for vBulletin 4.

              Did you do the Registering variables bit?

              Are you sure that's the correct file path?


              • #8
                oh you are a life saver.. I thought that part was only for php things..

                Thanks a lot.


                • #9
                  I'm having the same issue.

                  where do you register the variable?


                  • #10
                    I'm doing the following:

                    Make a Plugin

                    vB_Template:reRegister('FORUMHOME',array('bbgeeksfooter ' => $bbgeeksfooter));

                    $bbgeeksfooter = "test";

                    Add to template

                    {vb:raw bbgeeksfooter}

                    This should be easy to do, but doesn't work?!


                    • #11
                      sure it doesn't.
                      First you have to make the variable

                      $bbgeeksfooter = "test";

                      then you register it where you wanna show it.

                      vB_Template:reRegister('FORUMHOME',array('bbgeeksfooter ' => $bbgeeksfooter));

                      that's all in the Plugin creation.
                      Then you go to where ever you wanna show it. for example" header "
                      you come the code

                      {vb:raw bbgeeksfooter}
                      in the header.
                      I would prefer that you register the Variable in the header too
                      ( means in plugin you should have the code:

                      $bbgeeksfooter = "test";

                      then you register
                      vB_Template:reRegister('header',array('bbgeeksfooter ' => $bbgeeksfooter));

                      that's if you want to show it in the header everywhere " inside the forum" because you might have to register it for the blog and the CMS too.

                      I hope what I've said helps. These guys helped me so I am ready to help you too.


                      • #12
                        thank you, helped me.

                        register the var AFTER you make the var.



                        • #13
                          No worries mate.


                          • #14
                            what's wrong with this code?

                            $wpnewshtml = implode('', file('wpposts.html'));
                            vB_Template:reRegister('header',array('wpnewshtml' => $wpnewshtml));


                            • #15
                              Impossible to tell since we don't have the big picture. We have no idea what hook location you are using, what you have added to the template, nor the contents of the file.

                              As said above, this is really a discussion more suited for, the modification site.

                              Please don't PM or VM me for support - I only help out in the threads.
                              vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                              Want help modifying your vbulletin forum? Head on over to
                              If I post CSS and you don't know where it goes, throw it into the additional.css template.

                              W3Schools &lt;- awesome site for html/css help


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