After fooling around trying to do this with Blocks in the portal, I finally decided to do it "down and dirty" by editing the templates files.
The first addition was to add a Digg This button to the Knowledge Base Articles. After some playing, I decided the best place to put the buttons was just after the Article Text. To do this, I edited the kb_article_body.tpl file and added the button link code (java.script) in.
kb_article_body.tpl Before:
- Code: Select all
<END> <tr> <td><span>{ARTICLE_TEXT}</span></td> </tr> <BEGIN>
kb_article_body.tpl After]<END> <tr> <td><span>{ARTICLE_TEXT}</span> <hr><center><script>digg_skin = 'compact';digg_window = 'new';digg_title = 'The Snow Tire FAQ - {ARTICLE_TITLE}';</script> <script></script><script> slashdot_title="The Snow Tire FAQ - {ARTICLE_TITLE}"; </script><script></script> <script>reddit_url='http://www.snowtire.info/forum/kb.php'</script><script>reddit_title='The Snow Tire FAQ - {ARTICLE_TITLE}'</script><script></script></center></td> </tr> <BEGIN>[/code]
End Result:
http://www.snowtire.info/forum/kb.php?mode=article&k=2The next thing I added the capability to normal topic viewing. I played around with this a fair amount before I was happy. At first, I thought of doing the "Digg This" buttons on a post level, but that looked too cluttered. I finally decided to places the buttons just above the start of the topic post. This was all done by modifying viewtopic_body.tpl.
viewtopic_body.tpl Before:
- Code: Select all
<table><tr><td><BEGIN><a><img></a><END><BEGIN><a><img></a><END></td><td> {BANNER_14_IMG}<br> {PAGINATION}</td></tr></table>
viewtopic_body.tplk After]<table><tr><td><BEGIN><a><img></a><END><BEGIN><a><img></a><END></td><td><script>digg_skin = 'compact';digg_window = 'new';digg_title = 'The Snow Tire FAQ - {TOPIC_TITLE}';</script> <script></script><script> slashdot_title="The Snow Tire FAQ - {TOPIC_TITLE}"; </script><script></script> <script>reddit_url='http://www.snowtire.info/forum/viewtopic.php?t={TOPIC_ID}'</script><script>reddit_title='The Snow Tire FAQ - {TOPIC_TITLE}'</script><script></script></td><td> {BANNER_14_IMG}<br> {PAGINATION}</td></tr></table>[/code]
End Result:
http://www.snowtire.info/forum/viewtopic.php?t=131Enjoy,
- John