Log in

View Full Version : How to add to Edit, Reply area in posts...


shooptek
02-09-2009, 05:49 PM
Hey all,
I am trying to add an "addthis" button to my webpage, and I would like it to show up at the bottom of every post, right next to the edit and reply buttons. I know that I need to edit the postbit template, but I would like to add a conditional that only includes the button if the post is in a certain forum category, such as news.

If you would like to see what I mean, you can visit my homepage here: www.bunkerama.com

I edited it so that every post on the homepage has one of those, but i would like to make it so that when i click through to the forum (away from the CMPS) that it shows it there too.

Anyone know how to write that conditional? Thanks in advance!

Lynne
02-09-2009, 08:56 PM
<if condition="in_array($thread['forumid'], array(x,y,z))">
show this
</if>

shooptek
02-10-2009, 11:33 PM
Okay, great. So where forumid is, I would put the forum ID number? What if it is a category and I want all posts in subforums of that category to get it too?

Lynne
02-10-2009, 11:44 PM
You only want to replace x,y, and z (you may add more) with the forumids you want this for. You need to put all forumids in there - child forums also.

shooptek
02-11-2009, 03:29 PM
Awesome. Thank you VERY much Lynne.