Anotomy of theme

Main parts of twig themes:

Each of these parts performs its work. In combination with each other, these elements form the entire design of your panel. You have full control to customize your themes.

HTML

Themes consist of .twig template files, each of which performs its unique function.

The layout.twig can be thought of as the master template; all other templates are rendered inside of layout.twig. Any elements that are repeated in a theme (ex: site navbar, templates, header, footer, etc.) should be placed inside layout.twig.

The templates directory is rendered as the Templates folder in the theme editor. It contains all other twig templates, including those for customer accounts:

CSS

CSS directory contains:

  • [name_theme].css - Theme css file
  • style.css - custom CSS of Theme

Alternatively, you can change CSS styles through the Admin panel Settings -> Preferences

JS

JS directory contains:

  • bootstrap.js - standart bootstrap javascript file
  • main.js - custom javascript file

New scripts should be added to main.js. Alternatively, you can add scripts through the Admin panel: Settings -> Preferences.

Variables

Site variables

Variable site available in any twig file

Name type default description
site['language'] string en Default language code, for example, English - output en. Configured in Admin panel: Settings -> Languages
site['iso_lang_code'] string en ISO HTML language code. For example, English — output en, Portuguese (Brazil) — output pt-br.
site['name'] string null Panel name. Configured in the Admin panel: Settings -> General - Panel name
site['seo_key'] string null Output meta-keywords
site['seo_desc'] string null Output meta-description
site['favicon'] string null Output favicon. Configured in the Admin panel: Settings -> Preferences
site['logo'] string null Output logo. Configured in the Admin panel: Settings -> Preferences
site['custom_header'] string null Custom CSS
site['custom_footer'] string null Custom JS
site['protocol'] string null Output protocol. http or https
site['domain'] string null Domain name
site['captcha'] boolean false Inclusion Google reCaptcha 2.0. Acceptance value true or false
site['active_menu'] boolean false Used with an array site['menu']. Output active menu item
site['rtl'] boolean false Activate rtl direction. Configured in the Admin panel: Settings -> Preferences
site['forgotPassword'] boolean false Allow user to reset password by email. Configured in the Admin panel: Settings -> General
site['average_time'] integer 0 Show average time on Services page
site['cpf_field'] integer 0 Enable CPF field
site['user_agent'] string '' User agent of the site visitor
site['user_ip'] string '' IP of the site visitor

To output variables, use {{ VARIABLE }}

<div>{{ site['name'] }}</div>
Array site['menu'] Array site['account_menu'] (allowed if user is authorized)
Name type default description
['active'] boolean false Displays the active menu item. Used to add .active class
['name'] string null Menu item title
['link'] string # Link to menu item
['external'] boolean false Marks menu item as external link

To highlight active menu used site['active_menu']

<ul class="nav navbar-nav navbar-right">
    {% for menu in site['menu'] %}
       <li{% if menu['active'] %} class="active"{% endif %}><a href="{{ menu['link'] }}">{{ menu['name'] }}</a></li>
    {% endfor %}
</ul>
Array site['languages']
Name type default description
['name'] string English Output name language
['code'] string en Shortcode language
['active'] boolean false Active language

<ul class="dropdown-menu dropdown-max-height">
   {% for lang in site['languages'] %}
       <li{% if lang['active'] %} class="active"{% endif %}><a href="/?lang={{ lang['code'] }}">{{ lang['name'] }}</a></li>
   {% endfor %}
</ul>
Array site['scripts']
Name type default description
['code'] string null Used for tag <script>['code']</script>
['src'] string null Link to script in folder
Array site['styles']
Name type default description
['href'] string null Link to styles in folder
{% for style in site['styles'] %}
  <link rel="stylesheet" type="text/css" href="{{ style['href'] }}">
{% endfor %}

{% for script in site['scripts'] %}
  <script type="text/javascript" {% if script['src'] %} src="{{ script['src'] }}" {% endif %}>
    {% if script['code'] %} {{ script['code'] }} {% endif %}
  </script>
{% endfor %}
Object with keys site['currencies'] - Panel currency list
Name type default description
key string code 3-letter currency code, for example, “USD”
rate['format'] string format Format to display the currency symbol with the numeric value, for example, “$100”
rate['symbol'] string symbol Currency symbol, for example, “$”
rate['label'] string label Format to display the currency selection to users, for example, “USD $”
<li class="dropdown dropdown-currencies">
    <a class="dropdown-toggle" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    <span class="badge">{{ user.balance }}</span>
    <span class="caret"></span>
</a>
    <ul class="dropdown-menu" id="currencies-list">
        {% for key, rate in site.currencies %}
            <li>
                <a href="#" id="currencies-item" data-rate-key="{{ key }}" data-rate-symbol="{{ rate.symbol }}">{{ key }} {{ rate.symbol }}</a>
            </li>
        {% endfor %}
    </ul>
</li>
Object site['currency']
Name type default description
format string null Format to display the currency symbol with the numeric value, for example, “$100”
symbol string null Currency symbol, for example, “$”
label string null Format to display the currency selection to users, for example, “USD $”
{{ site.currency.label }}

Totals variables

Variable totals available in any twig file

Name type default description
totals['ordersAll'] integer 0 Returns the number of all orders
totals['ordersCompleted'] integer 0 Returns the number of all orders with status "Completed"
totals['servicesAll'] integer 0 Returns the number of all services
totals['ticketsAll'] integer 0 Returns the number of all tickets
totals['usersAll'] integer 0 Returns the number of all users
totals['usersActive'] integer 0 Returns the number of all users with status "Active"

