Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GS Custom Settings [v0.6.2]
#51
Tried this just now, but all previous settings made with v0.3 are gone and default 2 tabs active:

[attachment=561]

In combination with GSconfig UI there's more weird stuff...


Edit: It seems to work now. Maybe best to flush cache after update?
Reply
#52
(2015-05-23, 08:48:21)datiswous Wrote: Tried this just now, but all previous settings made with v0.3 are gone and default 2 tabs active:
In combination with GSconfig UI there's more weird stuff...
Edit: It seems to work now. Maybe best to flush cache after update?

Yeah I had a similar issue & was surprised after so many succesful tests.  Solved it by simply reloading the page, I'll have to add that to the install description. Thanks for reminding me

Btw: 
(2015-05-23, 08:48:21)datiswous Wrote: Some idea: Setting an image for a setting state. So if you activate a certain setting (for example background color or css file) you see this change in example image (could be a screenshot of the site, or a screenshot of a font, or something). This way you could make a more visual orientated setting panel.

If you now use the hooks custom-settings-render-top or custom-settings-render-bottom, and include a <script> tag, you can use the JS function addHook(yourfunction). In this function you can attach events & use GSCS.returnSetting(tab, setting).value.subscribe(function(value) { .. }), which will execute the function everytime the setting's value changes. Values to check against are the same as the ones returned by the PHP API.
Reply
#53
Minor:
(2015-05-23, 09:11:49)Tyblitz Wrote:
(2015-05-23, 08:48:21)datiswous Wrote: Tried this just now, but all previous settings made with v0.3 are gone and default 2 tabs active:
In combination with GSconfig UI there's more weird stuff...
Edit: It seems to work now. Maybe best to flush cache after update?

Yeah I had a similar issue & was surprised after so many succesful tests.  Solved it by simply reloading the page, I'll have to add that to the install description. Thanks for reminding me.
I still see what you can see in the screenshot when loading that plugin admin page, but only for a short time during loading. Looks a bit crappy. Not an issue, but maybe something you want to look into what's going on in the future.

Your plugin is called GS Custom Settings, but the file and folder are named custom_settings. I just thought it makes sense to use the same name for your files.. I just thought, since custom settings is very general in name, you higher the risk that someone takes the same file-names for a plugin in the future (he would not know of you using it, since your plugin has a different name), overwriting your files. Maybe this is nonsense, I don't know.

I still see v. 0.3 and an update warning for v. 0.4 in Plugins section.

In the plugin registration it shows v. 0.3:
Code:
// register plugin
register_plugin(
'custom_settings',
$custom_settings_lang['title'],
'0.3',
'Kevin Van Lierde',
'http://webketje.github.io',
$custom_settings_lang['descr'],
'site',
 'custom_settings_init'
);

You can't delete a setting if it's the only setting. If you select multiple settings you can delete them all.

Major:

When I try to reorder the tabs, that is not done correctly. Tabs randomly move to a certain position with every click, can't see a pattern.
Reply
#54
(2015-05-21, 21:08:12)Tyblitz Wrote: As for the error with import, what is the name of the imported file? This error should only come if (1) the file is named plugin_data_plugin_name.json and (2) you have created a GS Custom Settings plugin which is not activated when you did the import (you should activate before importing).

It's called theme_data_simpliste.json
Reply
#55
Just found out that with version 0.4 the (% code %) in page doesn't work anymore. If I use a component (+dynpages) and the php codes for this plugin, it works, but the code for the pages not anymore. When I get back to 0.3 they work again.
Reply
#56
I don't see a problem with having the plugin called custom_settings; GS Blog also has a plugin folder called 'blog' & new plugins should take into account names of existing ones.

I can't thank you enough for your feedback, I didn't re-test existing features as well as in previous versions and some changes seem to have broken them. I've already fixed the 'unable to delete the last setting', plugin version, the crappy output on page load (cf your screenshot) and setting output with (% %)

However, I fail to reproduce the tab moving bug. In both GS 3.3.4 & 3.3.3 moving the tabs does as expected, even when the lookups are the same.  Anyone else having this problem? Any JS errors in the console?

For the import, I'll do some tests soon, but I recall it should be ok if all steps are followed in the correct order.
Still i wonder why you get a plugin error when you have a theme file... perhaps I made a mistake in the language files.
Normally: 
1) Build settings, save
2) In Edit mode, do 'Export as theme', & save as 'settings.json' in your theme directory.
3) Activate your theme, the settings should appear in the sidebar item 'Theme settings'.
4) If you want to, you can now export settings & reimport later.
Reply
#57
Yeah and the blog plugin has constantly caused problems because of how its named.
Using your own prefix is very much desired
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#58
(2015-05-24, 10:22:31)Tyblitz Wrote: However, I fail to reproduce the tab moving bug. In both GS 3.3.4 & 3.3.3 moving the tabs does as expected, even when the lookups are the same.  Anyone else having this problem? Any JS errors in the console?

Try to move a tab from the top down. It just changes to the second tab first, then after that that second tab moves down.

Also, I use GS 3.3.5. You should at least use the last stable version, I think.
Reply
#59
shawn_a Wrote:Using your own prefix is very much desired
I agree with the rationale, but not looking forward to changing all file & dir names & write an upgrade. I might look into it in July-August; after the next bugfix release (0.4.1) I'll have to focus on other "important things in life" for a while, and I absolutely want to publish some tutorials on theme/plugin creation with this plugin first.

(2015-05-24, 11:09:58)datiswous Wrote: Try to move a tab from the top down. It just changes to the second tab first, then after that that second tab moves down.
Also, I use GS 3.3.5. You should at least use the last stable version, I think.
Ah I finally got it, fixed in next version Smile
Reply
#60
Something else I encountered:

