JLex Comment Documentation

This documentation contains guides and how-tos for managing your JLex Comment website.

Requirements

Before we begin, ensure that you have met the System Requirements in order for JLex Review to operate correctly. You may find the most basic requirements for JLex Review below:

Joomla

Every information related to PHP & MySQL is presented on Joomla’s page, click here to see details

  • Joomla 3.x

PHP Requirements

JLex Review runs on PHP and it requires PHP to exist on the site.

  • 5.3+ and above.
  • GD Library. In order to manipulate images that are uploaded on the site.
  • CURL Library. In order for JLex Review to perform outgoing connections.

PHP Settings

Settings Minimum Recommended Reason
memory_limit 64MB 128MB For image manipulation
upload_max_filesize 8MB 8MB It determines the size of files that can be uploaded on the site.
post_max_size 8MB 8MB It determines the size of files that can be uploaded on the site.
magic_quotes_gpc Off Off On Joomla 3 and above, this needs to be explicitly disabled as per Joomla's requirements.
allow_url_fopen Off On Using to connect remote server.

MySQL Requirements

JLex Review requires a minimum version of MySQL 5+

Checking System Requirements

You may review these requirements from the management system: System → System Information → PHP Settings

You can also create a very simple PHP script and include the codes below in your php file.

            	<?php
            	// This is a very simple method to load up php's settings.
            	phpinfo();
            	?>
            

Recommended Hosting Providers

We have ran a couple of tests on these hosting providers and we recommend them because we've ran a couple of tests on them and they seem to be pretty good at it. (At your own risk)

  • CloudAccess - Official Joomla! demo provider. They know what they are doing.
  • SiteGround - Optimized to run on Joomla! sites.
  • Rackspace - Pretty good support and fast.

Setup

Download & Installing

Downloading

In order to download the setup files, you will need to access your account dashboard.

Setup - Downloading

Installing

In backend, access to Extension Manager > Select file and install. The page will redirect to JLex Comment component then.

At here, you must fill your API key to activate this product.

Installation

Make sure that your server allow connect remote server (allow_url_fopen is enable).

Important:
Because size of installation file large than 2MB, so please make sure value of upload_max_filesize > 3MB. If you got error when try to install:
"Maximum PHP file upload size to too small....", please do following steps:

  1. Copy installtion file (zip type) to folder tmp
  2. Unzip this file
  3. In administrator, access to Extension > Install > Install from Folder > Fill your folder and press Install button.

Integration

JLex Comment can be integrated easily with any third-party component. You must just add several code lines to your component and write simple plugin for JLex Comment.

If you can't find your extension in the list bellow, please contact us (FREE) or see documentation for developers.

# Name Description Download
1 Zoo - 2.x,3.x Plugin to integrate JLex Comment into Zoo CCK. Compatible with: All
Restricted Access Please login to continue
2 Joomla! Article, K2, jDownloads, VirtueMart, FLEXIcontent This plugin support all above extensions
Restricted Access Please login to continue
3 Community Builder Plugin to integrate JLex Comment into Community Builder extension
Restricted Access Please login to continue
4 AdsManager Plugin to integrate JLex Comment into AdsManager extension
Restricted Access Please login to continue
5 Cobalt Plugin to integrate JLex Review into Cobalt CCK
Restricted Access Please login to continue
6 SobiPro Plugin to integrate JLex Comment into SobiPro CCK
Restricted Access Please login to continue
7 DJ-Classfields Add review form of JLex Comment to DJ-Classfields
Install as Joomla's plugin.
Restricted Access Please login to continue
8 JEvents Integrate JLex Comment with JEvents item
Install and enable it same as Joomla's plugin.
Restricted Access Please login to continue
9 EasyBlog - Module Integrate JLex Comment with EasyBlog item
Restricted Access Please login to continue
10 Easy Profile - JSN Adding JLex Comment tab with EasyProfile
Install and enable it same as Joomla's plugin.
Restricted Access Please login to continue
11 Event Booking Integrate JLex Comment with EventBooking item
Install and enable it same as Joomla's plugin.
Restricted Access Please login to continue
12 Contact Enhanced Integrate JLex Comment with Contact Enhanced item
Install and enable it same as Joomla's plugin.
Restricted Access Please login to continue

Permission - ACL

You can set right for each user group. Each user group will contain two access type: Back-end and Fron-end. For special group such as: Admin, Manager will have additional rights such as: Edit/delete all comment, show IP or email of author's comment.

