Announcement

Collapse
No announcement yet.

variables in templates?

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

  • variables in templates?

    hello,

    I have a problem with including variables into templates!

    if I define new variables in the phpinclude-template for example:

    PHP Code:
    // hide feature from unregistered
    if ($bbuserinfo['userid']<"1") {
        
    $unregopen "<!-- ";
    } else {
        
    $unregopen "";
    }
    // hide feature from unregistered

    // hide feature from unregistered
    if ($bbuserinfo['userid']<"1") {
        
    $unregclose " -->";
    } else {
        
    $unregclose "";
    }
    // hide feature from unregistered 
    I cant use these variables in the "postbit"-template...
    I dont understand why... because in the "header"-template it works...?!

    please help
    thx
    sven

  • #2
    try

    PHP Code:
    $unregopen='';
    $unregclose='';
    if (
    $bbuserinfo['userid'] == 0) {
      
    $unregopen '<!-- ';
      
    $unregclose '-->';

    they should work without problem though, are you sure your not logged in while doiing it?
    Scott MacVicar

    My Blog | Twitter

    Comment


    • #3
      Originally posted by PPN
      they should work without problem though, are you sure your not logged in while doiing it?
      it doesn't work!!!
      I have try to include the variables in "postbit"-template after I've wrote the mini-script into "phpinclude"-template....
      nothing!!!!

      I dont understad it!!!!

      please help!
      sven

      Comment

      Loading...
      Working...
      X