Create Custom Templates

Create Custom Templates

Overview

Templates are used throughout SafeSquid as a replacement for pages which can't be displayed due to filtering, error, or other conditions. Customized templates can be really useful, when you would want the error messages to be displayed in a language other than English. It can also be used to display your company logo, warning or message like 'If you feel this site was unnecessarily blocked, please notify the administrator on helpdisk@mycompany.com'.
A template may not necessarily be an html, but can be almost about anything like an audio file, flash file or an executable. It can be used to invoke a file for a specific condition. For example, SafeSquid has 3 built-in templates - tinygif (a 1x1 transparent gif image), checkeredgif (a 4x4 gray and transparent checkered pattern), and tinyswf (an empty flash animation). The checkeredgif template is used by default, to replace images that it blocked by the Pornographic Image Filter add-on module that is used to block pornographic images in real time. So, when the page is displayed to a user, a block of checkered boxes is displayed instead of the blocked image.

Prerequisites

Create your own html file and place that file in the below paths
for windows version of SafeSquid:
c:\ProgramData\usr\local\safesquid\ui_root\templates
The path for Linux version of SafeSquid is: 
/usr/local/safesquid/ui_root/templates/
Note: If you want to use any images in the html file make sure that the image also exist in the same path.

Example:

Here i am creating below html page:
I Am saving this file with name:
Custom_template.html
I will use this file in the below configuration 

Access the SafeSquid user interface

Go to Configure Page

Clicking on configure in SafeSquid interface

Go to Custom Settings

Clicking to custom settings

Go to Templates

Clicking on templates

Clone existing entry

Cloning the existing entry by clicking on clone

Edit the original entry

Clicking on edit to edit the policies
You must edit the original entry, because the entries in template section are processed from top to bottom
Editing the comment as per your entry
In profiles, selecting the required profile in the drop down menu
Giving the name of your html file in file field
clicking on save policy to save it
Saved rule

Testing

Testing the template

Saving the Configuration 

clicking on save config to save the policy


    • Related Articles

    • Create And Manage Your Private Categories

      Overview Custom website categorization in SafeSquid allows you to create your own list of website categories, so that you can easily block or allow list of websites. SafeSquid Web categorization also comes with Some default categories, so that you ...
    • Advantages Of Custom Web Categorization

      SafeSquid by default providing some website categories, you can use these categories for blocking of an inappropriate content For example, you want to block all social networking sites, you can directly choose category as socialnetworks then block ...
    • Custom Categorization is not Working

      Issues 1. I am trying to add new websites to whitelist or black list category, but it is not updating 2. Uploaded a new file with some websites and added to specific category, but I did not find that websites in the respective category 3. SafeSquid ...
    • Create User Groups based on network IP and LDAP (Active directory)

      Overview SafeSquid's Access Restriction section provides you an option to divide your users into specific user groups and use that user groups to define different set of Access Rules to that specific user groups. You want to define an access ...
    • Block Advertisements And Banners

      Client Scenario Ads are annoying and intrusive (64%) Ads are disruptive (54%) Ads create security concerns (39%) Ads affect load time and bandwidth usage (36%) Security was the main reason for blocking of Ads. Blocking of Ads include quicker loading ...