Hey guys. I've been coding a custom message for my forums, which is supposed to display to members with 0 posts.
I used this tutorial from a long while back:
Now, whilst it works definitely, it is just a piece of text. So of course I'm styling it to match the other messages on the forum which I already know the CSS class for.
This is the code:
<br><if test="$this->memberData['posts'] == ‘0’"><div class="message">This is a test. See this? It means it works. Woop Woop.</div></if></br>
When I put it right at the top of Boardindextemplate, it doesn't appear at all. What is wrong here? Could be a tiny error but I'm not sure. No text, no style displays. I know I'm putting it in the right location since it works without the 0 post function and works without the style, but when both are together something has gone wrong. I'm sure I typed something wrong, but do you know what it is?
tl;dr Do you guys know what is wrong with the code above? It isn't displaying.
EDIT: I'd also like to know how to make this close-able, if possible. Users will sometimes want to close the announcements we've written up and I'd like to give them that option.
I've made this the current code:
<if test="$this->memberData['member_id']"><div class="message"> <a href="#" class="close" data-dismiss=“if">×</a> <i class="fa fa-coffee"></i> Test Number 2</div></if><br> to close it, but it just doesn't seem to close...
Okay, so this is the solution to the problem:
<if test="$this->memberData['posts'] == '0'"><div class="message">This is a test. See this? It means it works. Woop Woop.</div><br></if>
Turns out I had typed something wrong, haha. Thanks so much everyone!