To output variables, use {{ VARIABLE }}

<div>{{ totals['ticketsAll'] }}</div>

Page variables

Variable page available in any twig file

Name type default description
page['title'] string null Return Page title
page['url'] string null Return url current page. For example /terms

For example, display page title:

<title>{{ site['name'] }}</title>

User variables

Variable user available in any twig file

Name type default description
user['id'] integer null User ID
user['auth'] boolean false Verify user authorization. Accepting the value true or false
user['username'] string null Username
user['balance'] numeric 0.00 User balance amount in panel currency
user['balance_formatted'] string $0.00 User balance amount with currency symbol in the selected by user currency
user['spent'] string null Spent balance
user['spent_formatted'] string null Formatted spent balance with currency
user['discount'] integer 0 User discount in percent
user['timezone'] integer 0 Timezone panel
user['apikey'] string generated key User API Key
user['is_generated_apikey'] boolean false Check if the user api key is generated or not
user['email'] string null Email user
user['skype'] string null Skype user
user['first_name'] string null First name user
user['last_name'] string null Last name user
user[’whatsapp’] string null WhatsApp user
user['phone'] string null Phone user
user['telegram'] string null Telegram user
user['website'] string null Website user
user['lang'] string en Selected default language
user['unread_ticket'] integer 0 Number of unread tickets
user['ordersActive'] integer 0 Returns the number of all user orders
user['referral_link'] string '' Referral link, if the option is enabled. Admin panel: Settings -> General
user['favorite_services'] boolean true Favorite Services, if the option is enabled. Admin panel: Settings -> General
user['level'].id integer null Id of assigned level, if 'User level system' module enabled. Admin panel: Settings -> Modules
user['level'].title string null Title of assigned level, if 'User level system' module enabled. Admin panel: Settings -> Modules
user['level'].discount integer null Has same value as user['discount']. If 'User level system' module disabled, then null will be set. Admin panel: Settings -> Modules

For example, if user is authorized, we can display his username or balance:

{% if user['auth'] %}
    <p>Hello, user['username']</p>
{% endif %}
Object user['currency']
Name type default description
format string null Format to display the currency symbol with the numeric value, for example, “$100”
symbol string null Currency symbol, for example, “$”
label string null Format to display the currency selection to users, for example, “USD $”
{{ user.currency.label }}

Alerts (Error/Success) variables

Error! Request failed

Error variables

Name type default description
error boolean false Output true on error
errorMessage string description error Error message

Success! Request was successful

Success variables

Name type default description
success boolean false Output true on success
successMessage string description success Success message

successMessage and errorMessage does not work without a variable error and success. Alerts should be output in tag <form>

<form>
   {% if error %}
     <div class="alert alert-dismissible alert-danger">
      <button type="button" class="close" data-dismiss="alert">×</button>
          {{ errorMessage }}
     </div>
   {% endif %}
</form>

Pagination

Pagination variables

Name type default description
pagination['count'] integer 0 Count pages
pagination['current'] integer 0 Active page item
pagination['pages'] integer 0 Number all pages
pagination['next'] integer 0 Count next page
pagination['prev'] integer 0 Count preview page
pagination['last'] integer 0 Count last page
{% if pagination['count'] > 100 %}
  <ul class="pagination {% if site['rtl'] %} rtl-pagination {% endif %}">
      {% if pagination['current'] != 1 %}
          <li>
              <a href="{{ page['url'] }}/{{ status }}/{{ pagination['last'] }}" aria-label="Previous">
                  <span aria-hidden="true">«</span>
                  </a>
          </li>
      {% endif %}

      {% set r, l = 3, 3 %}

      {% if pagination['current'] == 1 %}
          {% set r = 6 %}
      {% endif %}

      {% if pagination['current'] == 2 %}
          {% set r = 5 %}
      {% endif %}

      {% if pagination['current'] >= pagination['pages'] %}
          {% set l = 5 %}
      {% endif %}

      {% for i in 1..ceil(pagination['pages']) %}
          {% if i >= (pagination['current']-l) and i <= (pagination['current']+r) %}
              <li{% if i == pagination['current'] %} class="active"{% endif %}><a href="{{ page['url'] }}/{{i}}">{{i}}</a></li>
    {% endif %}
      {% endfor %}

      {% if pagination['current'] < pagination['pages'] %}
          <li>
              <a href="{{ page['url'] }}/{{ status }}/{{ pagination['next'] }}" aria-label="Next">
                  <span aria-hidden="true">»</span>
              </a>
          </li>
      {% endif %}
  </ul>
{% endif %}

                

Functions

sha256

Computes the Secure Hashing Algorithm 2 (SHA-2) hash of a given string and encodes it with a 256-bit digest.

Params

Parameter Type Description
text string Required. The string that needs to be encoded.
key string Required. Secret key that is used for hash generation.

Returns a string value. Example: 6afa9046a9579cad143a384c1b564b9a250d27d6f6a63f9f20bf3a7594c9e2c6


<div>{{sha256('text', 'key')}}</div>

Templates variables

Variables of particular template can only be applied to oneself!

layout.twig

Name type default description
content string Content page Required variable. Displays dynamic content.


<body>{{ content }}</body>



signin.twig

Alerts variables

Name type default description
success boolean false If order success
error boolean false If order error
successMessage string null Return success message
errorMessage string null Return error message

List of variables signin.twig

Name type default description
authText string null Page content. Specified in Admin panel: Appearance -> Pages
registration boolean false If this option is enabled, we output registration link. Specified in Admin panel: Settings -> General
captcha boolean false Display captcha