Basic right

  1. Post new comments
  2. Post replies to comments
  3. Upload file (file attachment)
  4. Download file
  5. Sticker
  6. Mention a people in comment form
  7. Adding a location
  8. Emoticon
  9. Using photo instead of comment
  10. Vote a comment
  11. Report a comment
  12. Subscrible entry's comment
  13. Auto publish comment
  14. Allow to edit own comments
  15. Allow to delete own comments

Advance right

  1. Allow editing of any comments
  2. Allow to delete any comments
  3. Allow to publish/unpublish any comments
  4. Allow to feature/unfeature any comments
  5. Show author's IP address (front-end)
  6. Show author's email (front-end)

Permission - ACL


Commenting

File attachment

First, you must enable File upload right in Permission part, then access to Setting > Advanced tab to set these parameters:

  • File extensions allowed: Separated by commas, no space character. Default value of this param is: jpg,jpeg,png,gif,zip,rar
  • Max file size to allow upload (Mb)

Setting file attachment

In order hidden media part in comment block, go to Settings > Layout > Media:Hide

Google Map

First, you must enable Adding a location right in Permission part, then access to Setting > Advanced tab and fill Google Map API key field.

How to get Google Map API key: (step by step bellow or watch this video)

  1. Visit the APIs Console at https://code.google.com/apis/console and log in with your Google Account
  2. Click the Services link from the left-hand menu.
  3. Activate the Google Maps API v3 service
  4. Click the API Access link from the left-hand menu

Filter tools

Go to Settings > Restrictions and set:

  • Bad words listing: These words will be encoded when comment posted. Example: abc will become a*c
  • Forbidden names: The guest can't use these names.

Anti-spam

Restrictions

There is some properties you should know to restrict spam issue in your site:

  • Interval between posts (by seconds): The period between two consecutive postings by one user.
  • User's max comments: The maximum number of comment that an user can post in per item.

Captcha

Download reCaptcha plugin

Restricted Access Please login to continue

Then install it.
Access to reCaptcha.net and create a key for your site
Go to Plugin manager > JLex Comment - reCaptcha
Fill Public and Secret key. Last, enable this plugin to use

Captcha challenge

Reporting

The first, you must enable Report a comment right in Permission.

Report front-end


Once a reporting added, in back-end you can add User (if member) or IP address of comment to blacklist

Comment reporting

Blacklist