Let's say you have a theme settings file active, which you can't edit because it's part of the theme. Then you import a new tab, the tab is added, you click save, but don't reload, instead you click edit. The added tab is last on the list but if you select it you see the theme setting tab settings on the left (instead of the tab you just added). Which you can successfully edit.
Reply
#61
I am also getting the 'missing plugin' error; can't understand why. I'll look into that & your other post early next week.
BTW the Theme tutorial & documentation are updated with the v0.4 new features.
Reply
#62
toggleActiveTabProp has title of tab_down

plugin still says 0.3
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#63
GS Custom Settings v0.5 released
Basically an integration of the huge amount of feedback & bug reports Normally it should now be finally compatible with Cyrillic chars entirely, but we'll wait for Oleg06 to confirm.  =)
I've also taken into account most of the UI changes proposed in the GSconfig UI thread.

Full log:
 
Code:
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)
Reply
#64
wow, the code works even with the Cyrillic alphabet, thanks Smile
Code:
<?php get_setting('new_tab','новая_установка'); ?>
and even so works Big Grin
Code:
<?php get_setting('настройки_темы','новая'); ?>
Reply
#65
updated http://get-simple.info/extend/plugin-lan...tings/924/
Reply
#66
Found a small bug:

When Editting a setting you change the type, the setting automatically folds in, minus icon doesn't change.

I think it's something new, I don't think I encountered it before with v. 0.4


Something else: I think it would be better if you add the icon setting type as an option in the main setting type. 

So for example in setting type Radio, add an option for icon. In the same way you can add i18N in setting type text.
Reply
#67
Yes I agree, those are rather input sub-types. In the long run I will certainly want to change this and I'm currently testing better patterns for front-end architecture (modularity, components, better separation of concerns), but it will probably require rewriting 75% of the front-end (JS) code (which is kind of an organized mess atm), so not for now yet.

As for the setting type change, yes I noticed that & it's already fixed in my local version. It was newly introduced in 0.5 as a result of template simplification. Basically I've modularized the views (HTML) & backend API (PHP); now there's only the JS left. You can fix it with this patch: 
.zip   custom_settings_0.5_patch_typechange.zip (Size: 1.59 KB / Downloads: 4) (simply extract to plugins folder).
Reply
#68
Idea:

Add save button under sidemenu
Sub-sectioning Section Titles

What is the reason that the section titles don't have a code for placement in a page?

Settings should not bump up on hover when showing code for placement in a page. Probably by increasing default height.
Reply
#69
If you use submit_line classing like we do in core the sidebar is done automatically.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#70
@oleg There might be potential (minor) issues with Cyrillic chars when using the return_setting_group() function, concerning the character encoding (but I'm not sure, have to check)

Quote:What is the reason that the section titles don't have a code for placement in a page?

Because they are simply meant for structuring the settings page. But actually they do (only in PHP, not with shortcodes), it is simply not shown in the UI because they have no value property (only label), so you have to output them like: <?php get_setting('my_title', 'label').

Quote:If you use submit_line classing like we do in core the sidebar is done automatically.

Not sure what you mean but if it is adding sidebar items with add_action, doesn't play nicely with KnockoutJS (everything is rendered on the fly).

Quote:Add save button under sidemenu
Sub-sectioning Section Titles

1) worth considering, although if sidebar gets really full you'll have to scroll to save as well, so even better could be to put it at the top toolbar (together with EDIT/MANAGE button).
2) You mean foldable sections, right? I really want to implement this but with current architecture it conflicts with search.

As i mentioned before, will get back into dev soon, but before implementing new stuff I'd like to have a completely modular rebuild of Javascript code with RequireJS. (currently I'm at about 40% completion). @datiswous, I'm also building the 'option for icon types' into it.
Reply
#71
Quote:
Quote:
Sub-sectioning Section Titles
2) You mean foldable sections, right? I really want to implement this but with current architecture it conflicts with search.

No I meant sub section titles under section titles

So for example if you have a list of settings under Transport types. Section title: Cars. Sub-section title: small cars. Sub-section title: big cars.
Reply
#72
whether it is possible for the field "Image" to use the button "Browse"?
Reply
#73
(2015-07-11, 20:34:20)Oleg06 Wrote: whether it is possible for the field "Image" to use the button "Browse"?

https://github.com/webketje/GS-Custom-Se.../issues/20
Reply
#74
I've installed plugin but it not work. It only shows error:

PHP Code:
file_get_contents(M:\profiles\ZendServer\Apache2\htdocs\local.beatajankowska/plugins/custom_settings/lang/pl_PL.json) [function.file-get-contents]: failed to open streamNo such file or directory in M:\profiles\ZendServer\Apache2\htdocs\local.beatajankowska\plugins\custom_settings\customsettings.class.php on line 614 
http://flexphperia.net - my portfolio
Reply
#75
(2015-07-11, 20:34:20)Oleg06 Wrote: whether it is possible for the field "Image" to use the button "Browse"?

As datiswous mentioned, not yet. However, you can enter root-relative paths manually (eg. /uploads/my-image.jpeg)

(2015-07-23, 19:58:56)mganko Wrote: I've installed plugin but it not work. It only shows error

Yes, apparently I forgot to correctly handle missing language files in that function.
You can solve it by replacing line 614 in plugins/custom_settings/customsettings.class.phpwith these lines: 

PHP Code:
if (file_exists(GSPLUGINPATH 'custom_settings/lang/' $LANG '.json'))
  
$path GSPLUGINPATH 'custom_settings/lang/' $LANG '.json';
else
  
$path GSPLUGINPATH 'custom_settings/lang/en_US.json'
$f json_decode(file_get_contents($path); 

Will fix this in next version.
Reply




Users browsing this thread: 2 Guest(s)