{% if registration %}
    <span class="pull-right pull-right-middle">{{ lang('signin.text') }} <a href="/signup">{{ lang('signup.title') }}</a></span>
{% endif %}



signup.twig

Alerts variables

Name type default description
success boolean false If order success
error boolean false If order error
successText string null Return success message
errorMessage string null Return error message

List of variables signup.twig

Name type default description
check_agreement boolean false Check agreement before submit form
fields array [] Fields array - always contains default fields
field.code string null Field code
field.label string null Field label
field.type string text Field type
field.value string null User entered field value
termsofservice string '' Terms of service checkbox. Specified in Admin panel:
Settings -> General

{% for field in fields %}
  <div class="form-group">
    <label for="{{ field.code }}" class="control-label">{{ lang(field.label) }}</label>
       <input type="{{ field.type }}" class="form-control" id="{{ field.code }}"
       value="{{ field.value }}"
       name="RegistrationForm[{{ field.code }}]">
  </div>
{% endfor %}



neworder.twig

Alerts variables

Name type default description
success boolean false If order success
error boolean false If order error
errorMessage string null Return error message

List of variables neworder.twig

Name type default description
order['id'] integer 0 Order ID
order['service'] string null Order service
order['link'] string null Order link
order['delay'] string null Delay for Auto-order
order['expiry'] string null Expiry for Auto-order
order['quantity'] string null Order quantity
order['charge'] string null Order charge
order['original_charge'] string null Order charge shown in the tooltip
order['balance'] string null Order balance
order['original_balance'] string null Order balance shown in the tooltip
order['quantity_max'] integer 0 Order quantity max
order['quantity_max'] integer 0 Order quantity min
order['posts'] integer 0 Orders posts
data['posts'] string null Number of posts
data['min'] string null Minimum value
data['max'] string null Maximum value
data['termsofservice'] string null Chosen value of consent
data['runs'] string null Number of runs
data['category'] string null Category value
data['service'] string null Serice value
data['user_name'] string null Username
data['link'] string null Link value
data['quantity'] string null Quantity value
data['keywords'] string null Keywords value
data['comment'] string null Comment value
data['mentionUsernames'] string null Mention usernames value
data['usernames'] string null Usernames value
data['username_custom'] string null Custom username value
data['username'] string null Username value
data['check'] boolean false Drip-feed check
data['description'] string null Description service
data['mediaUrl'] string null Media URL value
data['topic'] string null Topic service
data['password'] string null Password
data['expiry'] string null Expiry
data['total_quantity'] string null Total quantity
data['comment_username'] string null Username comment
data['answer_number'] string null Answer number
data['hashtag'] string null Hashtag value
data['hashtags'] string null Hashtags value
data['interval'] string null Interval value
data['delay'] string null Delay value
data['fields'] string null Array save form data
order['converted'] boolean false Check if the panel currency is different from the currency selected by the user and whether or not to show the tooltip
check_agreement boolean false Check agreement before submit form
termsofservice string '' Content page Terms of Service. Specified in Admin panel: Appearance -> Pages
newOrderText string '' Page content. Specified in Admin panel: Appearance -> Pages
services_search boolean true Displays the new order search field
Array categories
Name type default description
categoryId integer 1 Category ID
categoryName string null Category name
Array extended_categories
Name type default description
id integer 1 Category ID
name string null Category name
icon object null Icon object {"icon": null, "url": "/img/icon.jpeg": "icon_type": "image", "id": 1 }
Array delays
Name type default description
value integer 0 Delay value
label string null Name of delay

{% if categories %}
  <div class="form-group">
     <label for="orderform-category" class="control-label">{{ lang('neworder.category') }}</label>
        <select class="form-control" id="orderform-category" name="OrderForm[category]">
          {% for categoryId,categoryName in categories %}
              <option value="{{ categoryId }}" {% if categoryId == data['category'] %} selected {%endif%}>{{ categoryName }}</option>
          {%endfor%}
        </select>
  </div>
{% endif %}



massorder.twig

Alerts variables

Name type default description
success boolean false If order success
error boolean false If order error
errorMessage string null Return error message

List of variables massorder.twig

Name type default description
order['link'] string null Link order
order['success'] integer 0 Number of successful orders
order['error'] integer 0 Number of errors orders
success boolean false Success order
error boolean false Error order

{% if error %}
   <div class="alert alert-dismissible alert-danger {% if site['rtl'] %} rtl-alert {% endif %}">
       <button type="button" class="close" data-dismiss="alert">×</button>
			{% if order['link'] %}
               <h4>{{ errorMessage }}</h4>
				{{lang('massorder.orders')}}: {{order['success']}}<br>
				{{lang('massorder.errors')}}: {{order['error']}}<br>
            <a href="{{ order['link'] }}" target="_blank">{{ lang('massorder.button.details') }}</a>
				{% else %}
					{{ errorMessage }}
				{% endif %}
    </div>
{% endif %}
                  



drip_feed.twig

List of variables drip_feed.twig

Name type default description
status string all Drip-feed status (Active, Finished, Stopped)
search string null Search value
Array dripFeedList
Name type default description
['id'] integer 1 Drip-feed ID
['link'] string null Order link
['date'] string date Order creation date
['total_charges'] integer 0 Drip-feed total charges
['quantity'] integer 0 Order quantity
['service'] string null Name of service
['service_id'] integer 1 Service ID
['runs_all'] integer 0 Drip-feed all runs amount
['runs_current'] string null Drip-feed current runs amount
['interval'] string No active Drip-feed interval
['total_quantity'] integer 0 Drip-feed total quantity
['status_name'] string active Drip-feed status name

