Requirements
Requirements for running MicroCyte in client browser
Documentation
Documentation for developing and deploying Microcyte on your website
Hosting Requirements
Requirements for hosting a MicroCyte powered website

MicroCyte Official WeBlog

News and thoughts from the team

image

Download Now!

We use the secure paypal payments gateway. The download is a small 1MB zip file. You could be up & running in 5 minutes!
image

Adding comments to MicroCyte pages

How to add a comment thread with one line of code

Its trivially simple to add a comments thread to any page in a MicroCyte website. All you need to do is add one line of code into your template:
<!-- <![CDATA[ --><?php buildComments($currentpageid, "default_discussion.tmp"); ?><!-- ]]> -->
If we take this line apart its actually a lot less complex than it looks. the <!-- <![CDATA[ --> and the <!-- ]]> --> tags simply tell MicroCyte not to try and parse whatever is in between them. The real meat is in the buildComments() PHP function call which takes two arguments. The first argument $currentpageid, unsurprisingly passes the id of the current page into the comments system so it can find all the comments registered for that page. The second argument, 'default_discussion.tmp' tells the comments system which layout snippet to use for the comments themselves.
 
What do you get?
Well, if you've done it right the comments system should generate a form, not unlike the one at the bottom of this page, and it will also go off and retrieve all the comments that have been made on your page and display them using the layout snippet you've specified. When you log into the management system, each comment posted will have a delete cross against it allowing you to quickly weed out offensive or inappropriate comments. Each comment is also fully editable when logged into the CMS and any changes you make are saved when you hit the save button as usual.
 
Customisation
The comments system is fully customisable and you can totally change its appearance to suit the look of your website. You can find the comments form in the MCTEDiscussions directory in the root of the MicroCyte application, this form is predictably called form_template.php. The look of the comments can be changed by modifying the default_discussion.tmp in the /fragments/snippets directory, alternatively you can add your own snippet and specify it when calling the comments system in the code above. Because the comments system is dynamic, you can change the look of the comments at anytime simply by changing these two files and all previous comments will adopt the new styling.
 
Easy
So as you can see, you can actually add a comments form to any page within a matter of seconds and add comments into reusable templates using the exact same process, very useful for blogs like this! For more information please read the MicroCyte developers guide on Comments, linked below.
 

Any comments? leave them here!

Subject
Name
Comment

MicroCyte Key Pages

Templates
  • Coming soon!
Case Studies

© Microcyte Content Management Systems 2007-2008 : Home | Demo | Support | Developers | Templates | Case Studies