I am writing a new component that will integrate a google sheets document with billing balances and match the balance in the sheet to the logged in user. Right now I have just hard coded my Sheets URL with API Key in the code but I want to add this to the configure menu in the admin dashboard in order to make it clean. So really I want to add two things, a text input for the URL and a text input for an error message in case a match couldnt be found between the logged in user and a user in the Sheets document. Could someone point me in the right direction?
Thanks!
Thanks ~Z~ Man, I really appreciate the help! That was a great explanation. I understand now
Looks a little bit like that, yes.
There's an example in the how-to, and yesterday I posted another one in https://www.opensource-socialnetwork.org/discussion/view/3173/how-can-i-keep-the-left-side-bar-groups-visible-all-the-time
So what's the problem? You're interested in retrieving/saving component settings, ok. Hence, my next step would be having a look at a component which IS in fact retrieving/saving settings. And since it's always a good idea to use the simplest one, my favorite would be OssnSmilies. Then let's have a look at its settings page now ...
Okay, we see 1 input field, and right clicking into it and choosing 'Inspect' will open the browser's dev console highlighting a select tag named compatibility_mode
. Right this already looks like a promising search term, and in fact searching the source for 'compatibility_mode' will return:
and
And having a look into these files already answers your question: getComSettings("COMPONENT")
is doing the read, while setSettings("COMPONENT", array of settings)
is doing the write.
I understand how to search source code, my question was about how to save and retrieve multiple values from the database. Unless Im misunderstanding something maybe
Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.
$199 (Life Time)