Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GS Custom Settings [v0.6.2]
(2015-12-07, 16:25:38)sbre Wrote: hi there,

i tried to install gs custom settings to a new installation with the following result: See attachment.

Any idea?

Thank you.

Hey sbre,

You clearly have a Javascript error somewhere, can you press F12 after you load the page, go to the console tab and copy paste the errors here so I can help you debug further, cheers.
Reply
I use this code in your template
Code:
<div class="col-sm-8 text-left">

    <?php if (return_setting('site_settings','phone_setting')) { ?>

    <span><a href="tel:<?php get_setting('site_settings','phone_setting'); ?>"><i class="fa fa-phone"></i><?php get_setting('site_settings','phone_setting'); ?></a></span>

    <?php } ?>

    <?php if (return_setting('site_settings','mobile_setting')) { ?>

    <span><a href="tel:<?php get_setting('site_settings','mobile_setting'); ?>"><i class="fa fa-mobile fa-lg"></i><?php get_setting('site_settings','mobile_setting'); ?></a></span>

    <?php } ?>
                        
</div>

after clearing the text field on the site an error
Code:
Notice: Undefined index: value in /home/u915147/demo.getsimplethemes.ru/building-en/plugins/custom_settings/customsettings.class.php on line 325
Reply
Hey 0leg, yes that's okay. 
If you deleted the field then it is normal that your PHP function calls will no longer work, hence the notice.
Reply
I think this code is not working.
Code:
<?php get_i18n_setting('shopping_cart','side_title_items',true); ?>
http://prntscr.com/axh1gc
http://prntscr.com/axh1sy
http://prntscr.com/axh22i
Here in the sidebar "Новые товары" are written in three languages
http://demo.getsimplethemes.ru/shop-ru/m...ategoriya/

possible after updating the plugin I18N, something went wrong
Reply
(2016-04-27, 19:21:52)Oleg06 Wrote: I think this code is not working.

Code:
<?php get_i18n_setting('shopping_cart','side_title_items',true); ?>
http://prntscr.com/axh1gc
http://prntscr.com/axh1sy
http://prntscr.com/axh22i
Here in the sidebar "Новые товары" are written in three languages
http://demo.getsimplethemes.ru/shop-ru/m...ategoriya/

possible after updating the plugin I18N, something went wrong

Thanks for reporting Oleg, 
Yes there seems to be something wrong with the I18n feature, I'll try to fix & release asap.
Reply
Good day!
Tell me, will the plugin be updated and corrected mistakes?
I use machine translation. Forgive my errors.
Reply
Still looking really promising but I can't use it yet. I can't get a check box to include/exclude content working at all.
I am really confused by the two export and the two save buttons and not sure what the 'tabs' are for.
The new 'tab' that appears called Theme Settings is a mystery
I still don't know if I should be using (return_setting('theme','banner_inc') or (return_setting('theme_setting','banner_inc') or (return_setting('tab-name','banner_inc') or (return_setting('new_tab','banner_inc') but none of them seem to work.

I would love to see it working.
Reply
(2016-09-27, 10:37:54)Timbow Wrote: Still looking really promising but I can't use it yet. I can't get a check box to include/exclude content working at all.
I am really confused by the two export and the two save buttons and not sure what the 'tabs' are for.
The new 'tab' that appears called Theme Settings is a mystery
I still don't know if I should be using (return_setting('theme','banner_inc') or (return_setting('theme_setting','banner_inc') or (return_setting('tab-name','banner_inc') or (return_setting('new_tab','banner_inc') but none of them seem to work.

I would love to see it working.

There's actually a link to copy the code. It looks like:
Code:
< />

What you can do, for example, is create a setting with a radio selection, with options show-content and show-nocontent
In your css you make for example a class .show-nocontent :
Code:
.show-nocontent { display: none;}

Then there are 2 ways to implement that. You can use the code url which will be shown when pressing the < /> button in the Edit screen. You can use that in your theme code as a class to hide that.
Or you use the code url shown in the Manage screen when pressing the < /> button. This can be used in the editor to change the class of a <p> or an image to show/not show it.

Or the checkbox method: Make a setting called display with a checkbox for type.
make a class .content-off with display:none . Then the code for the class in the editor is something like:
Code:
<p class="content-(% setting: content-show/display %)">bla2 bl2a cbcffh2</p>

