Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GS Custom Settings [v0.6.2]
#1
GS Custom Settings is a plugin for GetSimple CMS which lets webmasters/ site managers, theme and plugin developers implement and use their own custom settings for output, configuration, and cross-plugin/-theme communication. It allows in one package to achieve the same as Custom fields (but site-wide instead of per page), Slogans, Theme Settings, Links Manager, Custom Title and Translate combined and more. The plugin offers 8 different types of input to choose from, 3 access levels, per-user editing permission, and an easy UI to create, import and export the settings. GS Custom Settings is built on Knockout JS and uses JSON for data storage. 

Features
  • Custom settings for site managers, plugin and theme developers
  • 9 different setting types (select, radio, text, textarea, checkbox, color, image, date, section titles) + 3 fancy variants (FontAwesome)
  • 3 access levels for settings (normal, hidden, locked)
  • I18n text/ textarea settings (with I18N plugin 2.5.8+)
  • Output settings in pages with `(% setting:tab/setting %)` or in PHP with the rich API (see docs)
  • Restrict user editing permission per user (also with MultiUser 1.8.2+)
  • Feature-rich editing in 'edit' mode with multiselect, batch setting adding/removing & keyboard shortcuts
  • Responsive feedback through notifications
  • Import (IE10+ & other browsers)/ Export settings for re-use through the GUI
  • Build and export settings directly through the UI for your plugin/ theme
  • Extend existing themes and plugins with custom settings
  • Access settings from other themes and plugins
  • (almost) fully i18n, even custom theme and plugin settings I18n-enabled
  • Available in English, French, German, Russian, Dutch & Spanish
Download & install

You can download this plugin in the Extend repository
To install, simply extract the ZIP file to the plugins directory, and activate it in the Plugins tab. A new tab 'Site' will appear in which you can use the plugin. 

Basic usage

After you activate the plugin in the 'Plugins' tab, a custom 'Site' tab will show up. 
Here, go to 'Edit' mode to start building your settings Smile 
NB: You always need to click 'Save updates' to confirm saving any action.
To get a setting in a page (in the WYSIWYG editor), simply type (% setting: tab/setting %).
To output a setting in PHP, type <?php get_setting('tab','setting') ?>.
To return a setting in PHP, type <?php return_setting('tab', 'setting') ?>.

Compatibility
  • GS compatibility: Compatible and tested with GS 3.2.3, 3.3 & 3.4 (probably works on 3.5 too)
  • PHP compatibility: Compatible and tested with PHP 5.2.1+ (might be compatible with earlier versions)
  • Browser compatibility: Compatible and tested with Google Chrome, Mozilla Firefox, Internet Explorer 9+ (in IE8, only Manage mode works). Should be compatible with Safari too.
Screenshots

Manage Mode:
[Image: w0yV3ez.png]

Edit Mode:
[Image: NuQ2ezN.png]

Tutorials
Tutorial - Building a theme with GS custom settings
Theme development with GS custom Settings

Documentation
To read the full guide, go to the plugin's page.
Known Issues
Code:
20/05/2015 - V. 0.4 (DevChills)

 - Using cyrillic chars in the plugin will cause an error which disables saving updates.
 - Content filter (% %) doesn't work anymore
 - Cyrillic chars are stripped out of setting lookups
 - 'Search..' label not translated
 - Code copy lookup tooltip in Edit mode + sidebar tooltip for label/lookup toggle are incorrect
 - Update notification & plugin version are wrong
 - Last setting in a tab can't be removed
 - Theme import not working (+not working for I18N-settings)

17/04/2015 - V. 0.3 (Critical fix)
    
 - Moving the before-last tab down in Edit mode may cause a fatal error
 - get_setting always returns NULL when third parameter set to false
 - get_setting with image settings with whitespace in the path name are broken
 - Image setting returns broken image if link is not set (now empty string)
 - Color setting saves empty 'options' property
 - return_setting returns an entire tab when setting isn't found (now NULL)
 - notifications don't appear above sidebar when sidebar is set to sticky in gsconfig
 - Tab labels can only contain ASCII Latin characters (eg, no Arab/ Russian), see http://unicode-table.com/
 - Changing the 'lookup' property of a setting results in non-blocking JS errors.
 - 'Section Title' & empty image input placeholder is not translated
 - Edit mode multiselection bugs in IE8
 - Plugin breaks when GSADMIN is set to something else than 'admin'

