JLex Block Documentation

This documentation contains guides and how-tos for managing your JLex Block 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 Block below:

Joomla

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

  • Joomla 2.5.x
  • Joomla 3.x

PHP Requirements

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

  • 5.3+ and above.
  • cURL Library. In order for JLex Review to perform outgoing connections.

PHP Settings

Settings Minimum Recommended Reason
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. It's request if you want to use Country method.

MySQL Requirements

JLex Block 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

Downloading

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

Please click to Get latest version. In addition, you can find old version or files necessary by click to JLex Block (red color).

Setup - Downloading

Installing

In backend, access to Extension Manager > Select file and install. Make sure that both JLex Blocks' component and plugin are installed.

Setup - Installing

Notice: This product don't request API key.

Updating

It is always recommended to stay up to date with the latest version of any of software to avoid running into unnecessary bugs by receiving the latest updates from us. Three things to remember everytime you run an upgrade: Backup, backup, and backup.

Make it a habit to run a backup before uninstalling ANY component; this includes JLex Block. There are many school of thoughts or ways to backup your site, but please stick with what you're comfortable with. We you like to recommend you to look at this tutorial by JoomlaBlogger.

Basically, upgrading is just a simple as installing the component. You could either:

  • Install the latest installer over the existing component.
  • Uninstall the previous version and install the latest version again.

All versions of JLex Block allow you to update whether or no.


User Interface

Button name Feature
New Create new block for element or page
Lock/Unlock Enable/Disable blocking
Create new group Collect items in a group if you want user just pass ONE of those item.
Out Group Delete items from a group
Join Group Add items (Group of these items must empty) in a group
Transfer data old version Backup all data previous version of JLex Block
Delete Delete items of JLex Block

Methods

Password

The user must fill exactly password to see content of page or element(s).

  • Password: Passwords separated by comma.
    Eg: pass1,pass2 | Using one of these password to pass.
  • Extra conditions (PHP scripts): Ignore it if you don't know PHP language.
    Once password is passed, the system will check your condition. If true, your page is available with users.
    Eg: The content is not available when you isn't a member (even cross the password).
    <?php
    $user = JFactory::getUser();
    if ($user->guest) {
        return false;
    }
    return true;
                				
  • Attach PHP/HTML code: Your script will append before or after in object (page, element) that blocked.

Country restrictions

You can deny/allow or another conditions requests from clients of these countries.

  • Type: Deny / Allow / Option (through PHP script)
    Eg 1: As nearly image, the request from Algeria can't see your content.
    Eg 2: If you set Type is Option (PHP script), and set PHP script as bellow:
    <?php
    $user = JFactory::getUser();
    if ($user->guest) {
        return false;
    }
    return true;
                				
    Then, the user from Algeria can see your content if they are members.
  • Countries: List countries that will be affected.
  • Attach PHP/HTML code: Your script will append before or after in object (page, element) that blocked.

User group

You can deny/allow or another conditions requests from clients of these user groups.

  • Type: Deny / Allow / Option (through PHP script)
    Eg 1: As nearly image, the Public group can't see your content.
    Eg 2: If you set Type is Option (PHP script), and set PHP script as bellow:
    <?php
    return isset($_GET['key']) && $_GET['key']='abc';
                				
    Now, the Register group (or other group) can't see your contain if their'URL missing key variable.
  • Groups: List groups that will be affected.
  • Attach PHP/HTML code: Your script will append before or after in object (page, element) that blocked.

User restrictions

You can deny/allow or another conditions requests from these users.

  • Type: Deny / Allow / Option (through PHP script)
    Eg 1: As nearly image, only username Super User can see your content.
    Eg 2: If you set Type is Option (PHP script), and set PHP script as bellow:
    <?php
    return isset($_GET['key']) && $_GET['key']='abc';
                				
    Now, the Super User can't see your contain if their's URL missing key variable.
  • Users: List users that will be affected.
  • Attach PHP/HTML code: Your script will append before or after in object (page, element) that blocked.

IP restrictions

