FolioComments Installation and Guides



  1. Download and expand the zip file to your computer.
  2. Upload the contents of "foliocomments-master" to the root directory of your domain.
  3. On your server, create a database, if you already have one, skip this step.
  4. Edit comments/includes/config.php file and enter your database info in it.
  5. In your browser go to "YOUR WEBSITE ADDRESS/install/" ie.
  6. This will install the database and you're done with the installation.
  7. IMPORTANT: At this point you must delete the "install" directory and its contents.

Embedding Comments

  1. In your page's html, paste the following wherever you want comments to appear:
    <div id="commentList"></div>
  2. In the <head"> section of your web page you must have the following, don't forget to enter the correct page id number:
    NOTE: for best results, move the javascript files to the bottom of your page before the body tag.
    <link rel="stylesheet" href="comments/trumbowyg/dist/ui/trumbowyg.min.css">
    <link type="text/css" rel="stylesheet" href="comments/assets/foliocomments.css">
    <script src="comments/assets/jquery.min.3.4.1.js"></script>
    <script src="comments/trumbowyg/dist/trumbowyg.js"></script>
    <script src="comments/assets/comments.js"></script>
    var pagid = 35; // page id 35 - change this to the id of your page
    $(function() {
    	loadComments(curPageURL,urlAnchor,dosignin,pagid,1,'newest'); // initial load; 
  3. To enable responsive view, you must have the following line of code in head section of your page's html:
    <meta name="viewport" content="initial-scale=1, width=device-width" />
  4. Congrats you just completed the installation process!

Sign In As Administrator

  1. Once you're done with the installation, point your browser to the page you just installed folioComments and it should show up
  2. IMPORTANT: As soon as the comment box shows up, sign in as the default administrator with the following email and password and change them,
    password: demopass


There are number of configuration options available, in config.php file. Each function is briefly explained in this file:

Database Settigns

Settings For Comments

SMTP Settings

folioComments uses PHPMailer to send SMTP emails which is included in the package and is already installed and fully functional. The SMTP settings in config.php file are pretty much self explanatory.
For information and documentation refer to PHPMailer's Github Page


Trumbowyg is a super lighweight WYSIWYG HTML editor that is included in the package. The configuration for this editor is a javascript section, located in "comments/comments-data.php" file towards the bottom. If you wish to add/edit/remove toolbar butttons or configure other aspects of the editor, refer to docs at Trumbowyg website.
If you wish to remove the WYSIWYG editor altogether from your installation and replace it with a texarea box:
  1. Refer to the installation section in this page and remove Trumbowyg CSS & JS file references from your page.
  2. In "comments/comment-box.php" find following line:
    <div class="comment-textbox" id="comment-textbox-<?php echo $comment_id; ?>" placeholder="<?php echo $comment_placeholder; ?>"></div>
    And replace it with:
    <textarea rows="1" id="comment-textbox-<?php echo $comment_id; ?>" placeholder="<?php echo $comment_placeholder; ?>"></textarea>
  3. In "comments/assets/coments.js" find the following line:
    commentbody = $('#comment-textbox-'+cid).trumbowyg('html'),
    And replace it with:
    commentbody = $('#comment-textbox-'+cid).val(),

Other Features

For question, please use the comments at folioComments' main page.

Download & Comments