30/03/2015 - V. 0.2 (beta)
    
 - 'custom-settings-init' hook not working reliably
 - Tab labels can only contain ASCII Latin characters (eg, no Arab/ Russian), see http://unicode-table.com/
 - FATAL: When no settings or tabs are present on first load, a fatal JS error blocks the plugin from loading
 - When restricting permission, Export & Import are also unavailable.
 - Empty text value settings are reset on first save if value is empty
 - 'Section Title' is not translated
 - Edit mode multiselection bugs in IE8
 - KO site settings showing as title when no 'site' tabs are created instead of 'GS Custom Settings'
  - Settings import only works with IE10 & up
  - When repeatedly batch editing settings, selection might bug or actions might not be executed on entire selection
  - Repeatedly importing settings for the same tab without reloading the page/ importing settings for another tab first doesn't work
 - Minor JS 'input focus' error (non-blocking)
 - Security token sent along with data
 - return_setting returns entire setting when asked for absent property (now returns NULL)
 - return_setting returns entire setting for option inputs instead of value only when value is index 0

Changelog
Code:
04/10/2015 - V. 0.6 (JS Renaissance)


New:
  - Smoother mode & tab transitions, setting creation
  - New, clean code base using RequireJS & Knockout components
  - Lookup naming conflict errors now point the user to the involved tabs/settings
  - Edit grid and sidebar colors now fully adapt to admin.xml & GS defaults
  - Edit mode: Added Ctrl + A keyboard shortcut to select all settings
  - Image settings can now make use of an image browser by clicking the 'Browse' button
  - Color settings can now make use of a color picker by clicking the color box (except IE)
  - Added date settings with datepicker
  - (almost) fully compatible with FlatBlue Admin Theme plugin
Changes:
  - Setting limit per tab increased from 64 to 100
  - Search is now reset when changing tabs/ mode
  - Enhanced performance for tab editing/ switching, search, manage-mode
  - KnockoutJS dependency updated to 3.3.0 latest build (12/08/15)
  - Enhanced setting code snippet display (through notification)
  - Edit mode: Support for IE8 dropped
  - Edit mode: Enhanced GSSTYLE_WIDE display in Edit mode
  - Edit mode: Pressing SHIFT now properly toggles between the visible setting fields
  - Edit mode: Icon radio/checkbox are now subtypes of radio & checkbox type settings
  - Edit mode: Tab with 15+ settings are now loaded gradually to avoid page blocking in slower browsers
Bugfixes:
  - Fixed all minor multi-selection bugs in Edit mode
  - Fixed potential export bugs: filename for older browsers & appropriate encoding for non-ANSI chars

07/09/2015 - V 0.5.1 (Bugfix)

New:
 - Added 'Save settings' button to top navigation
Bugfixes:
 - Fixed setting folding automatically when type was changed
 - Fixed default language en_US when GS lang is not available for plugin

25/05/2015 - V. 0.5 (Cyrillic)

New:
 - Added option to disable display of lookup code copy in Manage mode for plugins/ themes
Changes:
 - More space & textarea resize for settings in Edit mode
 - Minor CSS changes & CSS file restructured
 - Labels in Manage mode have a title attribute which displays their (full) lookup properties
 - Code copy fields only appear in Manage mode when hovering over the setting
 - Added server cache refresh on plugin update
Bugfixes:
 - Fixed Cyrillic char problem with custom JSON indentation function
 - Fixed Cyrillic chars being stripped out of setting lookups
 - Fixed 'Search..' label not translated
 - Fixed code copy lookup tooltip in Edit mode + sidebar tooltip for label/lookup toggle
 - Fixed wrong version in plugin registration
 - Fixed unable to remove the last setting in a tab
 - Fixed crappy page display on load
 - Fixed content filter
 - Fixed theme import not working (+not working for I18N-settings)

20/05/2015 - V. 0.4 (DevChills)

New:
    - 3 new plugin hooks 'custom-settings-save', 'custom-settings-render-top', and 'custom-settings-render-bottom'
    - Plugin version notification & download through the UI
    - Fully automatic version update of settings for themes/ plugins
    - Added '?' help tab with version info, links, & translator credits 
    - Text & textarea settings can now be multilingual (with I18n plugin v.2.5.8+)
    - Added PHP function get_i18n_setting() for multilingual settings (with I18n plugin)
    - Added PHP function return_setting_group()
    - It is now possible to store custom setting properties in JSON file (for checking with PHP)
    - Renewed keyboard shortcuts
    - When GSSTYLESBFIXED is set, the toolbar in Edit mode will sticky to the top of the window
    - Tab options: enableReset ('Reset all settings' button) & 'enableAccessAll: false' hide tabs for users without editing permission 
