Loading...
 
Skip to main content

Features / Usability


Show Comments Always: here's how

Hi everyone,

I'm in the process of seriously modifying my TikiWiki installation, in my effort to turn it into exactly what I was looking for. That's one of the things I love about open-source: I get to tinker and experiment with the code and marvel at the end result. I did it with osCommerce, I am doing it with TikiWiki. It's THE best way to understand how the package works.

Anyway, I thought I'd share a little something with you. There must be others out there who don't like TikiWiki's default behaviour with comments: not showing them unless you click the Comments button. It is incredibly easy to fix, here's how:

- look for header.tpl in the templates directory and open it in your editor.
- look for the code between the body tag. Look for the section below (this is from my 1.8.3):

{if $feature_article_comments eq 'y' and $show_comzone eq 'y'}onload="javascript:flip('comzone');"{/if}

- comment the entire body tag out, this will make restoring it easier.. I always use the following trick:

{php}
/*
(code is here)

  • / (star slash, tikiwiki turns it into a bullet)

{/php}

- Alright. Now copy the body tag and paste it below the PHP block. We can now edit it. Replace the above mentioned part with this:

onload="javascript:flip('comzone{if $comments_show eq 'y'}open{/if}');">

- The onload part is the thing that makes it works. I've currently confirmed it works for both blogs and wikipages, I suspect it will also work for other parts of TikiWiki.

Use at your own risk, enjoy!

Regards,
WillemB