Php template calls?

  • Affected Version
    WoltLab Suite 3.1

    Hey, I was wondering if there is a way to use the template calls in other boxes?


    I am trying to, make a box that shows some stastics, I know that one exists, however that box shows more than I want, and is sidebar only (not where I want mine).


    I have been trying to figure out how to PHP the data myself, with no luck. However I noticed, the data is placed into the template Statsistics box with


    Code
     {#$wbbStatistics[threads]}


    Is there a way I can use this, in my boxes? in my own divs? I have been trying that as well, with no luck. I am trying to do it, with posts, threads, events, and videos.

  • Nope you can't. This template variables are registered inside the box and only there available.


    You need to write your own PHP logic and register the template variables in your box. Maybe you can lookup the PHP code from the original box and use the parts you need.

  • Nope you can't. This template variables are registered inside the box and only there available.


    You need to write your own PHP logic and register the template variables in your box. Maybe you can lookup the PHP code from the original box and use the parts you need.

    I cant find the php for the box, I did try that :(. That said, I really dont know where to look. Ill see what I can dig up.


    there is like 8 different templates making this stats box, and I cant find any of the Php at all, and I bet thats 8 different php files lol.


    A Maybe easier idea, is their a way I can modify this boxs locations?


    Its pretty silly that the statistics box is only available in the right sidebar. I feel like no one would put it there, its not right sidebar content, its footer content at best, I need it in header for full page, on a custom splash page personally. However the box is locked down to left/right sidebar.

    Edited 5 times, last by cyberlocc ().

  • Depends on the statistics you want to show. You can find the box PHP code at the respective application folder at lib/system/box. The templates are at the respective templates folder with a name prefix of box


    You surely need some PHP skills to put all Information together.

  • I figured out a hackey way lol. I will edit it in a min, just in case anyone else ever wants to do this and finds this post.



    However, in order for it to work, it needs to be able to have a box position not listed, it has to be above or on the same box location as the box I am trying to make.


    So I edited the file in lib, and add hero as a box location. I know that is not the right way to do it, so how can I do it, correctly?

    Edited 7 times, last by cyberlocc ().