Changed:
  - Upgrade from v0.1 no longer supported - to do this, deactivate, download v0.3, activate, then install 0.4
    - Search filter improved (lower & uppercase)
    - Code fields now show the bare lookup as title
    - Tab lookups can now be set manually from the tab toolbar (tag icon)
    - If gsconfig is set to have sticky sidebar, the toolbar in Edit mode will also be sticky
    - Tabs may now contain any unicode characters: use at your own risk
    - Textareas are resizeable vertically in Manage mode
    - return_setting($tab, $setting) now returns the value instead of full setting. To return full setting, pass FALSE as third parameter
    - Export output changed minimally
Bugfixes:
    - Fixed moving tab down in Edit mode causing an unrepairable bug
    - Fixed get_setting always returning NULL when third parameter set to false
    - Fixed get_setting with image settings to encode whitespace
    - Fixed empty image setting returning broken image if link is not set (now empty string)
    - Fixed empty options being saved for color setting
    - Fixed return_setting returning entire tab when setting wasn't found (now NULL)
    - Fixed notifications not appearing above sidebar when sidebar is set to sticky in gsconfig
    - Fixed 'Section Title' input & empty value image placeholder name not being translated
    - Fixed (% setting %) content filter not correctly outputting HTML tags
  - Removed 2 non-blocking JS errors

15/04/2015 - V. 0.3 (Critical fix)

New: 
  - Multi User plugin integration (v1.8.2 onwards)
  - Added image & color input fields
  - Added section title fields
  - Theme settings can now use the shorter tab name 'theme' instead of 'theme_settings', eg get_setting('theme','setting')
  - Links in descriptions become automatically clickable in 'Manage' mode
  - Added per-tab search filter for settings (lookup/ label)
  - Added language German & Spanish (fourth & fifth languages, so might need revision)
Changed:
  - Removed 'custom-settings-init' hook (unreliable)
  - Except for import/ export/ multiselect, now fully compatible with IE8 (previously only Manage mode)
Bugfixes:
  - 'KO site settings' replaced as title with 'GS Custom Settings' (in UI)
  - Eliminated minor JS 'input focus' error
  - Import & Export buttons now also available to users who cannot access Edit mode (backup purposes)
  - Fixed (% setting: tab/setting %) (now same as get_setting instead of return_setting)
  - Fixed text settings not saving when value hasn't been set
  - Fixed security token being sent with data (no longer)
  - Fixed return_setting returning entire setting when asked for absent property (now returns NULL)
  - Fixed loose checking bug returning entire setting for option inputs instead of value only when value is 0

30/03/2015 - V. 0.2 (Beta)

New:
  - Fully translatable, (almost) no hard-coded values anymore
  - Github repo at http://webketje.github.io/gs-custom-settings (issue tracking)
  - Complete UI overhaul, including:
    - tab/setting actions moved to one toolbar to unclutter the UI
    - opening a tab in edit mode is the same as in manage mode (used to be through icon)
    - Settings can now be batch selected/(re)moved/added
    - settings keyboard functionality (Ctrl, Shift for multiselect &amp; Delete)
  - Import &amp; export data directly from the UI as backup/ transfer to other site.
  - Export tab directly to JSON for plugin/theme dev with custom settings.
  - Enhanced, translatable notification manager
  - Theme developers can now register their custom settings, i18n-enabled.
  - Plugin developers can now register their custom settings, i18n-enabled.
  - Added security token check to AJAX filehandler.
  - Added PHP API with variable caching for better performance 
  - Permissions can be restricted per user by adding a <ko_edit>false</ko_edit> node to the user.xml
  - Added languages French, Dutch.
Changed:
  - Removed the ability to view all tabs in one (performance)
  - Plugin folder ko_base deleted, all contents moved into one folder
  - Renamed plugin more appropriately to 'Custom settings' as the focus and intent shifted away from original design.
  - Added readme.md to ZIP package with some basic instructions
  - Setting lookups 'tokens' must now be set manually
  - Settings in the plugin's PHP functions must now be retrieved with function($tab, $setting) instead of 'tab/setting'
