e107 Preferences

Core Preferences

How to get the value of one needed preference?


Example for the list of installed plugins:

$builder_pluglist = e107::getPref('plug_installed');

Where to find used core pref name?


In admin area: Tools / Database / Preferences Editor

How to manage core prefs from custom plugins

This is the way I have confirmed as working... 

$pref = e107::getPref();
$core_pref = e107::getConfig();

the form works with $pref

$core_pref->setPref($pref)->save(false, true);

if pref is multilanguage, it's a bit complicated according to admin/meta.php file 

How to change only one core pref

e107::getConfig('core')->setPref('prefnamet', $new_value);
/**
* Save object data to DB
*
* @param boolean $from_post merge post data
* @param boolean $force
* @param mixed $session_messages null: normal messages displayed, true: session messages used, false: no messages displayed. 
* @return boolean|integer 0 - no change, true - saved, false - error
*/
e107::getConfig('core')->save(true,false,false);

Not clear what $from_post means. With one pref true, with full $pref false?

Custom plugin preferences

Load all plugin preferences


$plugPrefs = e107::getPlugConfig('your_plugin')->getPref();

for using in class:

private $plugPrefs = array();
$this->plugPrefs = $plugPrefs;

update one preference

To save new value:

e107::getPlugConfig('your_plugin')->set('your_preference', $addonsList)->save(true);

save(true) - value will be replaced
save(false) - value will be added

empty array:
e107::getPlugConfig('visualbuilder')->set('visualbuilder', array())->save(true);

Latest Downloads

e107 version 2.3.0 from 17.03.2020
in Category: Stuff in development

e107 version 2.3.0 from 17.03.2020

2 weeks ago

e107 CMS downloaded from Github 17.03.2020 - called 2.3.0.0 - deleted e107 tests - deleted Voux and Landing Zero themes. This pack is for users that are working with our themes. Stable version 2.2.1 i 
Read more..

e107 version 2.3.0 from 17.03.2020
JM Core plugin 1.8
in Category: e107 plugins

JM Core plugin 1.8

3 months ago

Please, use Github version.  The version used on this site. It fixes some core limitations via the plugin, no core changes. Check Readme at first.  Version 1.8 What is inside? - fix for missing tit 
Read more..

JM Core plugin 1.8
ReCaptcha plugin 1.3
in Category: ReCaptcha plugin

ReCaptcha plugin 1.3

3 months ago

No CAPTCHA reCAPTCHA Captcha replacement for e107 v2.2 or higher with shortcodes.  Added shortcodes for replacing contact secure image shortcodes. Possibility to hide it from logged users.
Read more..

ReCaptcha plugin 1.3