JLex Block Documentation

Installation

1. Requirements

  • Joomla version: 3 OR 4
  • PHP:
    • PHP: [allow_url_fopen = On]
    • PHP: [magic_quotes_gpc = Off]

2. Download & Install

Apply for new installations & upgrades. Before proceeding, always remember to BACKUP your site first.

Get the latest version of the JLex Block at the download page: https://www.jlexart.com/downloads

At the admin section of your website, follow these steps:

  • Joomla 2.5 & 3: Extension > Manage
  • Joomla 4: System > Install > Extensions
Select Upload Package File tab > Select the downloaded file to install.

3. Activate The Extension

* Effective from version 5.5.7

After a successful installation, access component: Components > JLex Block

This extension is required to activate for use. You need to go to the download page https://www.jlexart.com/downloads, COPY the License key (Click Create button if not already) and PASTE it in the activation window.

You can not activate? Please add Domain + Site access at the download page and open a private topic HERE.
Note: This activation occurs only when the new installation or upgrade.

Get Started

  1. GOTO JLex Block > New to add new item.
  2. Enter your URL to start blocking.
  3. Choose a blocking method and set value for it. See detail here.
  4. Select Area block
    • Full page (Both component and module)
    • Component
    • Element
      This option will block all element that selected. Structure of source codes will change under template & plugins' affection so you should add ID attribute for these elements, it will work better.
  5. Click Apply and Save it.

Methods

Password

Purpose: 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

Purpose: Used to 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

Purpose: Used to 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

Purpose: Used to 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

Purpose: Used to 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

Purpose: 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

Purpose: 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

Purpose: 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.

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 I block child paths?

Answer: Yes. Enable Child Path in items table.

Example: You locked path /my-path
Now, all child paths will also locked:
  • /my-path/article-1
  • /my-path/login
  • /my-path/***

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.

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)

Replace content

Insert content

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 file 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).
Sign in to your account

Use your social accounts to sign in