PDA

View Full Version : Change Rank icons depending on style being used


wpeloquin
01-24-2011, 02:06 AM
Is it possible to have the rank icons change depending on the style that is being used? If "style1" is being used, the ranks are something like style1_rank1.png, style1_rank2.png, etc. If "style2" is being used, they will be style2_rank1.png, style2_rank2.png, etc.

Can a prefix be added in the individual style templates maybe? I am currently using the "text or html" field and an <img> tag in order to set the alt="" field. is there a way to maybe to put it there, something along the lines of <img src="path/$prefix_rank1.png" /> with each style setting their own prefix?

Any help would be appreciated. Thanks.

TheLastSuperman
01-24-2011, 03:58 AM
Is it possible to have the rank icons change depending on the style that is being used? If "style1" is being used, the ranks are something like style1_rank1.png, style1_rank2.png, etc. If "style2" is being used, they will be style2_rank1.png, style2_rank2.png, etc.

Can a prefix be added in the individual style templates maybe? I am currently using the "text or html" field and an <img> tag in order to set the alt="" field. is there a way to maybe to put it there, something along the lines of <img src="path/$prefix_rank1.png" /> with each style setting their own prefix?

Any help would be appreciated. Thanks.

Sure ;)

Try this:

<vb:if condition="$bbuserinfo[styleid] == 3">Show this in the style with a ID of 3</vb:if>

So an image let's see if you had a rank image let's call it captian1.png and captain2.png and captain1 is for a light style and captain2, is for a dark style then here's an example:

<img src="images/ranks/captain<vb:if condition="$bbuserinfo[styleid] == 3">1<vb:else />2</vb:if>.png" style="border: none;" alt="Captain" />