# Xcrud_config
xcrud/xcrud_config.php includes all xCRUD settings. Each setting's function is already well documented in the file.
# Database
To connect to the database server, contact your administrator to find out what connection parameters you should use. Once you know the proper parameters, you should be fill in the parameters below.
# $dbname
Name of the MySQL database.
# $dbuser
MySQL user name.
# $dbpass
MySQL user password.
# $dbhost
MySQL server host name. Defaults to 'localhost'
.
# Theme and Language
Theme support, language and localization settings.
# $theme
This setting specifies the directory name of the theme to use. xCRUD ships with several themes; this can be 'default'
, 'bootstrap'
, 'minimal'
or the directory name of your custom theme under the xcrud/themes/ directory.
# $language
Sets the default localization language. Defaults to 'en'
(English). The xcrud/languages/ directory includes more localization files. To use one, specify it's filename without the .ini file extension.
# $is_rtl
Set to true
to enable right-to-left (RTL) text mode.
# Database Advanced
Extra database settings.
# $dbencoding
Your database encoding. Defaults to 'utf8'
. Do not change, if not sure.
# $db_time_zone
Database time zone. Leave empty to use the system default.
# $mbencoding
Your multibyte character encoding. Defaults to 'utf-8'
. Do not change, if not sure.
# $dbprefix
Database table name prefix.
# Session
PHP session settings.
# $sess_name
If your script is already using the session, specify the session name for it. Defaults to 'PHPSESSID'
.
# $sess_expire
Specifies the lifetime of the session in minutes, and is also used as a safety measure for example, the maximum edit-saving timeout.
# $dynamic_session
This option is used for compatibility with frameworks and CMSs that use dynamic session names.
# Multi Session
# $multi_tab
# Alternative Session
These require memcache or memcached and mcrypt.
# $alt_session
Enables alternative session. Use this only if you are facing problems with native PHP sessions.
# $alt_encription_key
Used to encrypt alternative session data. It's a requirement if alternative session is enabled.
# $alt_lifetime
Specifies the lifetime of alternative session in minutes. In other words; it is the maximum time between requests when data can be valid.
# $mc_host
Memcache(d) host. Defaults to 'localhost'
.
# $mc_port
Memcache(d) port. Defaults to 11211
.
# Scripts
These are settings for the external javascript vendor libraries that are included with xCRUD.
# $load_bootstrap
Set to true
, if you want to load bootstrap (opens new window) via xCRUD. jQuery is required.
# $load_bootstrap4
Set to true
, if you want to load bootstrap v.4 (opens new window) via xCRUD. jQuery is required.
# $load_googlemap
Loads the Google Maps API (opens new window) for 'point'
data type. Set to false
, if your site already uses it.
# $load_jquery
Loads jQuery (opens new window). Set to false
if you already have jQuery on your page.
# $load_jquery_ui
Loads jQueryUI (opens new window). Set to false
if you already have jQueryUI on your page. Datepicker and slider widgets are mandatory.
# $load_jcrop
Loads the jCrop (opens new window) javascript cropping plugin.
# $jquery_no_conflict
Includes jQuery.noConflict()
. Use according to jQuery documentation (opens new window).
# $manual_load
xCRUD will automatically load scripts based on settings; this setting disables this functionality.
After activating this setting, you can use load_css() and the load_js() functions on your page to control xCRUD's script loading.
# $load_tabulator
Tabulator (opens new window) plugin support. Interactive data tables.
# $load_select2
Load Select2 (opens new window) plugin. A jQuery based replacement for select boxes.
# $load_parsley
Loads Parsley (opens new window), a javascript form validation library.
# $load_videojs
Loads the Video.js (opens new window) HTML5 web video player.
# $load_filuploader
Loads the file Upload (opens new window) widget with multiple file selection, drag & drop support, progress bar, validation and preview images, audio and video.
# Editors
Visual editor settings for <textarea>
form input elements.
# $editor_url
URL path to editor script, if you want to use a visual editor.
# $editor_init_url
URL path to your custom initialization file for the editor.
# $force_editor
Force initialization of editor, even if the path is not specified.
# $auto_editor_insertion
Inserts visual editor on textarea fields automatically.
# Grid Settings
xCRUD render output settings.
# $show_primary_ai_field
Show primary auto-increment field in create, edit and view screens.
# $show_primary_ai_column
Show primary auto-increment column in list view.
# $can_minimize
Displays a toggle button at the top right of the xCRUD rendered output parent element (<div>
block). It collapses and expands the element.
# $start_minimized
Start all xCRUD instances minimized. Best to enable $can_minimize to allow user interaction.
# $remove_confirm
Show confirmation dialog on remove action. Set to true
by default.
# $column_cut
Sets the maximum number of characters in the column. Ellipses (...) are appended to indicate truncated column data.
# $limit
Pagination: Default number of rows per page.
# $limit_list
Pagination $limit list. Set as an array of numbers and the keyword 'all'
as pagination limits.
# $clickable_list_links
Make all links, emails clikable in list view.
# $clickable_filenames
Make filenames clikable in list view.
# $fixed_action_buttons
If set to true
, action buttons on the right side of the table if hidden, appear on row hover. This is the default setting.
# $images_in_grid
Show images in list view.
# $images_in_grid_height
Maximum height of thumbnails in list view.
# $button_labels
Displays button labels in grid.
# $strip_tags
Remove all HTML tags from data in grid view. This does not affect custom tags.
# $safe_output
Encodes special characters to html-entities in grid view.
# Toast Popups
Notification popups settings.
# $load_toast
Load Toastify (opens new window). A vanilla JS toast nofitification library.
# $activate_toast_alerts
Activates toast alerts.
# $toast_success_color
Toast hex color code.
# $toast_error_color
Toast error hex color code.
Printing settings.
# $print_all_fields
Print all fields and rows of a table if true
or print only visible fields and all table rows if false
.
# $print_full_texts
Set to true
to ignore the $column_cut setting and print full column text.
# CSV Export
Comma-separated values export settings.
# $csv_delimiter
Default delimiter in CSV file.
# $csv_enclosure
Quotation marks surrounding data bits in the CSV file.
# $csv_all_fields
Export all fields and rows of a table if true
or export only visible fields and all table rows if false
.
# Editing
Edit screen settings.
# $make_checkbox
Display MySQL tinyint(1), bit(1), bool(1) and boolean(1) fields as checkboxes.
# $lists_null_opt
Display null(empty) - none -
option in all dropdowns and multi-selects.
# $enum_as_radio
Show MySQL ENUM data type fields as radio boxes if true
else as a dropdown by default.
# $set_as_checkboxes
Show MySQL SET data type fields as checkboxes if true
else as a multiselect by default.
# $upload_folder_def
Path to uploads folder on your server. The directory must exist. Relative paths are relative to the xCRUD folder.
# $not_null_is_required
Make MySQL NOT NULL fields required.
# Features
# $enable_printout
Show print button.
# $enable_search
Show search feature.
# $enable_pagination
Show pagination.
# $enable_csv_export
Show CSV export button.
# $enable_table_title
Show table title and minimize toggle button.
# $enable_numbers
Number rows sequentially in list screen.
# $enable_limitlist
Show pagination limits list as set by $limit_list.
# $enable_sorting
Allows column sorting.
# $benchmark
Display information about the performance.
# $nested_readonly_on_view
Turn off editing nested tables when viewing parent (can edit only when editing the parent).
# $default_tab
Sets a name for the tab of fields not assigned to any tab. This tab will be created automatically. The tab will not be created when set to false
.
# $nested_in_tab
Nested tables will be displayed as a tab if tabs are active.
# Alert Settings
Email alert settings.
# $email_from
Email from address.
# $email_from_name
Email from name.
# $email_enable_html
Enable HTML in email messages.
# Remote Request Options
# $use_browser_info
Allow the use of your browser cookie, referer and user agent for HTTP requests. BE CAREFUL: DON'T USE IT FOR REQUESTS TO EXTERNAL SITES!!!
# Date
# $date_first_day
First day of the week. Used in datepicker and search ranges. Set 0 for Sunday, 1 for Monday etc.
# $date_format
jQuery UI date format.
# $time_format
jQuery UI time format.
# $php_date_format
PHP date format.
# $php_time_format
PHP time format.
# Search
# $search_all
Enables the -all- option for search.
# $available_date_ranges
Available date ranges that can be translated in the language file.
# $search_pattern
Specify the wildcard characters for the MySQL LIKE clause. The first wildcard is prepended to the search term(s) input and the second appended after.
# $search_opened
Show the search input elements and functionality instead of requiring to click on the search link to display them.
# Map
Google Maps API settings
# $default_point
Coordinates to the default location.
# $default_text
Default location name.
# $default_zoom
Default zoom setting.
# $default_width
Map area width.
# $default_height
Map area height.
# $default_coord
true;
# $default_search
true;
# $default_search_text
'search_here';
# $google_map_api
Google Maps API key.
# xCRUD Folder
URLs in xCRUD.
# $scripts_url
URL to the xCRUD folder without a trailing slash. It can be relative, e.g. some_folder/xcrud or absolute, e.g. http://www.your_site.com/some_folder/xcrud. If empty, it will be generated automatically.
# $urls2abs
Turn relative URLs into absolute. Turn off if you have trouble with relative URLs.
# System Integration Options
Paths under this section are relative to the xCRUD folder, if $scripts_url is not defined)
# $plugins_uri
URI to plugins directory without trailing slashes.
# $themes_uri
URI to themes directory without trailing slashes.
# $lang_uri
URI to plugins directory without trailing slashes.
# $ajax_uri
URI to xcrud_ajax.php, the main xCRUD ajax calls handling file.
# $themes_path
URI to themes directory without trailing slashes.
# $lang_path
URI to plugins directory without trailing slashes.
# External Session
# $external_session
Use only when you are using external session management.
# Event Loading
# $before_construct
Name of a callable function. This will run before xCRUD instance creation.
# $after_render
Name of a callable function. This will run after the xCRUD instance renders.
# System
# $demo_mode
Disables addition, editing, deletion or other changes to data in the database.
# $performance_mode
An experimental feature. It disables {field_tags} features.
# $autoclean_timeout
Do not change, if not sure. Time in seconds before xCRUD clears old instances in session, when you reload the browser tab or open a new tab with xCRUD. In this case, xCRUD can't work in two tabs at the same time. You can increase this timeout at your own risk.
# $autoclean_activate
Deactivate multi instance checks. false
means you can now use multi instance or open multiple instances of xCRUD in different tabs without an issue.
# Anti XSS
Anti cross-site scripting settings.
# $auto_xss_filtering
Enable all xCRUD's POST and GET superglobals data filtering.
# $xss_disalowed_attibutes
Remove bad HTML attributes such as style, on* events and xmlns.
# $xss_naughty_html
If a tag containing any of the words in the list below is found, the tag gets converted to HTML entities.
alert
, applet
, audio
, basefont
, base
, behavior
, bgsound
, blink
, body
, embed
, expression
, form
, frameset
, frame
, head
, html
, ilayer
, input
, isindex
, layer
, link
, meta
, object
, plaintext
, script
, textarea
, title
, video
, xml
, xss
# $xss_naughty_scripts
Similar to $xss_naughty_html only, instead of looking for tags it looks for PHP and JavaScript commands, in the list below, that are not allowed. Rather than removing the code, it simply converts the parenthesis to entities rendering the code un-executable.
alert
, cmd
, passthru
, eval
, exec
, expression
, system
, fopen
, fsockopen
, file
, file_get_contents
, readfile
, unlink
# SMPT Mail Configuration
PHPMailer (opens new window) email settings.
# $mail_host
Email server SMTP hostname. All hosts must be separated by a semicolon. You can also specify a different port for each host by using this format: [hostname:port]
e.g. "smtp1.example.com:25;smtp2.example.com"
. Hosts will be tried in order.
# $mail_port
SMTP server port.
# $smtp_auth
Whether to use SMTP authentication. Utilizes the $username and $password variables.
# $username
SMTP username i.e. email address.
# $password
SMTP password.
# $emailfrom
The readable name that appears in the email from field.
# $smtpsecure
Sets connection prefix. Options are ''
, 'ssl'
or 'tls'
.