{% for dripFeed in dripFeedList %}
   <tr>
     <td>{{ dripFeed['id'] }}</td>
     <td>{{ dripFeed['date'] }}</td>
     <td class="link">{{ dripFeed['link'] }}</td>
     <td nowrap="">{{ dripFeed['total_charges'] }}</td>
     <td>{{ dripFeed['quantity'] }}</td>
     <td>{{ dripFeed['service'] }}</td>
     <td class="nowrap">
       {% if dripFeed['runs_current' %}
         <a href="/orders?drip-feed={{ dripFeed['id'] }}">
           {{ dripFeed['runs_current'] }}
         </a>
       {% else %}
          {{ dripFeed['runs_current'] }}
       {% endif %} / {{ dripFeed['runs_all'] }}
     </td>
     <td>{{ dripFeed['interval'] }}</td>
     <td>{{ dripFeed['total_quantity'] }}</td>
     <td>{{ dripFeed['status_name'] }}</td>
   </tr>
{% endfor %}



services.twig

List of variables services.twig

Name type default description
servicesText string null Page content. Specified in Admin panel: Appearance -> Pages
serviceDescription boolean false Service description. Specified in Admin panel: Settings -> General
converted boolean false Converted
Array serviceCategoryList
Name type default description
['id'] integer 0 Category id
['name'] string null Category name
['service'] array null Array service
Array serviceCategoryList['service']
Name type default description
['id'] integer 1 Service ID
['name'] string null Service name
['name'] string null Service name
['rate'] string null Service rate
['original_rate'] string null Service rate shown in the tooltip
['favorite'] boolean false Favorite service option
['min'] integer 0 Service min value
['max'] integer 0 Service max value
['average_time'] string Not enough data Returns average lead time service
['description'] boolean false If this option is enabled, we output a description. Specified in Admin panel: Settings -> General

{% for service in category['services'] %}
   <tr>
      <td>{{ service['id'] }}</td>
      <td>{{ service['name'] }}</td>
      <td>{{ service['rate'] }}</td>
      <td>{{ service['min'] }}</td>
      <td>{{ service['max'] }}</td>
        {% if serviceDescription %}
          <td class="hidden-xs hidden-sm service-description">{{service['description']}}</td>
            <tr class="visible-xs visible-sm service-description">
              <td colspan="5">{{service['description']}}</td>
            </tr>
        {% endif %}
   </tr>
{% endfor %}

Filters and search

    {% for service in category['services'] %}
        <a href="/?service={{service['id']}}">{{ lang('services.create_order') }}</a>
    {% endfor %}
{% if serviceCategoryList is empty %}
    {% else %}
        <li>
            <a class="dropdown-item" href="#" data-filter-category-id="All">All</a>
        </li>
{% endif %}
{% for category in serviceCategoryList %}
    {% if category.name %}
        <li>
            <a class="dropdown-item" href="#" data-filter-category-id="{{ category.id }}" data-filter-category-name="{{ category.name }}">{{ category.name }}</a>
        </li>
    {% endif %}
{% endfor %}
<ul class="dropdown-menu" id="currencies-list">
    {% for key, rate in site.currencies %}
        <li>
            <a class="dropdown-item" href="#" id="currencies-item" data-rate-key="{{ key }}" data-rate-symbol="{{ rate.symbol }}">{{ key }}
                {{ rate.symbol }}</a>
        </li>
    {% endfor %}
</ul>
<table class="table {% if site['rtl'] %} rtl-table {% endif %}" id="service-table">
<thead>
<tr>
        <th>{{ lang('services.id') }}</th>
        <th class="width-service-name">{{ lang('services.name') }}</th>
        <th class="nowrap">{{ lang('services.rate') }}</th>
        <th class="nowrap">{{ lang('services.min') }}</th>
        <th class="nowrap">{{ lang('services.max') }}</th>
        {% if site['average_time'] %}
            <th class="nowrap">{{ lang('services.average_time') }}
            <span class="fa fa-exclamation-circle" data-toggle="tooltip" data-placement="top" title="{{ lang('services.average_time.description') }}"></span>
            </th>
        {% endif %}
        {% if serviceDescription %}
        <th class="hidden-xs hidden-sm service-description__th">{{ lang('services.description') }}</th>
        {% endif %}
        </tr>
    </thead>
<tbody>
    {% for category in serviceCategoryList %}
        {% if category['name'] %}
        <tr data-filter-table-category-id="{{ category.id }}">
        <td colspan="6">
        <strong>{{ category['name'] }}</strong>
                    </td>
            </tr>
        {% endif %}
        {% for service in category['services'] %}
            <tr data-filter-table-category-id="{{ category.id }}">
                <td data-filter-table-service-id="{{ service.id }}">{{ service['id'] }}</td>
                <td class="service-name" data-filter-table-service-name="true">{{ service['name'] }}</td>
                <td>
                    {% if converted %}
                        <span data-toggle="tooltip" data-placement="top" title="{{ service.original_rate }}">{{ service.rate }}</span>
                    {% else %}
                        {{ service.rate }}
                    {% endif %}
                </td>
                <td>{{ service['min'] }}</td>
                <td>{{ service['max'] }}</td>
                {% if site['average_time'] %}
                    <td class="nowrap">{{ service['average_time'] }}</td>
                {% endif %}
                {% if serviceDescription %}
                    <td class="hidden-xs hidden-sm service-description">{{ service['description'] }}</td>
                    <tr class="visible-xs visible-sm service-description">
                        <td colspan="6">{{ service['description'] }}</td>
                    </tr>
                {% endif %}
            </tr>
        {% endfor %}
    {% endfor %}
</tbody>
</table>



orders.twig

List of variables orders.twig

Name type default description
status string all Current status
search string null Search value
task integer 0 Type task (refill or cancel)
Array orderList
Name type default description
['id'] integer 1 Order ID
['date'] string date order Order date
['link'] string null Order link
['charge'] string null Order charge
['start_count'] integer 0 Order start count
['quantity'] string null Order quantity
['service_id'] integer null Service ID
['service'] string null Service name
['category'] string null Service category name
['status'] string Pending Current order status
['remains'] boolean false Is there result or not
['refill'] string null Refill link
['refilling'] boolean false If order is Refilling
['cancel'] string null Cancel link
['refillAvailableTime'] string null Refill available time

{% for order in orderList %}
<tr>
  <td>{{ order['id'] }}</td>
  <td>{{ order['date'] }}</td>
  <td class="width-40">{{ order['link'] }}</td>
  <td>{{ order['charge'] }}</td>
  <td class="nowrap">{{ order['start_count'] }}</td>
  <td>{{ order['quantity'] }}</td>
  <td><a href="/orders?service={{ order['service'] }}">{{ order['service'] }}</a></td>
  <td>{{ order['category'] }}</td>
  <td>{{ order['status'] }}</td>
  <td>{{ order['remains'] }}</td>
  {% if task == 1 %}
      <td>
        <div class="order-actions">
          {% if order['refill'] == 1 %}<a href="/order/{{order['id']}}/refill" class="btn btn-xs btn-primary">{{lang('orders.button.refill')}}</a>{%endif%}
          {% if order['cancel'] == 1 %}<a href="/order/{{order['id']}}/cancel" class="btn btn-xs btn-default">{{lang('orders.button.cancel')}}</a>{%endif%}
          {% if order['refillAvailableTime'] %}
            <button class="btn btn-xs btn-primary disabled" data-toggle="tooltip" data-placement="top" title="{{ order['refillAvailableTime'] }}">{{ lang('orders.button.refill') }}</button>
          {% endif %}
          </div>
      </td>
  {% endif %}
</tr>
{% endfor %}

Array searchList
Name type default description
['name'] string null Search params
['value'] string null Search value




subscriptions.twig

List of variables subscriptions.twig

Name type default description
search string null Search value
status string 'all' Current status
Array orderList
Name type default description
['id'] integer 1 ID Service
['link'] string null Order link
['quantity_min'] integer 0 Order quantity minimum
['quantity_max'] integer 0 Order quantity maximum
['quantity'] integer 0 Number of new posts for which a subscription order was created
['current_count'] integer 0 Number of new posts that were parsed and for which orders were automatically created on this moment
['current_old_posts'] integer 0 Number of old posts that were parsed and for which orders were automatically created on this moment
['old_posts'] integer 0 Number of old posts for which a subscription order was created
['delay'] string null Order delay
['service'] string null Service name
['service_id'] integer 1 Service ID
['status_name'] string No active Status subscription
['date_created'] string date created Order creation date
['date_expiry'] string date expiry Order expiry date
['date_updated'] string date updated Order renewal date
['status'] integer 0 Order status code

{% for order in orderList %}
   <tr>
     <td>{{ order['id'] }}</td>
     <td class="link">{{ order['link'] }}</td>
     <td class="nowrap">{% if order['quantity_min'] == order['quantity_max'] %}{{ order['quantity_max']}}{% else %}{{ order['quantity_min'] }}-{{ order['quantity_max'] }}{% endif %}</td>
     <td class="nowrap">
       {% if order['current_count'] %}
           <a href="{{ page_url('orders') }}?subscription={{ order['id'] }}&likes_spread=0">{{ order['current_count'] }}</a>
       {% else %}
            {{ order['current_count'] }}
       {% endif %}
            / {{ order['quantity'] }}</td>
     <td class="nowrap">
       {% if order['current_old_posts'] %}
           <a href="{{ page_url('orders') }}?subscription={{ order['id'] }}&likes_spread=1">{{ order['current_old_posts'] }}</a>
       {% else %}
           {{ order['current_old_posts'] }}
       {% endif %}
           / {{ order['old_posts'] }}</td>
     <td>{{ order['delay'] }}</td>
     <td>{{ order['service'] }}</td>
     <td>{{ order['status_name'] }}</td>
     <td><span class="nowrap">{{ order['date_created'] }}</span></td>
     <td><span class="nowrap">{{ order['date_updated'] }}</span></td>
     <td><span class="nowrap">{{ order['date_expiry'] }}</span></td>
     <td>
        {% if order['status'] == 1 or order['status'] == 0 %}
           <a href="{{ page['url'] }}/stop/{{order['id']}}" class="btn btn-default btn-xs">{{ lang('subscriptions.button.cancel') }}</a>
        {% endif %}
        {% if order['status'] == 2 %}
           <a href="{{ page['url'] }}/resume/{{order['id']}}" class="btn btn-primary btn-xs">{{ lang('subscriptions.button.unpause') }}</a>
        {% endif %}
        {% if order['status'] == 3 or order['status'] == 4 or order['status'] == 5 %}
           <a href="{{ page['url'] }}/reorder/{{order['id']}}" class="btn btn-primary btn-xs">{{ lang('subscriptions.button.reorder') }}</a>
        {% endif %}
     </td>
   </tr>
{% endfor %}



addfunds.twig

Alerts variables

Name type default description
success boolean false If order success
error boolean false If order error
successText string null Return success message
errorText string null Return error message

List of variables addfunds.twig

Name type default description
addfunds string null Page content. Specified in Admin panel: Appearance -> Pages
currentPayment string null Current payment system

Array paymentsList
Name type default description
['id'] integer 1 ID payment system
['name'] string null Name of payment system

<select class="form-control" id="method">
    {% for payment in paymentsList %}
        <option value="{{ payment['id'] }}"{% if currentPayment == payment['id'] %} selected{% endif %}>{{ payment['name'] }}</option>
    {% endfor %}
</select>

refunds.twig

List of variables refunds.twig

Name type default description
type integer all Refund type (1 - Canceled, 2 - Partial)
search string null Search value (order id)
Array refundList
Name order_status default description
['order_status'] integer 1 refund type
['date'] string date Refund creation date
['amount'] string 0.0001 Refunded amount
['order_id'] integer 1 Order ID
['order_status_name'] string Partial Refund type name

{% for refund in refundList %}
   <tr>
     <td>{{ refund['order_id'] }}</td>
     <td nowrap="">{{ refund['amount'] }}</td>
     <td>{{ refund['order_status'] }}</td>
     <td>{{ refund['date'] }}</td>
   </tr>
{% endfor %}



tickets.twig

Alerts variables

Name type default description
success boolean false If created ticket

List of variables tickets.twig

Name type default description
ticketsText string null Page content. Specified in Admin panel: Appearance -> Pages
search string null Search value
additionalFieldsEnabled boolean false Ticket categories. Specified in Admin panel: Settings -> Ticket categories
Array ticketList
Name type default description
['id'] integer 1 Ticket ID
['theme'] string null Ticket Title
['new'] integer 1 Read message
['time'] string null Date of message
['status'] string open Status ticket
Array additionalFields
Name type default description
['id'] number null Category name
['name'] string 1 Category name



viewticket.twig

Alerts variables

Name type default description
errorMessage string null Error message

List of variables viewticket.twig

Name type default description
ticket['thema'] string null Ticket Title
ticket['id'] string null Ticket ID
canAddMessage boolean false If administrator chooses Close and lock ticket
Array messageList
Name type default description
['id'] string null ID message
['message'] string null Output message
['time'] string null Date of message
['author'] string null Author of message
['support'] boolean null Message left by support
['files'] array [] Attached files



resetpassword.twig

Alerts variables

Name type default description
success boolean false If order success
error boolean false If order error
successText string null Return success message
errorMessage string null Return error message

Alerts variables
Name type default description
success boolean false Return true if form success
error boolean false Return true if form error
errorMessage string null Return error message

List of variables resetpassword.twig
Name type default description
resetPasswordStep integer 1
Value 1 - enter the email
Value 2 - enter a new password
user['username'] string null Return username if active step 2

You can use variables site['variable'], user['variable'] and alerts




faq.twig

List of variables faq.twig

Name type default description
faq string null Page content. Specified in Admin panel: Appearance -> Pages

{% if faq %}
 <div class="well">
    {{ faq }}
 </div>
{% endif %}



api.twig

List of variables api.twig

Array methods
Name type default type order
method string null Key API method
methodDetails array null Description API method
Array methodDetails
Name type default type order
['title'] string null Method name
['types'] array array Method types
['parameters'] array null Possible types of order creation with parameters
['examples'] string null Example of JSON response from the server
Array methodDetails['parameters']
Name type default type order
['parameter'] string null Method key
['label'] string null Method label



terms.twig

List of variables terms.twig

Name type default description
termsofservice string null Page content. Specified in Admin panel: Appearance -> Pages



affiliates.twig

List of variables affiliates.twig
Name type default description
affiliates string null Page content. Specified in Admin panel: Appearance -> Pages
referral_link string Referral link
commission_rate string 1 Percentage commission. Changes Admin panel: Settings -> General
minimum_payout string 10 Minimum payout. Changes Admin panel: Settings -> General

Array statistics
Name type default description
['total_visits'] string 0 Number of visits
['referral_registrations'] string 0 Registred referrals
['paid_referrals'] string 0 Paid referrals
['conversion_rate'] string 0% Conversion rate
['total_earnings'] string 0 Total earnings
['unpaid_earnings'] string 0 Unpaid earnings
['request_payout'] boolean false Return true if user can withdraw funds

<table class="table {% if site['rtl'] %} rtl-table {% endif %}">
  <thead>
  <tr>
      <th>{{ lang('affiliates.visits') }}</th>
      <th>{{ lang('affiliates.registrations') }}</th>
      <th>{{ lang('affiliates.referrals') }}</th>
      <th>{{ lang('affiliates.conversion_rate') }}</th>
      <th>{{ lang('affiliates.total_earnings') }}</th>
      <th>{{ lang('affiliates.available_earnings') }}</th>
      {% if statistics['request_payout'] %}
          <th></th>
      {% endif %}
  </tr>
  </thead>
  <tbody>
  <tr>
      <td>{{ statistics['total_visits'] }}</td>
      <td>{{ statistics['referral_registrations'] }}</td>
      <td>{{ statistics['paid_referrals'] }}</td>
      <td>{{ statistics['conversion_rate'] }}</td>
      <td>{{ statistics['total_earnings'] }}</td>
      <td>{{ statistics['unpaid_earnings'] }}</td>
      {% if statistics['request_payout'] %}
          <td>
              <a href="{{ page['url'] }}/request-payout" class="btn btn-xs btn-default">{{ lang('affiliates.request_payout') }}</a>
          </td>
      {% endif %}
  </tr>
  </tbody>
</table>

Array payments
Name type default description
['id'] string ID ID payment
['date'] string null Payment date
['amount'] string Minimum payouts Payment amount
['status'] string Pending Status

{%  if payments|length %}
<div class="well well-float">
    <table class="table {% if site['rtl'] %} rtl-table {% endif %}">
        <thead>
        <tr>
            <th>{{ lang('affiliates.payout_date') }}</th>
            <th>{{ lang('affiliates.payout_amount') }}</th>
            <th>{{ lang('affiliates.payout_status') }}</th>
        </tr>
        </thead>
        <tbody>
        {% for payment in payments %}
            <tr>
                <td>{{ payment['date'] }}</td>
                <td>{{ payment['amount'] }}</td>
                <td>{{ payment['status'] }}</td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
</div>
{% endif %}

You can use variables site['variable'], user['variable'] and alerts




account.twig

Alerts variables

Name type default description
success boolean false If order success
error boolean false If order error
successText string null Return success message
errorText string null Return error message

Array timezones
Name type default description
['timezone'] integer timezone Timezone
['label'] string label Label timezone

Second Factor variables

Name type default description
['twofactorauth.success'] string '' Checking and displaying the 2FA success notification. The text is taken from account.2fa.success_enabled and account.2fa.success_disabled language variables.
['twofactorauth.url.generate'] string '' The link that is required for generating and sending a letter with 2fa code when the user activates 2FA.
['twofactorauth.url.approve'] string '' The link that is required for confirming the activation of 2FA.
['twofactorauth.active_code'] boolean false Returns true if a 2fa code has already been generated and is working.
['twofactorauth.error'] string '' Checking and displaying the 2FA error notification. The notification text is taken from 2fa.error language variables.
['twofactorauth.activated'] integer 1 Returns '1' if a 2FA is not activated for user.

Template account.twig without unique variables. You can use variables site['variable'],user['variable'] and alerts




notifications.twig

List of variables notifications.twig

Name Type Default description
success boolean false Output true on success
successText string null Notifications success text
confirmEmail.available boolean boolean Output is available email confirmation
connectTelegram.available boolean boolean Output is available connecting Telegram
connectTelegram.url string '' Returns Telegram connection link to ajax
confirmEmail.url string '' Returns Email confirmation link to ajax
saveButtonAvailable boolean boolean Output is available to save notifications settings

Array userNotifications
Name type default description
['notifications'] array array List of notifications settings
['senders'] array array List of notifications senders

Array userNotifications['notifications']
Name type default description
['id'] integer integer Notification ID
['name'] string '' Notification name
['statuses'] array array Notification senders statuses (available or not)

Array userNotifications['senders']
Name type default description
['id'] integer integer Sender ID
['code'] string string Sender code (literal ID)
['name'] string '' Sender name
['disabled'] boolean boolean Is sender disabled
['tooltip'] string string tooltip, which is applied if the sender is disabled

{% for notification in userNotifications['notifications'] %}
<tr>
  <td>{{ notification['name'] }}</td>
  {% for sender in userNotifications['senders'] %}
    <td>
      <span {% if sender['disabled'] %}data-toggle="tooltip" data-placement="top" title="{{ sender['tooltip'] }}"{% endif %}>
        <input type="hidden" name="NotificationsForm[notifications][{{ sender['code'] }}][{{ notification['id'] }}]" value="0"/>
        <input type="checkbox" name="NotificationsForm[notifications][{{ sender['code'] }}][{{ notification['id'] }}]" {% if notification['statuses'][sender['code']] %}checked="checked"{% endif %} {% if sender['disabled'] %}disabled{% endif %} value="1"/>
      </span>
    </td>
  {% endfor %}
</tr>
{% endfor %}



blog.twig

List of variables blog.twig
Name type default description
blog string null Page content. Specified in Admin panel: Appearance -> Pages

Array posts
Name type default description
['id'] string ID ID post
['created'] date null Post creation date
['title'] string null Title post
['content'] string null Short content
['url'] string link Post link
['image'] string null Image post

{% for post in posts %}
  <div class="well">
      <h4>{{ post['title'] }}</h4>
      <h5>{{ post['creates_at'] }}</h5>
      {% if post['image'] %} <p><img src="{{ post['image'] }}" alt="{{ post['title'] }}" class="img-responsive"></p> {% endif %}
      <div>{{ post['content'] }}</div>
      <a href="{{ page_url('blog') }}/{{ post['url'] }}" class="btn btn-primary">{{ lang('blog.link') }}</a>
  </div>
{% endfor %}

You can use variables site['variable'], user['variable'] and alerts




blogpost.twig

List of variables blogpost.twig
Name type default description
post['image'] string null Preview image
post['title'] string null Title post
post['content'] string null Content
post['created'] date null Post creation date
post['created_iso_8601'] date null Post creation date in ISO-8601 format
post['updated'] date null Post update date
post['updated_iso_8601'] date null Post update date in ISO-8601 format

You can use variables site['variable'], user['variable'] and alerts




newpage.twig

List of variables newpage.twig
Name type default description
content string null Content page

You can use variables site['variable'], user['variable'] and alerts




child_panel.twig

List of variables child_panel.twig
Name type default description
childpanel string null Page content. Specified in Admin panel: Appearance -> Pages
error boolean false If an error occurs renew
errorMessage string Error text Text of the error.
successMessage string Success text Child panel success Message
errorForm boolean false Error in the order form child panel
errorFormMessage string Error text Order error text
renew boolean false Is it necessary to renew child panel. Output true in 7 days
renewUrl string link Link for renew
renewMessage string null Renew message
restore boolean false Is it necessary to restore child panel
restoreUrl string link Link for restore
showForm boolean true If there is no panel ordered - output true
price string admin price Price child panel. Changes in Admin panel: Settings -> General

Array panelsList
Name type default description
['domain'] string domain Domain child panel
['status'] string 0 Status order
['created'] string null Created date
['expiry'] string null Expiry date
['admin'] boolean false Return true if panel created
['admin_url'] string link Admin dashboard link
['renew'] boolean false Return true if panel need to renew
['renew_url'] string link Renew link

{% for panel in panelsList %}
  <tr>
      <td>{{ panel['domain'] }}</td>
      <td>{{ panel['status'] }}</td>
      <td nowrap>{{ panel['created'] }}</td>
      <td nowrap>{{ panel['expiry'] }}</td>
      <td nowrap>
          {% if panel['admin'] %}
              <a href="{{ panel['admin_url'] }}" class="btn btn-xs btn-default"
                 target="_blank">{{ lang('child_panel.button.admin') }}</a>
          {% endif %}
      </td>
  </tr>
{% endfor %}

Array currenciesList
Name type default description
['code'] string code Currency code. For example: USD
['name'] string name Currency name

{% for currency in currenciesList %}
<option value="{{ currency['code'] }}" {% if form['currency'] == currency['code'] %} selected{% endif %}>
    {{ currency['name'] }}
</option>
{% endfor %}

Array form
Name type default description
['domain'] string Saves the value entered in the field domain
['currency'] string Saves the value entered in the field currency
['username'] string Saves the value entered in the field username
['password'] string Saves the value entered in the field password
['password_confirm'] string Saves the value entered in the field password_confirm

You can use variables site['variable'], user['variable'] and alerts




refill.twig

List of variables refill.twig

Name type default description
search string null Search value
status string 'all' Current status
Array refillList
Name type default description
['id'] integer 1 ID Task
['order_id'] integer 1 Order ID
['link'] string null Order link
['date'] string date created Refill task creation date
['service'] string null Service name
['service_id'] integer 1 Service ID
['status'] string Completed Refill status name

{% for refill in refillList %}
   <tr>
     <td>{{ refill['id'] }}</td>
     <td><span class="nowrap">{{ refill['date'] }}</span></td>
     <td>{{ refill['order_id'] }}</td>
     <td class="width-40">{{ refill['link'] }}</td>
     <td>{{ refill['service'] }}</td>
     <td>{{ refill['status'] }}</td>
   </tr>
{% endfor %}



updates.twig

List of variables updates.twig

Name type default description
search string null Search value
type string 'all' Current type
updates.service string 'Service' Table "Service" column heading
updates.date string 'Date' Table "Date" column heading
updates.update string 'Update' Table "Update" column heading
updates.all string 'All' Filter type "All"
updates.new_service string 'New service' Filter type "New service"
updates.rate.decreased string 'Rate decreased' Filter type "Rate decreased"
updates.rate.increased string 'Rate increased' Filter type "Rate increased"
updates.rate.changed_from string 'from' Update rate range "from"
updates.rate.changed_to string 'to' Update rate range "to"
updates.service_enabled string 'Service enabled' Filter type "Service enabled"
updates.service_disabled string 'Service disabled' Filter type "Service disabled"
Array updatesList
Name type default description
['id'] integer 1 ID update log
['service_id'] integer 1 Service ID
['date'] string date created Refill task creation date
['service'] string null Service name
['type'] string New service Update type name

{% for update in updatesList %}
   <tr>
     <td>{{ update['service_id'] }} {{ update['service'] }}</td>
     <td><span class="nowrap">{{ update['date'] }}</span></td>
     <td>{{ update['update'] }}</td>
   </tr>
{% endfor %}
Array types
Name type default description
['key'] integer new Filter type key
['label'] integer New service Filter type label

{% if types %}
  {% for typeItem in types %}
     <li {% if typeItem.key == type %}class="active"{% endif %}> <a href="{{ page['url'] }}{% if typeItem.key != 'all' %}{{ '/' ~ typeItem.key }}{% endif %}">{{ typeItem.label }} </a> </li>
  {% endfor %}
{% endif %}
RTL Version

Panels support the RTL version of site. You can enable the RTL version in Admin panel: Appearance -> Languages -> Active language

Variable site['rtl'] is available in each .twig files.

Name type default description
site['rtl'] boolean false Takes a value of true or false. If the RTL version of the site is enabled, the value true. Applicable with a combination of construction {% if %}

With help of class rtl-, DOM element takes the RTL form. For example, the rtl-form class is used to display the <form>

<form class="{% if site['rtl'] %} rtl-form {% endif %}">
      <button type="submit" class="btn btn-primary">Submit</button>
</form>

List of rtl classes:

DOM elements
Class description
.rtl-table <table>
.rtl-navbar <nav>
.rtl-form <form>
.rtl-btn <button>
.rtl-ul <ul>
Custom RTL classes
Class description
.rtl-alert Alerts
.rtl-modal Modals
.rtl-nav DOM element nav
.rtl-pagination Pagination
.rtl-content Content block. You can add it to any DOM elements

If you do not know which class to use for a particular item (for example <div>), then use .rtl-content. Also you can create your rtl classes in style.css

Languages

Panels can be translated into any language. Default language is specified in Admin panel settings: Appearance -> Languages.

To output language variable, use construct {{ lang('TOKEN') }}. Language token can be inserted into any .twig files.

For example, output Log in with a token signin.title

<h3 class="title">{{ lang('signin.title') }}</h3>