Quote:
Originally Posted by Dannyloski
Can anyone help me figure out what I need to do to make this work? I dont know much of this stuff, so I thought it would work with something like what I did here, but no. Cybernetec or anyone who knows, can you help me? I want to add the image for those who have donated.
|
That condition in the template should be a variable like $isdonator. If you set $isdonator = true, then your condition will fire.
But you'll need a plugin in order to set that variable up before the template is called (postbit). If you set the variable in your plugin, then when the template runs the conditional will trigger.
However, before you set the variable you'll need to decide whether to set the variable. You'll have to build a database query to check the database to see if a donation has been made by this user. If it has, set it to true, if not, set to false.
Note that this is a very quick and dirty method, and won't be very efficient. It will add a query for every post on the page. BUt if you don't have a really busy forum, it probably won't matter.
If this is your first plugin go to the tutorials section for the basics of creating a product and a plugin. There are also tutorials on building a database query.