You can deny/allow or another conditions requests from clients of these IP(s).

  • Type: Deny / Allow / Option (through PHP script)
    Eg 1: As nearly image, the request from client that has IP address is: 12.78.34.01 can't see your content.
    Eg 2: If you set Type is Option (PHP script), and set PHP script as bellow:
    <?php
    $user = JFactory::getUser();
    if ($user->guest) {
        return false;
    }
    return true;
                				
    The client (has IP address is:12.78.34.01) can see your content if they are members.
  • IP: List IP address that will be affected.
  • Attach PHP/HTML code: Your script will append before or after in object (page, element) that blocked.

Access view level

Accessing limitted of your content based on view level.

  • View level: By default, Joomla! has 4 level: Public/Registered/Special/Super User
  • Extra condition: Work as password method.
  • Attach PHP/HTML code: Your script will append before or after in object (page, element) that blocked.

Period of time

The content will visible in period of time that you set.

  • Period: Set time period that your content is available.
    Eg: As image, your content is vissible between 2015-11-03 20:43 to 2015-11-10 20:43. (Calculated as your timezone).
  • Extra conditions (PHP scripts): Work as password method.
  • Attach PHP/HTML code: Your script will append before or after in object (page, element) that blocked.

Optional condition

Lock/unlock content based on your condition. (Using PHP scripts).

  • PHP Scripts: Your PHP script. Request return command.
    Eg: As image, your page will visible if the currently user has ID is: 273.
  • Attach PHP/HTML code: Your script will append before or after in object (page, element) that blocked.


Begin

First step

  1. Enter your URL that you want lock (any component).
  2. The system auto-find all of necessary parameters.
  3. Now, select Area block.
  4. Set Method block and click Apply
  5. Then, save it
  6. Remember active block entry after.

Lock full page

In first step, select Full page at Area block box. This option will lock all module, component and custom code. The image bellow is example (block by password).

Lock component

In first step, select Component at Area block box. This option only component without modules. The image bellow is example (block by password).

Lock elemment(s)

In first step, select Element at Area block box. This option will block all element that selected.

  1. When you select Element, a frame will be shown, and you can select any element that want to block

  2. Then, the box contain all method will be shown.

    The path of element will find as StyleSheet (css) path

    Eg:
    body > div.article

    You can change the path by click to path currently:

    Structure of source codes will change under template & plugins’ affection. Therefore, because of security purpose, you should assign ID property to those elements.

    Eg:
    <div id="my-content"></div>
                		
  3. Set method protection for this element, then click Apply button.
  4. Save page when all elements are already set.

Editing an item

Change the protecting method: Click on Settings () symbol, change the method, assign new value to it and click Apply button.

Edit parameters and path: Click icon edit, add or remove parameter and click Save button. Note: The elements' link in DOM should be formatted as in CSS path.

JLex Block edit parameters


Group feature

As passing any protecting wall in a group, the remaining protecting walls will be disabled too

Select block entries and choose:

  • New group: in order to create new group.
  • Join group: Join with group that exist. The list must have an item that assigned with that group.
  • Out group: Remove all group that entry assigned

FAQs

Can use JLex Block to modify/edit content a page?

Answer: Yes. It's possible. This article will guide you replace content using JLex Block. The first, you need download this file and paste to folder: components/com_jlexblock/themes.

You can detect object that you want replace by 2 ways:

  1. By wizard of JLex Block
  2. Using Firebug (Or developer tools)
Using Firebug

You can install this add-on for Firefox at here: https://getfirebug.com/. After install success, press F12 (or Command+Option+I) key to use.

Turn on Firebug on Firefox

Then, click cursor icon to detect object. Final, copy CSS path of it. (This path will insert into JLex Block if JLex Block's wizard can't detected)

Turn on Firebug on Firefox

Replace content

Insert content

Notice:Since version 4.7.1, you can use PHP language. ;-)

Which extension can work with JLex Block?

Answer: All Joomla! extension can work with JLex Block.

How will it affect to SEO/SEF extension?

Answer: No. It's not affect to SEO/SEF extension.

How to modify default theme?

Answer:
You can modify default theme by editing file in folder: components/com_jlexblock/themes/default
Example for Password is pw.php file.

How to add a theme?

Answer:
In order create new theme, the first you need create a folder extends components/com_jlexblock/themes/default
In back-end, at Theme field, set your theme just created.

How long the page protected will block again?

Answer: The page will block again when user session is expire. Normal is 5 mins (This value is set in Joomla! Configuration).