[SOLVED] Changing the behaviour of layout templates in ProBoards


I was wondering if anybody here knows how to customise a style sheet or where I can find information on how to.
I would say that I'm not quite and intermediate coder but not a beginner, I'm able to customise a style sheet without messing it up. Anyway this is what I've got to work with incase anybody is interested in knowing


Any information would be very much appreciated

Thanks in advance 1f600

Like 0 Dislike


I'm assuming you're referring to the "Layout templates" for ProBoards.

ProBoards generally mixes-in some handy custom code into the forum's HTML which you can use to change the behaviour of these templates, it just makes it easier for the forum owner as they don't need to write any JavaScript or server-side code in order to interact with the values stored in the database and such. This custom code isn't an actual language, it's just there to tell the ProBoards platform what HTML to put in place and with what value from the database. If you're familiar with common programming paradigms (concepts used within most if not all programming languages), here are some explanations as to what some of the custom-code does and how it works:

These contain values for certain things (can be either boolean (true or false), integer (whole numbers), string (text) or an array (a collection of multiple values of the same type, such as an array of strings)). The name of the variable generally correlates to the value's type. With ProBoards the values have already been set, I'm pretty sure you can't change the values.

Example for using variable's:




If statements
Pretty commonly used, it checks whether a variable is true or false.

Example for using if statement's:

{if $[variable_name] = true}
<p>My html code goes between</p>

If an if statement looks like this:

{if $[variable_name]}


Then it's just checking whether the variable contains a value at all.

Foreach statements
A loop which will loop through each variable within an array.

Example for using foreach statement's:

{foreach $[array_name]}

This would essentially print the HTML code between the "{if ..}" and the "{/if}" as many times as there are items within the array and the "variable_name" would change every time per the corresponding item within the array. (such as printing out the names of all threads within an array called "$[threads]")

Generally in the code-view whilst editing layout templates you'll see a list of variables and such on the right-hand side for you to use. They already have values and such, so just play around with them.

Hope this helps! 1f609

Like 0 Dislike