Depending on the state of the setting it will give <p class="content-on">bla2 bl2a cbcffh2</p> or <p class="content-off">bla2 bl2a cbcffh2</p>

Maybe there's a better way, since this method isn't very elegant. It adds a unused class when content is being shown.
Reply
I use this plugin in paid themes. This is a very useful plugin. Unfortunately it does not work with I18N.
When you create a checkbox in the file data.json is added code that blocks the plugin http://prntscr.com/cmxrkl. You have to remove it manually. After removing this code everything works fine.
Reply
Thank you both datiswous and Oleg. It sounds like I could get it working if I needed to, but how good it would be if it was debugged and made to function properly?

I am taking a look at mvlcek's plugin now. It doesn't have the features but it may do the job.

These pages aren't that easy to find so I am leaving them here for anyone looking for info.
Reply
(2016-09-28, 04:39:36)Timbow Wrote: These pages aren't that easy to find so I am leaving them here for anyone looking for info.

Those links are mentioned in the first post of this topic. I learned most all from here: http://webketje.com/projects/gs-custom-settings

I'm not sure what you want, but you do need to read some of the docs to learn the interface, since it's not that clear. I think that's because it tries to do multiple things. But I guess if you only need (some) theme settings, Mvlcek's Theme Settings plugin might be easier.
Reply
(2016-09-28, 05:14:46)datiswous Wrote: I'm not sure what you want, but you do need to read some of the docs to learn the interface, since it's not that clear. I think that's because it tries to do multiple things. But I guess if you only need (some) theme settings, Mvlcek's Theme Settings plugin might be easier.
Yes I had lost that page, thanks. I was just trying to find out what I could do with the plugin. I didn't have specific needs. The task I set myself was to introduce some settings to an existing theme - setting up social links I could do after some confusion, including and excluding blocks of content I failed to do and some simple colour changing I think I would manage. 
At the moment though the plugin is unfinished even if it's useable.
Reply
Hey Timbow, 

Thanks for your interest in this plugin. I'm honored to see one of the most active (if not the most) GS theme developer(s) consider it. I was planning on contacting you at some point but only wanted to do so when the plugin was completely stable. As there's been some activity here recently although the plugin hasn't been updated in a while (+6 months), I do plan to continue support & updates. I was very active on this project during my last year of university and had lots of spare time to dedicate to it (now I have full-time work, and a lot of other commitments to wrap my head around).

In the process of development, I learnt to use the KnockoutJS & RequireJS libraries as well as deepened my understanding of PHP. As a front-end developer my interest went especially into providing an ultra-user-friendly UI. However as you pointed out there are some flaws, and I think it's appropriate to shed some light on the current state of the plugin here:
  • The PHP API is very mature & well thought-out at this point and will not change much. Some input types might be added. (eg. password, with proper salting/ encryption)
  • Being amazed by Knockout's data-binding at the moment I first developed the plugin, I tried to do too much with it, which lead to complex JS code & hacks which didn't always work (eg. for image inputs and I18n)
  • I wanted to provide an easy upgrade path for changes to data files, and also put a lot of extra complexity in that.
  • I developed the plugin with 3 target audiences (users, theme devs & plugin devs), but made the mistake of providing different ways of using it instead of one single way.
    • I'm pretty satisfied about the UI for webmasters/ users as it is simple, yet provides complex functionality, and has been tested thoroughly.
    • I did develop two other plugins (AdminXML Plus & GSConfig UI) with the plugin API which went pretty smooth & saved time. That being said, I wasn't sure about upgrades to the data files and whether all would go well.
    • The theme API will be discontinued (or at least modified) in favor of the simpler "import".

If I were to do it all over from scratch, I would favor something in the trend of Components Extended, then build add-ons on top of it. As @datiswous mentioned :
Quote:[...] it's not that clear. I think that's because it tries to do multiple things.

It tries to do too many things, and the first next update will be about simplifying the plugin.
Reply
Hi Tyblitz,

Good to hear from you. I am not one of the clever people round here and have only a half-understanding of code and scripting picked up bit by bit while making websites.

Delighted to hear that you have plans to work on the plugin and totally understand the busyness and time constraints. We all have them.

Best wishes
Reply




Users browsing this thread: 1 Guest(s)