Announcement

Collapse
No announcement yet.

List Of Variables For Conditionals

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

  • #16
    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

    Comment


    • #17
      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

      Comment


      • #18
        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.

        Comment


        • #19
          Thank you dude. Have a great day!

          Comment


          • #20
            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

            Comment

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