Bugfixes:
  - Fixed array dereferencing issues. Plugin should now be compatible with PHP 5.2+
  - Fixed .htaccess for settings data. No longer accessible through browser/ HTTP requests (safer)
  - Fixed 'switch' input saving empty options array
  - Fixed moving a tab up or down causing settings' tab field to be changed
  - Fixed plugin not loading default language in case language file is missing
  - Clicking labels now automatically moves focus to the relevant inputs
  - JSON data is now formatted properly when saved, both through Javascript and PHP
  - Buttons in sidebar now properly disabled when unusable
  
18/02/2014 - V. 0.1 (Alpha)

Initial launch
Reply
#2
Can you give an example usage, not sure I understand what this is for. Just General settings? What's with the sidemenus and ordering. Sidemenus are called tabs?

Are there hooks to register your own settings programmatically?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
does not work
Reply
#4
Note: The code in this reply is no longer relevant
Quote:What's with the sidemenus and ordering. Sidemenus are called tabs?
Well I guess that's a terminology issue :p. The ordering simply allows you to order the tabs (or sidemenus) as you want to present them to the webmaster who will manage the website. Ditto for the settings ordering

Quote:Are there hooks to register your own settings programmatically?
No, the point is that by adding a new 'setting' you ARE registering your own setting. Eg, you make a new setting called 'Include image in blogpost?', in the tab (or sidebar) 'Blog', which is of type checkbox. Now in themes and components, you can do:

