Announcement

Collapse
No announcement yet.

How to use compile_template function?

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

  • How to use compile_template function?

    I'm inserting some extra text via a extra handmade table which obviously doesn't use the template system. So unfortunately if conditions don't work with this table. I've found out the compile_template is needed for it to work, but I can't get compile_template to be able to work. $vboptions[bbtitle] stays $vboptions[bbtitle] in the browser output.

    I've tried all sorts, like:

    PHP Code:
    $content compile_template($query); 
    So, how can I use the compile_template function?

  • #2
    Please use www.vbulletin.org for help with this customization.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      Did you take a look at the function at all?

      Code:
      /**
      * Processes a raw template for conditionals, phrases etc into PHP code for eval()
      *
      * @param	string	Template
      *
      * @return	string
      */
      function compile_template($template, &$errors = array())
      You don't pass it a query.

      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 <- awesome site for html/css help

      Comment


      • #4
        Yes I have looked at that function, but I don't understand what exactly needs to be filled in for $template and &$errors

        Comment


        • #5
          $errors is optional. Just do a search in the files to find examples of how to use the function.

          If you need further help, you should post over on vbulletin.org, 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 vbulletin.org
          If I post CSS and you don't know where it goes, throw it into the additional.css template.

          W3Schools <- awesome site for html/css help

          Comment

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