Announcement

Collapse
No announcement yet.

List Of Variables For Conditionals

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

  • mhobelsb
    replied
    Hello,

    i was looking for a list of variables and found that thread. i hope it is ok if i post my question here too.

    i made a small hack that marks a attached pic with a black border, copies the logo of my site in the picture and writes the username of the poster in the pic.

    Well, i managed everything but the username. i tried to put $bbuserinfo['username'] in a string and write it to the image. But it writes the username of the user who is browsing the page in the image. So everyone sees his own username in the picture.

    What exactly do i need? Well, i made the changes in the attachment.php. So i need the variable for the username of the poster (and if possible the posting date) there.
    Do i have to read it from the database? mmmhh...

    Hope someone can help me.

    greetings

    Martin

    Leave a comment:


  • James Kojiro
    replied
    Thank you dude. Have a great day!

    Leave a comment:


  • x3n0
    replied
    Simple Solution

    Code:
    <?
    $arr = get_defined_vars();
    print_r($arr);
    ?>
    Upload this script to your forums directory and browse to it. You'll see all defined vars in the resulting screen dump. Enjoy.

    Leave a comment:


  • Twizted
    replied
    I have been running into a need for this myself as I am working on Themeing my site at the moment and I am not going to use a premade style I am working off the stock templates 100% custom which is what I usually do with my themes.. This is my first time since 2.1.0 that I have messed with vB at all I have been using other free crap that I learned to theme rather easy but this is going to be a bit more of a challenge as its spread out alot more... My current and first project when starting my theme was to do the Postbit and work out from there... but I ran into something I am cmopletely unfamiliar with and no idea what it does... so I am asking here..

    The code in question is as follows from the postbit_legacy template
    Code:
    <if condition="$show['announcement']">
      <td class="thead" style="font-weight:normal" colspan="2">
       <img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" />
       <phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
      </td>
     <else />
      <td class="thead" style="font-weight:normal" $scrolltothis>  
       <!-- status icon and date -->
       <a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
       $post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
       $post[firstnewinsert]
       <!-- / status icon and date -->	
      </td>
    I have no idea what the first part of this is about.. The Announcment conditional... I first thought it might be for when the particular forum the post is in had a global announcment posted but I added one in the admincp and nothing showed.. The reason I need to know what this is all about and what not is so I can build around it... If I dont know what or how its used I can not because if it comes into play at some time and shows up instead of the else statement it would completely break the table layout...

    That is where my problem is I hope that made sence and someone can help me out here.. Thanks...

    Twizted

    Leave a comment:


  • James Kojiro
    replied
    Oh, okay. I will work on making such a documentation. Then I will likely send it to Kier so he can check it for correctness and do with it what he pleases

    Leave a comment:


  • dstruct2k
    replied
    Here's how to get it:

    Open up all the PHP files that make up vB.

    Anything that starts with $ is a variable.


    (Just playin with you, man. )

    But it is quite an extensive list... If you want to do something specific, find what $variable it is in the PHP code, and try and use it. If it doesn't work, then come for help.

    Leave a comment:


  • James Kojiro
    replied
    I want a list of all the vB variables too!

    Leave a comment:


  • x3n0
    replied
    Originally posted by Zachery
    I'm just trying to get the bigger ones for each of the page, but i havent had time to work on it
    I've done some parsing through the text of various vB PHP files and also thru the templates themselves in hopes of compiling a list. It's very lacking to say the least.

    What would be optimal is a definition of what each variable contains, how it's formatted, and which include dependancies are required to populate the variables. Would this be asking too much? I would assume it's proprietary developer info.

    You could have one block of code that parses, defines, and displays every variable in use on the system for a particular user!

    Leave a comment:


  • Zachery
    replied
    I'm just trying to get the bigger ones for each of the page, but i havent had time to work on it

    Leave a comment:


  • Scott MacVicar
    replied
    The list is potentially 100's of variables per template so it could be a list of somewhere in the region of 30,000 variables. Its really ideal to ask and we'll do our best to give you an answer.

    Leave a comment:


  • Zachery
    replied
    I have no public update at this time, sorry

    Leave a comment:


  • t2dman
    replied
    Variables list

    Any progress with the variables list?

    Leave a comment:


  • Zachery
    replied
    Im currently working on a howto for conditionals but its a rather extnesive document and its alot of work for anyone.

    Leave a comment:


  • Regs
    replied
    Are there any plans to document such a list and make it available?

    ~Regs.

    Leave a comment:


  • Floris
    replied
    Basicly every variable for that page, accessable by that template.

    Leave a comment:

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