Announcement

Collapse
No announcement yet.

List of variables for templates?

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

  • List of variables for templates?

    Does a list of variables (or arrays) and their purpose that can be used in the templates exist?

  • #2
    There is no such list... the available variables are the same ones that are within scope in the PHP code at the time the template is called.

    Is there something specific you are wanting to do?

    Comment


    • #3
      Yes, we have an anonymous user hack that is only able to post in one specific forum. Right now, super mods and admins are the only ones able to view IP addresses on our forum, but for this specific anonymous user hack we'd like the Super Mods to NOT be able to view IP addresses of this one specific user, in this one specific forum. Is there a way to disable IP address viewing for Super Mods in one forum only (or even for one specific user, if that's possible)? We do NOT want to turn off the ability to see IP addresses for admin though.

      Comment


      • #4
        Re: List of variables

        Originally posted by Jake Bunce
        There is no such list... the available variables are the same ones that are within scope in the PHP code at the time the template is called.
        Dear Jake and others,

        I'd just say here that this would be one of the single-nicest gifts the vB team could provide for its users: a listing of what variables are available in each template (or at least the major templates), and how they are called.

        It seems a great deal of traffic on this support forum, for example, is taken up with 'How do I make data x show up in template y?' questions, that could be forestalled -- to users' great delight -- by some sort of on-line listing of templates and the variables available to them (perhaps as an appendix to the Styles and Templates section of the documentation?).

        Comment


        • #5
          The huge mass of varibles taht are possible to be called in any template are huge. However the comono ones are $bbuserinfo, $stylevar, $vboptions. Templaets like the postbit have $post, and the memberinfo has $userinfo.

          Comment


          • #6
            Okay, barring a release of ALL the variables ... is there someone that can help me with my specific question please?

            Comment


            • #7
              Originally posted by Wolfsong
              Yes, we have an anonymous user hack that is only able to post in one specific forum. Right now, super mods and admins are the only ones able to view IP addresses on our forum, but for this specific anonymous user hack we'd like the Super Mods to NOT be able to view IP addresses of this one specific user, in this one specific forum. Is there a way to disable IP address viewing for Super Mods in one forum only (or even for one specific user, if that's possible)? We do NOT want to turn off the ability to see IP addresses for admin though.
              Admin CP -> Styles & Templates -> Style Manager -> « » -> Postbit Templates -> postbit_ip

              Try adding the red code:

              Code:
              <if condition="$post[userid] != X OR $bbuserinfo[usergroupid] == 6">
              <if condition="$show['ip']">
              	$vbphrase[ip]: $post[ip]
              <else />
              	<a href="postings.php?$session[sessionurl]do=getip&amp;p=$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_button]/ip.gif" alt="$vbphrase[ip]" title="$post[ip]" border="0" /></a>
              </if>
              </if>
              Where X is the userid of the anon user.

              Comment


              • #8
                I could hug you! Thank you .... will have our tech guy do this this afternoon.

                Comment

                Loading...
                Working...
                X