XF 2.2 How would I create these 2 widgets?

DarkGizmo

Well-known member
I'm looking for 2 widgets that sort of function the same way but for different purposes.....

Widget #1: Member spotlight
A simple widget that would display a random member of a specific usergroup for a certain amount of time.

Widget #2: Linked image/advertisement
This widget would be a linked image, to say a sponsor's page or something else, that would change upon each refresh to a different one? It's hard to explain.


Are either of these possible? If so, how can they be done/accomplished?
 
How would I go about mapping the member ID's?

Also for the random images, that works fine for images, but say I wanna have each image linked to a different website respectively? How would the code look to change the URL per image shown?

I'm basically looking to utilize this for sponsored websites, etc.
 
A couple of ways:

HTML:
<xf:set var="$var1" value="value_1" />
<xf:set var="$var2" value="value_2" />
<xf:set var="$var3" value="value_3" />

...

<xf:set var="$array" value="{{ ['value_1', 'value_2', 'value_3'] }}" />
 
Back
Top Bottom