Announcement

Collapse
No announcement yet.

how to include PHP in temaplates

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

  • #16
    PHP Code:
    // Deprecated as of release 4.0.2, replaced by global_bootstrap_init_start
    ($hook vBulletinHook::fetch_hook('global_start')) ? eval($hook) : false
    so try global_bootstrap_init_start

    Comment


    • #17
      I usually write my includes differently than you:

      PHP Code:
      include('../inclusion/inclusion.php'); 
      You may want to start doing some debugging of your own to figure out exactly what is going on. Add something like this:

      PHP Code:
        $includedphp ob_get_contents();
      $includedphp '<div>Hello World!</div>';
        
      ob_end_clean();
      vB_Template::preRegister('ad_global_below_navbar',array('includedphp ' => $includedphp)); 
      See if that prints out. Then go backwards through the code and keep adding things like that to see where it's failing.

      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 vbulletin.org
      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

      Comment


      • #18
        thx lynne, i try with your code, nothing appear
        Justoverclock.com

        Comment


        • #19
          i try for hour……nothing….
          Justoverclock.com

          Comment


          • #20
            Very strange that it's not working.

            Are you sure, that you're adding it in the right STYLE ? (if you have not only the standard style)

            Comment


            • #21
              yes my skin is called JUSTWHITE, and i put the code into ad_global_below_navbar in the JUSTWHITE template

              and i've try also in header and footer but without result
              Justoverclock.com

              Comment


              • #22
                Try using "process_templates_complete" and add it like this instead of preregistering it:
                PHP Code:
                $ad_location['global_below_navbar'] .= $includedphp

                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 vbulletin.org
                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

                Comment


                • #23
                  GREAT.....NOW WORK


                  some little problem....

                  the inclusion appear below the AD unit: see http://forum.justoverclock.com
                  (i would replace the actually news box)

                  how can i make the url seofriendly? (like my homepage?)
                  Last edited by markoxaser; Sat 6 Nov '10, 1:27pm.
                  Justoverclock.com

                  Comment


                  • #24
                    I see some stuff above the ad - so did you change to code to fix that? The URLs look fine also. Can you give an example of what you want to change and to what?

                    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 vbulletin.org
                    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

                    Comment


                    • #25
                      No no the box You see Now is with java....if i put My inclusion (Now disable) the url are not rewrited and all appear below the ad
                      Justoverclock.com

                      Comment


                      • #26
                        Then try this instead:
                        PHP Code:
                        $ad_location['global_below_navbar'] = $includedphp $ad_location['global_below_navbar']; 
                        As for URLs, look up the function fetch_seo_url. If you need further help with that, please post on vbulletin.org

                        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 vbulletin.org
                        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

                        Comment


                        • #27
                          THX LYNNE now is perfect!!! i have only the problem for mod rewrite...GREAT, THX!

                          i've tried to put an htaccess from wordpress root into inclusion folder but the url are always not rewrited, how can i use the rewrite url?
                          Justoverclock.com

                          Comment


                          • #28
                            .htaccess is not used to actually change the url in the page - it is used to redirect a user when they put an old url into the browser url box. I don't know anything about wordpress, so I can't help with any issue regarding it.

                            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 vbulletin.org
                            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

                            Comment


                            • #29
                              ok and i have vbseo, is possible to use vbseo to rewrite this url?
                              Justoverclock.com

                              Comment


                              • #30
                                I don't know, as I don't know vbseo either. Try asking that question on their support forums.

                                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 vbulletin.org
                                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

                                Comment

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