(2015-10-27, 22:19:48)Oleg06 Wrote: I checked on two different servers hosting with Apache, the problem is everywhere.
as if stops working checkbox plugin I18N Custom Fields.
I can just hide the link to deactivate the plugin
Eureka! (maybe).. You know that if you deactivate GS Custom Settings, and have GS Custom Settings code in the Special Page templates, PHP will throw a function undefined error if it encounters calls to any of the plugin's functions (which could indeed result in a broken lay-out).
[28-Oct-2015 00:58:31 Europe/Moscow] PHP Fatal error: Call to undefined function return_setting() in /home/cp893527/public_html/vse-nozhi.ru/0/theme/Building/template.php on line 17
no other errors
line 17
Code:
if (return_setting('site_settings','large-menu_setting')) { include('header2.inc.php'); } else { include('header.inc.php'); }
2015-10-28, 09:35:25 (This post was last modified: 2015-10-28, 09:37:09 by Tyblitz.)
Haha well it's not an error really. It's normal that you can't use the plugin's functions when it is deactivated.
Ofc. if you use GS Custom Settings in theme dev, then it is a requirement that the plugin is activated.
JFYI if you want to provide the user 3 options for share bars or something but only 1 should be used at a time, you might want to consider a radio type setting instead of 3 checkboxes.
Your code could be reduced in size by 75%, see below.
Example of usage:
PHP Code:
<?php // share_setting tab has a checkbox setting to enable share bars ('enable_shares') and // a setting to select a share bar ('share_choice') with options: // [(0) 'goodshare', (1) 'sharethis-gor', (2) 'shareeasy']
if (return_setting('share_setting', 'enable_shares')) { // calling get_setting with 3rd param false RETURNS the TEXT value of the selected option $sharebar = get_setting('share_setting', 'share_choice', false); get_component($sharebar); } ?>
2015-10-28, 10:01:25 (This post was last modified: 2015-10-28, 10:40:10 by Tyblitz.)
(2015-10-28, 09:48:50)Oleg06 Wrote: I have every species has its own settings http://prntscr.com/8w3ork
Sure, do as suits you best.
BTW if you don't want users to see the </> code tags, in your data file you can add the enableCodeDisplay property and set it to 'false'. If you specify a default property on settings, and add the enableReset property to the tab, users can hit a Reset button and the setting values will be set to the defaults.
2015-10-30, 05:44:21 (This post was last modified: 2015-10-30, 05:45:16 by Oleg06.)
(2015-10-27, 09:38:36)Oleg06 Wrote: I noticed one oddity http://youtu.be/BHZwRkOKZls?hd=1
when you deactivate/activate your plugin for some reason stop working plugin I18N Special Pages or I18N Custom Fields
Sorry, this garbage comes when disconnecting any plugin
I try just change the code
2015-10-30, 08:56:20 (This post was last modified: 2015-10-30, 08:56:55 by Oleg06.)
(2015-10-30, 05:44:21)Oleg06 Wrote:
(2015-10-27, 09:38:36)Oleg06 Wrote: I noticed one oddity http://youtu.be/BHZwRkOKZls?hd=1
when you deactivate/activate your plugin for some reason stop working plugin I18N Special Pages or I18N Custom Fields
Sorry, this garbage comes when disconnecting any plugin
I try just change the code
I found a solution to your problem by replacing the code
Code:
<?php if(return_custom_field('full')=='on') { ?>
with this code
Code:
<?php if (returnPageField(return_page_slug(),'full')=='on') { ?>
2015-11-06, 09:10:06 (This post was last modified: 2015-11-06, 09:11:07 by Tyblitz.)
GS Custom Settings 0.6.2 released
Big bugfix release:
Code:
05/11/2015 - V. 0.6.2 (Bugfix)
New:
- Keyboard shortcut Ctrl + S to save settings
- Backups of settings are now saved to backups/other/custom_settings
Bugfixes:
- Fixed: Minor JS error when changing setting type from 'section-title' to something else
- Fixed: Save button doesn't record a change when a property is not in the cached data
- Fixed: Checking for changes compared only to data on first load (now refresh after every save)
- Fixed: FontAwesome library icons (upgraded to 4.4.0) & cleaned from corruption
- Fixed: sidebar toggle for lookup/ label editing not showing up
- Fixed: 'expanded' property shouldn't be saved to data output
- Fixed: bugs with multilingual settings
- Fixed: bugs with editing permission
- Fixed: Litespeed server doesn't update JSON content on save with x-www-urlencoded content-type
- Fixed: PHP non-object notice when admin.xml missing
- Fixed: Switch setting display in Manage mode showed as checkbox
- Fixed: Color Setting not updating when using color picker
- Fixed: Search works cross-tab again
- Fixed: broken datepicker display when imanager activated
- Fixed: import/export bugs: incompatible export format for 'all' site tabs;
- Fixed: tab list not updating on import in manage mode (both since 0.6)
(@0leg let me know if this setup breaks on litespeed, I had to revert some changes)
2015-11-07, 08:11:50 (This post was last modified: 2015-11-07, 08:13:45 by Tyblitz.)
(2015-11-06, 19:07:33)Oleg06 Wrote: this setup breaks on litespeed
Hey 0leg, thanks.
I think I figured out the problem. With x-www-url-form-encoded header in a GET req. data is sent as a URL query string. However Litespeed servers (and Windows too) have URL request length limits at approx. 8192 bytes. As the entire settings' data is passed in GS Custom Settings, this is very likely to be bigger than the request length limit. Plus, because Cyrillic chars are multi-byte, the file is quickly heavier. I just tested your export in a string-to-byte converter, and it's at 44.000 bytes, so your server probably blocks the request.
(Another possible cause, check that php.inipost_max_size is > 1MB)
Documentation on this is hard to find, so I can't promise anything. Could you test the patch in attachment (extract to plugins folder) and tell me specifically if (1) the data loads on the screen, and (2) if the data gets saved (modify some values & reload).
(2015-11-07, 09:47:28)Oleg06 Wrote: in my php.ini there is no such code post_max_size
nothing works and is not saved
I rented Apache to work with your plugin
Ok, but I think your problems indicate that I'm doing something wrong that might cause trouble later on all servers..
Could you try once more with the attachment in this post and tell me results?
Nope, that's impossible. The plugin does all with Javascript, so PHP doesn't get parsed.
You can use HTML/JS, but can't use PHP in the value fields either, you'll need a plugin like Dynpages for that.
Workarounds:
- Go to Settings and copy site link from there.
- Create a GS Custom Settings plugin (a bit overkill)
2015-11-18, 17:23:30 (This post was last modified: 2015-11-18, 17:24:37 by gslexx.)
Hello!
All can be done checkbox on the page "plugins" to show or hide block https://yadi.sk/i/9pd_hr4BjcrFd ?
This option is very necessary!
Thank you!
2015-11-19, 08:34:34 (This post was last modified: 2015-11-19, 10:11:09 by Tyblitz.)
(2015-11-18, 17:23:30)gslexx Wrote: Hello!
All can be done checkbox on the page "plugins" to show or hide block https://yadi.sk/i/9pd_hr4BjcrFd ?
This option is very necessary!
Thank you!
Hi gslexx, you can't hide the full block. You can only hide the 'Edit' button.
If you use MultiUser plugin:
click the user you want to hide the button for;
scroll to 'Denied permissions' title, and check GS Custom Settings
now the user will not see the 'Edit' button
Without Multiuser plugin:
find the user in data/users/user.xml and add a node <KO_EDIT>FALSE</KO_EDIT.
(2015-11-18, 17:23:30)gslexx Wrote: Hello!
All can be done checkbox on the page "plugins" to show or hide block https://yadi.sk/i/9pd_hr4BjcrFd ?
This option is very necessary!
Thank you!
Hi!
I noticed error:
If it was a text field, and then we change its image - the settings are not saved, and the file is written:
"value": "",
"i18n": [
'"
]
(2015-11-24, 04:48:16)gslexx Wrote: Hi!
I noticed error:
If it was a text field, and then we change its image - the settings are not saved, and the file is written:
"value": "",
"i18n": [
'"
]
Hey gslexx.
Thanks for reporting, you are right - although it seems to be an issue with the image input - it just doesn't save.
I will fix this in next release. I've also noticed another bug with reverting an i18n input back to regular text input.