PHP Code:
<?php if (get_setting('blog/include_image_in_blogpost'false)) { 
  
// setting names are = TAB / SETTING (php-ified)
  // returns TRUE (checked) or FALSE (unchecked) for checkboxes
?>
  <img src="myimage.png">
<?php ?>

Quote:Can you give an example usage, not sure I understand what this is for. Just General settings?

Sure, for example, as quoted from the Extend plugin page:
Quote:You could use this plugin for eg, social media links, small texts, picture sizes, basically any tweakable variable based on which you want to modify output.

Perhaps it is more understandable when illustrated: (see updated first post)

As a last word on use, I should mention that I originally built this to provide extra settings to pass to (I18n) components, which are modifiable by webmasters (as opposed to developers). So a final answer to your question would be: "The plugin provides the ability to register your own custom settings site-wide, like i18n custom fields, but not bound to pages; or like theme plugins, but not bound to themes." In a future release I will also provide an import/ export feature so your settings can be re-used in multiple sites.

Oleg06 Wrote:does not work
Thanks for this! I planned on adding a last step feature but didn't in the end, and unfortunately a small piece of unfinished code broke it; FIXED now.
Reply
#5
Looks promising.

It would be nice to be able to interface with this programmatically via a plugin, it would be very easy to write a bridge function to check for and use this instead of writing your own settings manager in my plugin, or using globals etc like, newsmamager does. I could even use this to make a plugin that shims gsconfig with a ui.

We could also add per component extra hooks, to add these to individual components, in 3.4
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#6
does not work
Reply
#7
Note: The code in this reply is no longer relevant
(2015-02-19, 04:43:21)shawn_a Wrote: Looks promising.

It would be nice to be able to interface with this programmatically via a plugin, it would be very easy to write a bridge function to check for and use this instead of writing your own settings manager in my plugin, or using globals etc like, newsmamager does. I could even use this to make a plugin that shims gsconfig with a ui.

We could also add per component extra hooks, to add these to individual components, in 3.4

True that. I was thinking more about providing for theme developers/ webmasters than plugin devs. I did hint to this in the better components thread, and I will try to add this in one of the next releases. Basically, there's not much else to do than add a function similar to this:

PHP Code:
function add_setting($setting) {
   
$path 'path/to/file';
   
$file json_decode($pathTRUE);
   
$properties = array('label','lookup','access','type','options','value','descr');
   
$final $setting;
   for (
$x 0$i count($properties); $i++) { 
      if (!
array_key_exists($properties[$i]))  {// OR if value is not correct
         // set defaults & validation here
         
$final[$properties[$i]] = $someDefault;
      }
   }
   
array_push($file['data'], $final);
   
$file json_encode($file);
   
file_put_contents($path);


I am still torn on one issue though; for which I'd love to have some feedback. Currently the setting lookups are PHP-ified from the setting's label, while in i18n custom fields for example, the user has to write his own lookup ('name'). I did this to eliminate an extra step of 'thinking', but I understand some lookups could get ridiculously long if the label is too descriptive. On the other hand, there's a per-setting description to explain the label... And as a second point, given that the strings are saved in JSON, they could actually contain almost any character without errors... Should I allow such things as
Code:
get_setting('social/I am a really long label?!')
?

(2015-02-19, 05:18:15)Oleg06 Wrote: does not work
What does not work? I tested and it works all fine now.
Reply
#8
I would do index/token and title as A separate field.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#9
And perhaps change make the delimiter configurable : instead of / which looks like a path
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#10
(2015-02-19, 06:30:07)shawn_a Wrote: I would do index/token and title as A separate field.

Ok, I will look into it. For the delimiter I'll set the possibility to change it in a dirty flag first, and will put it in plugin options later. TYVM for the feedback.
Reply
#11
That way a title can be like 256 chars and have a separate token or slug for using in code
And even have duplicate titles without it being an issue
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#12
Also can you make a read only flag if not already? So if I programaticAlly add a setting it cannot be modified or removed. A readonly or internal flag in he json perhaps? Seems like it would be useful or perhaps add a namespace so if it a namespace is set it belongs to a plugin or I we could just add it via a prefix one he token I guess. I'll have some better ideas if this is even useful after I mess with it.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#13
Stupid question why even use a delimited and not just have 2 arguments?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#14
Code:
Parse error: syntax error, unexpected '[' in /home/kolodets-o/kolodets-obninsk.ru/docs/plugins/ko_site_settings.php on line 77
Reply
#15
Quote:That way a title can be like 256 chars and have a separate token or slug for using in code
And even have duplicate titles without it being an issue
I already did take care of that; every duplicate name has a unique ID appended to it automatically. But I am going to implement a separate field for it, no prob. Actually, you can even have duplicate tokens, as long as the tab is different (the function returns only if the tab + token match).

Quote:Stupid question why even use a delimited and not just have 2 arguments?
That's what I also thought, but I might also keep the option to pass a 'path-like' string because it looks more familiar to non-PHP programmers (me) Smile.

(2015-02-19, 16:25:37)Oleg06 Wrote:
Code:
Parse error: syntax error, unexpected '[' in /home/kolodets-o/kolodets-obninsk.ru/docs/plugins/ko_site_settings.php on line 77
So yes, that is a JSON format error. Can you try simply going to /data/other/KO_data/ko_site_settings and delete the data.json file so it can correctly regenerate. Thank you for your perseverance.
Reply
#16
your plugin works with php 5.4.x
Reply
#17
(2015-02-20, 16:25:47)Oleg06 Wrote: your plugin works with php 5.4.x

Thanks for your feedback; I am not very familiar with 'outdated PHP versions' and coming from a Javascript background I was not aware of the problem of Array dereferencing, which I used extensively. Will fix these issues for v0.2 and include PHP hooks for devs.
Reply
#18
V0.2 out, check first post for more details.
Site & Theme settings are pretty stable now. Plugin hooks might need a tad bit more testing, but should be ok for most of it. Updated the docs, also created a Github repo. Hope the plugin's much more useful now, cheers Smile.
Reply
#19
Update
Found an important (but not breaking) bug: saving a setting with type 'text' and an empty value will cause the setting to be fully reset. Temporarily counter this by adding a whitespace to the setting. This bug will also cause these settings to appear as empty JSON objects when exporting as theme/plugin settings (unless you add a default value/ a blank space).

V0.2 was a complete overhaul of v0.1; V0.2.1 will be bugfix release & browser-testing. I have tested a lot, but can't foresee all possible issues; the plugin is quite complex, and it's my first so bear with me please Smile. Follow-up on the latest issues in the Github issue tracker. Your feedback is welcome.
Reply
#20
v0.3 out; surprised no one reported that v0.2 had a critical bug causing the plugin not to load properly; anyway here's v0.3!

Changes
15/04/2015 - V. 0.3 (Critical fix)

Code:
New: 
  - Multi User plugin integration (v1.8.2 onwards)
  - Added image & color input fields
  - Added section title fields
  - Theme settings can now use the shorter tab name 'theme' instead of 'theme_settings', eg get_setting('theme','setting')
  - Links in descriptions become automatically clickable in 'Manage' mode
  - Added per-tab search filter for settings (lookup/ label)
  - Added language German & Spanish (fourth & fifth languages, so might need revision)
Changed:
  - Removed 'custom-settings-init' hook (unreliable)
  - Except for import/ export/ multiselect, now fully compatible with IE8 (previously only Manage mode)
Bugfixes:
  - 'KO site settings' replaced as title with 'GS Custom Settings' (in UI)
  - Eliminated minor JS 'input focus' error
  - Import & Export buttons now also available to users who cannot access Edit mode (backup purposes)
  - Fixed (% setting: tab/setting %) (now same as get_setting instead of return_setting)
  - Fixed text settings not saving when value hasn't been set
  - Fixed security token being sent with data (no longer)
  - Fixed return_setting returning entire setting when asked for absent property (now returns NULL)
  - Fixed loose checking bug returning entire setting for option inputs instead of value only when value is 0
Reply
#21
Yes, now everything works fine, but I did not expect to understand your plugin Smile
What code to use with the selection operator IF for radio buttons and select.
With the checkbox works like this code.
Code:
<?php if (strlen(return_setting('new_tab','new_setting','value'))) { ?>
sssssssssss
<?php } ?>
Reply
#22
(2015-04-17, 00:56:05)Oleg06 Wrote: Yes, now everything works fine, but I did not expect to understand your plugin Smile
What code to use with the selection operator IF for radio buttons and select.
With the checkbox works like this code.



Code:
<?php if (strlen(return_setting('new_tab','new_setting','value'))) { ?>
sssssssssss
<?php } ?>

Good question Oleg, I might post some new tutorials or info on the plugin page to clarify that. You can see in the documentation section Outputting settings all the return values of different types of settings. It is against those that you should test in if/else clauses.
For checkboxes, your setting will return either TRUE or FALSE, so you can simply do:

PHP Code:
<?php if (return_setting('tab','setting','value')) { ?>
  ...
<?php ?>

For a setting with options the return value is the  zero-based index of the selected option. Why? Because options are translatable, so the text value could differ, while numbers are universal.
Example:
Your setting sets the profile image size of the user, and he can choose between 3 sizes.

[Image: siSsV2M.png]

With return_setting('tab','setting','value'), you will get 0 (because the first option is selected).
With get_setting('tab','setting'), you will get "128x128"

Subsequently you can test like:

PHP Code:
<?php if (return_setting('tab','image_size','value') === 0) { ?>
  <img style="width: 128px; height: 128px;">
<?php ?>

 Or: 

PHP Code:
<?php //get_setting($tab,$setting,$echo=FALSE) returns the display value without echo'ing it
if (get_setting('tab','image_size',FALSE) === '128x128') { ?>
  <img style="width: 128px; height: 128px;">
<?php ?>

With this example, the following would ofc. be easier:

PHP Code:
<?php $imgSize get_setting('tab','image_size',FALSE);
 
 $imgSize explode('x'$imgSize); ?>
<img style="width: <?php echo $imgSize[0]; ?>px; height: <?php echo $imgSize[1]; ?>px;"> 
Reply
#23
Thanks for the tips, I'm in php round zero, so I always have to ask such questions plugin developers. Smile
Google translation
Reply
#24
if the tab is in English, the code looks like this
[Image: 3hHmhiP.png]
if the tab is in Russian, then so
[Image: 1i5iibX.png]
Reply
#25
(2015-04-17, 20:16:20)Oleg06 Wrote: if the tab is in English, the code looks like this
http://prntscr.com/6urn4i
if the tab is in Russian, then so
http://prntscr.com/6urnih

Yes, that's because the lookup property of a tab is computed from the label and only works with Latin characters (a,b,c,d, etc.) Unfortunately, Russian characters in JS are recognized as 'non-word' characters.

I didn't think of this... I'll have to provide a way to provide your own lookup in next version. There's unfortunately no workaround for v0.3 - you have to temporarily use Latin characters for tab names =/.

I put together a quick fix, which you can download (simply extract to plugins folder) in attachment. 

.zip   custom_settings_0.3_cyrillic_chars_patch.zip (Size: 8.34 KB / Downloads: 5)
You will see this, and can enter the lookup manually:

[Image: ZtS9FYU.png]
Reply




Users browsing this thread: 3 Guest(s)