Discussion Forums  >  Buzztouch News and Announcements

Replies: 19    Views: 272

David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
10/25/12 11:55 AM (13 years ago)

Global Theme just got more flexible

We improved the Global Theme properties screen to allow you to manually enter the JSON data for your theme. This may or may not be useful for you and you don't have to do anything different if you dont' want to. However, this could be useful in lots of situations. The idea is that you can enter an arbitrary value in the Global Theme's JSON data that could then be used in ANY screen in your app. This value may be a global "style" setting (such as a font color), or, it could be something completely arbitrary. The usefulness of this improvement will depend largely on your goals and your skill. Enjoy.
 
Rad Doc
Apple Fan
Profile
Posts: 653
Reg: Oct 08, 2010
USA, NYC
8,580
like
10/25/12 11:57 AM (13 years ago)
Thank you very much:)
 
epicweb
Aspiring developer
Profile
Posts: 159
Reg: Aug 30, 2012
Glen Carbon
4,990
like
10/25/12 11:59 AM (13 years ago)
is this available for self hosted as well? I checked for updates and I dont see any.
 
othmane
Apple Fan
Profile
Posts: 105
Reg: Feb 08, 2012
Casablanca
1,050
like
10/25/12 12:17 PM (13 years ago)
Thank you very much David
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
10/25/12 12:23 PM (13 years ago)
Nice!! Loving the additions Thanks
 
Stobe
buzztouch Evangelist
Profile
Posts: 1528
Reg: Mar 04, 2011
Fredericksburg,...
24,680
like
10/25/12 12:41 PM (13 years ago)
Awesome. Thanks David! To Plugin Developers: Its important to understand how this works, and how it may affect the way your plugins handle theme options. Also, it seems it might be very important to "name" your JSON parameters in a more organized and thought out manner. Perhaps by appending your initials to each parameter (just like David has always suggested for the naming scheme of your class files). It would do no good if 4 different plugins well all looking for "cellBackgroundColor".
 
Jolee
Aspiring developer
Profile
Posts: 10
Reg: Oct 19, 2012
Bella Vista, Ca...
2,900
like
10/25/12 12:41 PM (13 years ago)
Thank you @David!!!
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
10/25/12 01:48 PM (13 years ago)
I'm developing a mod to the Cpanel that will sync amazingly with this. I create tons of code and crap that I will probably not use but I'd like it to work with Cpanel. These are only little snippets of code think twitter/ Facebook revmobs. What I have made is a super advanced options for each plugin, say 8 blank json input boxes Because I may want some screens to show ads (not iAds cos we can do that already) different share screens may have different text or pics links etc. the values are added spare1,spare2,spare 3 or they will to you because I know what I want to use the boxes for. You put in say box one/spare1 "hide" then put the link in the plugin .h then you've got access to change your screen. But I was thinking what a all ache to change all the screens then big David comes up with this, awesome. Gonna start work on this tomoz.
 
Tony @ Buzztouch
buzztouch Evangelist
Profile
Posts: 528
Reg: Mar 05, 2011
Saint Louis, Mi...
24,620
like
10/25/12 02:56 PM (13 years ago)
"The extreme" = David Book
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
10/25/12 06:29 PM (13 years ago)
Thank you! I was getting tired of having to manually input background color, list style, font size, etc every time I used a simple list menu. This makes it much easier!!
 
Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
like
10/25/12 06:57 PM (13 years ago)
Nice work David! I love how these tweaks allow us to do so much! I'd say you can check off the box next to "I did something cool today"!
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
10/25/12 07:11 PM (13 years ago)
Hmm, now I'm having problems with this. It was working fine for a few hours now I keep getting an error message when I try to refresh saying "there was a problem parsing some configuration data..." Even when I deleted what I put and put back the default JSON data I still get this message. Maybe it'll go away on its own??
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
10/25/12 07:27 PM (13 years ago)
I tried making a new theme to fix whatever I apparently screwed up, but now when I load my app I get a popup that says "the configuration data for this application is invalid". What did I do???
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
10/25/12 08:38 PM (13 years ago)
@mutzy Dunno. Maybe copy the JSON (theme or entire config) and paste in JSON validator tool? Don't have URL, Google it -:) Thinking error in syntax?
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
10/25/12 08:43 PM (13 years ago)
Yup, I put in the JSON validator and it didn't like the fact that one of my screen's name that I added earlier tonight had an apostrophe. It was quite upset. I took that out and everything is back to normal. Whew! Thanks!!
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
10/26/12 06:23 AM (13 years ago)
The advanced option starts with 'Do not change the values in this box unless you know what you're doing'. Thats me! This looks like something I wouldn't know how to use today, but I'd like to find out how.
 
Rad Doc
Apple Fan
Profile
Posts: 653
Reg: Oct 08, 2010
USA, NYC
8,580
like
11/07/12 04:02 AM (13 years ago)
@David, I recently implemented a gradient background into the manually editable global theme and it seems to override any background settings that i entered for an individual screen. Any workaround or fix to this. If i change from a gradient to solid background screen color, it reverts it back to normal and all my screens respond normally.Please advise. AM
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
11/07/12 09:15 AM (13 years ago)
You've probably noticed that the gradient background property does not show up in any of the plugin's advanced properties. This is because there are some issues and changes with the way iOS 6 handles this. You'll be best to use a background image with a gradient effect instead. Knowing that, your post still makes sense and it what your describing should not be happening. If a screen does not have a gradient background property and the global theme does, the themes values should be used (today, until we remove the gradient background support entirely). Does the console give any clues? All of the logic for the gradient background is processed in the BT_background_view.m file (in the BT_Core folder). The routine starts on line 90 of this files. It's pretty easy to understand.
 
Rad Doc
Apple Fan
Profile
Posts: 653
Reg: Oct 08, 2010
USA, NYC
8,580
like
11/09/12 03:56 AM (13 years ago)
He guys, I don't know if this happened to anyone else but all my manually inputted json has disappeared from my global theme in my CP. Please check your files and make sure you weren't effected as well. AM Update: I just realized that all my manually entered jason was overwritten after I added a splash screen. Make sure you either add a splash before you manually enter your json or copy your global json and paste back after adding splash screen.
 
Jlentriken
Aspiring developer
Profile
Posts: 246
Reg: Dec 26, 2012
Palm Beach, Gol...
12,110
like
11/27/13 07:24 AM (12 years ago)
I have just started playing around editing JSON, and i can't believe i didn't do it sooner. Could have saved me loads of work! But i stumbled across this and started playing. So Thanks, i love JSON now. Jeremy
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.