Member or client's ip address in blacklist will be limited all rights and can't do anything. Like that :((

Blacklist powerful


Notification

Administrator

Go to Settings > General tab > Admin Notification and turn on it.

In this part, we're two sending methods:

  • Immediately: Recommended for small site
  • Cron Job

Administrator notification


Begin date (CronJob only): The usual value is the time point when sending method is changed.

Enable quick moderation: If enable it, the emaill will contain hot links to quickly make an action such as: Remove, Publish/unpublish or featured.

User

An author of comment will receive an email when someone mentions theme or reply their comment

User notification

Subscription

The first, you must enable Subscrible entry's comment right in Permission. Then, you must use Cron Job command to run script and send email to them.


Subscription


In order case you want to anti fake email address, you can require an user must verify their email. Go to Settings > Restrictions > Verify subscriber's email > Yes

Email template

All template email stored in directory: administrator/components/com_jlexcomment/libraries/email_templates/

Before you custom these templates, make sure you know about HTML and PHP language.

Email template

Create a Cron Job

Go to Settings > General and copy Cron Job Command:

Create a cron-job


In Cpanel dashboard, set there params:

  • Minute - Enter the interval for minute. The example above uses "*/5" which means the script is executed every 5 minutes
  • Hour - Enter the interval for minute. The example above uses "*" which means the script is executed every hour
  • Day of Month - Enter the interval for minute. The example above uses "*" which means the script is executed every day
  • Month - Enter the interval for minute. The example above uses "*" which means the script is executed every month
  • Day of Week - Enter the interval for minute. The example above uses "*" which means the script is executed every week
  • Command - Your command copied.

In addition, you should watch this video to how to create a cron job.


Login with Social ID

You can post a comment by using your popular social ID: Facebook, Twitter and Google. In Settings > General, you must fill necessary parameters. Below is way how to get these parameters (key).

Register your application with Facebook

You have to use a personal Facebook account (no page, business or other type of account) to create an application. It also has to be a verified Facebook account (How do I verify my account?). If you do not use a verified personal account then Facebook will not let you create an application and redirect you to another page.
2. Go to https://developers.facebook.com/apps and allow developer access to your account if prompted to do so.
3. Click on the + Add a New App button on the right side.
4. Click on the advanced setup link on the bottom of the popup.
5. Fill out the form with the values below and then click on the Create App ID button (you then might have to fill out a captcha).
Display Name: Name of project
Namespace: Leave empty
Is this a test version of another app? No
Category: Communication
6. Click on the Settings link in the left menu panel and make sure that you have entered a Contact Email.
Contact Email: This email address is being protected from spambots. You need JavaScript enabled to view it.
7. Stay on the settings page and click on + Add Platform, select Website, enter the following values and then click on Save Changes.
Site URL: http://abc.com/
8. Click on the App Details link in the left menu panel and make sure that you have entered a User Support Email.
User Support Email: This email address is being protected from spambots. You need JavaScript enabled to view it.
9. Click on the Status & Review link in the left menu panel and make sure that your app is available to the general public.
Do you want to make this app and all its live features available to the general public: YES
10. Click on the Dashboard link in the left menu panel and get your App ID and App Secret in Facebook App settings:

Register your application with Google

1. Login with your existing Google account or create a new account if necessary.
2. Navigate to the Google Cloud Console.
3. Click on the Create Project button on top of the page, enter the following values and then click on the Create button.
Project name: Name of project
Project ID: xxxxxxxxxxxxxxx (Feel free to choose another project id if this one is already taken)
4. In the left navigation panel click on APIs & auth \ APIs and search for Google+
5. First click on the Google+ API link and then on the Enable API button.
If you have a Disable API button instead then this API is already enabled and no changes need to be made on this page.
6. In the left navigation panel click on APIs & auth \ Consent screen, enter the following values and then click on the Save button.
Email address : Specify your email address
Product Name: Name of project
7. In the left navigation panel click on APIs & auth \ Credentials.
8. Click on the CREATE NEW CLIENT ID button, enter/tick the following values and then click on the Create Client ID button.
Application type: Web Application
Authorized Javascript origins: https://abc.com
Authorized redirect URI: https://abc.com/index.php?option=com_jlexreview&view=user&task=oauth&type=google
9. Get Client ID & Client Secret the following values from the group Client ID for web application:
The values that need to be copy&pasted are highlighted in the screenshot below:
Google Application Keys

Register your application with Twitter

1. Login with your existing Twitter account or create a new account if necessary.
2. Open your Twitter Apps and click on the Create New App button.
Twitter requires that you add your mobile phone to your Twitter profile before creating an application. Please click here for more information.
3. Complete the Application details form with the following values and then click on the Create your Twitter application button.
Name: Only test (Feel free to choose another name if this one is already taken)
Description: Only test social application and login service
WebSite: Enter the domain of your own website, i.e. http://www.example.com/
Callback URL: i.e. http://www.example.com/index.php?option=com_jlexreview&view=user&task=oauth&type=twitter
4. Open the panel Settings, tick the checkbox of the following option and then click on the Update settings button.
Allow this application to be used to Sign in with Twitter
5. Open the panel Permissions, select the type of access that you need and then click on the Update settings button.
Tick Read and Write if you want to use our sharing API, otherwise tick Read only
6. Open the page Keys and Access Tokens and copy Consumer Key (API Key) and Consumer Secret (API Secret) the following values from the group Application settings:

Roles

Adding a badge for User group such as: Admin, Mod ...etc. You can create multiple role for one User group.


Import/Migrators

This component support import comment row through CSV file. The file must contain there column:

  • Comment
  • Created date: Format YYYY-MM-DD or YYYY-MM-DD HH:MM:SS
  • Author Name

Import comment


Currently, JLex Comment support import comment from there component: JComment, K2 and Virtuemart


Replacer

The first, you must enable Replacer feature in JLex Comment's setting. (Setting > Advanced > Enable Replacer > Yes)

Make sure you know how to create a regular expression match.Ok, now go to Replacer and add new regex

Example:

Regex
/https?:\/\/[^ ]+?(?:\.jpg|\.png|\.gif)/m
Replace with
<a href="$0" target="_blank">$0</a> <img src="$0" class="jcm-img-preview" />

This regex will find image url in comment and preview it through HTML tag.

Regex replacer


Add-ons

Languages

You can create a new language package by do following steps:

  • Copy language files: en-GB.com_jlexcomment.ini and en-GB.com_jlexcomment.sys.ini in directory: administrator/languages/en-GB
  • Rename new files by replace en-GB by your language prefix. Example with German language is de-DE.com_jlexcomment.ini and de-DE.com_jlexcomment.sys.ini
  • Then, move these file to new directory: administrator/languages/de-DE
  • Open two file and begin translate it. (string between quote marks)

Read full article here.

Module

JLex Comment module

You can download latest version of JLex Comment's module here:

Restricted Access Please login to continue


The module support these features:

  1. Latest comments
  2. Most commented
  3. Top posters
  4. Comment form

General fieldset

In module setting, you will see General fieldset. It NOT apply for Comment form feature. It use to restrict the search area.

Module setting


Example:
You set type/feature is Latest comments. Now, you want to display latest comments in K2 extension instead of all. So you must set Entry type(s) is K2.
If you want display comment of special items of K2, you must fill to Entry ID(s) field ID's value of these items. (1,2,3)...

Using Pagination if you want to display all comments (sort by date).

Latest commented layout

Back-end
Module setting


Front-end
Module setting


Most commented layout

Back-end
Module setting


Front-end
Module setting


Top posters

Back-end
Module setting


Front-end
Module setting


Comment form

Using to create a comment form for single page. In setting part, you will see these params:

  • Entry type: Name of component without com_ prefix. Eg: k2, module or virtuemart...
  • Entry ID: ID of this entry item. It must a string(Only A-z,0-9.) or number type.
  • Entry title

Module positions

These module positions are pretty similar to your Joomla template's module position. You can place any module that you want within the component itself.

Module setting


Below are the list of available module positions available to use

  • Top of Comment form: jcm-form-top
  • Bottom of Comment form: jcm-form-top

FAQs

Updating....


Developer

Create a new theme

In order to create new theme, you should do following steps:

  • Go to directory: components/com_jlexcomment/themes
  • Copy default forder and rename by new name.
  • Now, you can custom your theme by modify file in this folder
  • Last, Go to Setting > Layout > Template

Extening Joomla! template

JLex Comment sub-templates extend the templating capabilities of Joomla! by allowing the creation of multiple, named sets of view overrides for JLex Comment (the component) and certain JLex Comment modules.

JLex Comment component sub-templates are created by copying the contents of /components/com_jlexcomemnt/themes/ to /templates/DEFAULTTEMPLATE/html/com_jlexcomment/, where DEFAULTTEMPLATE is the name of your site's default template.

As of JLex Comment v1.0.0, these files include:

  • default
    • |_default_comment_flex.php
    • |_default_comment.php
    • |_default_comments.php
    • |_default_form.php
    • |_default_header.php
    • |_default.php
    • |_index.html

To create a new JLex Comment component sub-temple, make a copy of /templates/DEFAULTTEMPLATE/html/com_jlexcomment/default and rename it appropriately, such as /templates/DEFAULTTEMPLATE/html/com_jlexcomment/mytheme (or keep is "default"). The files in this new sub-template can now be customized as needed.

Last, make sure that you set new theme in Setting.

Plugin

Notice: Before perform anythink, place make sure you know place where to put below code.

Embed Comment body

<?php
$loader = JPATH_ROOT . '/components/com_jlexcomment/load.php';
if (file_exists ( $loader )) {
    require_once $loader;
    echo JLexCommentLoader::init ( $component, $id, $title="" , $url=null );
}
            

Parameters

  1. $component: (type:string) - name of component (without com_ prefix) : k2, virtuemart or easyblog ....
  2. $id: (type:integer} - ID of item (maybe is article, blog item...)
  3. $title: (type:string) - name of comment item. If this param is blank, the JLex Comment will find title automatically
  4. $url: (type:string | default:null} - Url to comment item. If this param is blank, the JLex Comment will find url automatically

Example for K2: The code will be place in file: components/com_k2/templates/default/item.php

<?php
$loader = JPATH_ROOT . '/components/com_jlexcomment/load.php';
if (file_exists ( $loader )) {
    require_once $loader;
    echo JLexCommentLoader::init ( 'k2', $this->item->id , $this->item->title );
}
            

Get count comment

<?php
$loader = JPATH_ROOT . '/components/com_jlexcomment/load.php';
if (file_exists ( $loader )) {
    require_once $loader;
    echo JLexCommentLoader::count_cm ( $component, $id );
}
            

Parameters

  1. $component: (type:string) - name of component (without com_ prefix) : k2, virtuemart or easyblog ....
  2. $id: (type:integer} - ID of item (maybe is article, blog item...)

Plugin events supported.

Updating...