Announcement

Collapse
No announcement yet.

Help. To use or create a template.

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

  • Help. To use or create a template.

    I've created a custom page. The problem I'm having is making the page look like my forum. In vb 2.x I used the following line

    eval("dooutput(\"".gettemplate("header")."\");");

    In vb3 it does not work. Does anyone have a quick solution or do I have to create my own template. If so any tutorials?
    Last edited by musclenexus; Fri 19 Sep '03, 10:17pm.
    Canadian Bodybuilding | Canadian Bodybuilding Forum

  • #2
    vB3 uses different functions to vB2.

    To output a template, it would be;
    PHP Code:
    eval('print_output("' fetch_template('templatename') . '");'); 
    To fetch a template, then call it with a variable, you'd use
    PHP Code:
    eval('$variable = "' fetch_template('templatename') . '";'); 
    (You also have to require other stuff as well)

    Comment


    • #3
      I do this
      eval('print_output("' . fetch_template('header') . '");');

      and only the header shows. No colors or anything. Not even my 20 members (which works on a plain page)

      Any other help?
      Canadian Bodybuilding | Canadian Bodybuilding Forum

      Comment


      • #4
        It would be something like this IIRC
        PHP Code:
        <?php 

        error_reporting
        (E_ALL & ~E_NOTICE); 

        require_once(
        './global.php'); 
         
        eval(
        '$variable = "' fetch_template('templatename') . '";'); 

        eval(
        'print_output("' fetch_template('templatename') . '");'); 

        ?>

        Comment


        • #5
          I'll see what I can do with that. Thanks.
          Canadian Bodybuilding | Canadian Bodybuilding Forum

          Comment


          • #6
            Hmmm, seems like I'm not understanding this. Time to open up a book.
            Canadian Bodybuilding | Canadian Bodybuilding Forum

            Comment


            • #7
              Got it, thanks
              Canadian Bodybuilding | Canadian Bodybuilding Forum

              Comment


              • #8
                No problem

                Comment

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