MyBB Community Forums
Question about settings field of plugin - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Development (https://community.mybb.com/forum-68.html)
+---- Thread: Question about settings field of plugin (/thread-171321.html)



Question about settings field of plugin - martec - 2015-06-01

Possible create field setting reserved to plugin?
Explain better, setting of plugin that user can't edit, only script of plugin.
Has several optionscode (text, yesno, radio etc) but not has something like hide.
How made what i trying made?


RE: Question about settings field of plugin - Crazycat - 2015-06-01

Well, I don't really understand your need.
If a setting hasn't to be edited, you can just use a variable in the plugin.


RE: Question about settings field of plugin - martec - 2015-06-01

(2015-06-01, 10:39 AM)Crazycat Wrote: Well, I don't really understand your need.
If a setting hasn't to be edited, you can just use a variable in the plugin.

i need store token information from node server.
i want store this information in settings of plugin but i don't want that user edit this field in ACP settings. Read Only or hide.


RE: Question about settings field of plugin - Crazycat - 2015-06-01

How will you get (and store) this information ? And when ?


RE: Question about settings field of plugin - martec - 2015-06-01

(2015-06-01, 01:13 PM)Crazycat Wrote: How will you get (and store) this information ? And when ?

using curl and will store in database. in registration in shoutbox, and when some one post new post and new thread. I trying avoid server need get token every event,


RE: Question about settings field of plugin - Euan T - 2015-06-01

You'll need to put it in a new table. Default settings aren't meant to be hidden.


RE: Question about settings field of plugin - Crazycat - 2015-06-01

If it's a single setting, you can write (and overwrite) in a file (in cache directory ?)
You can get the content each time with file_get_contents and (over)write it with file_put_contents


RE: Question about settings field of plugin - Euan T - 2015-06-01

Or, if you don't mind the possibility of it disappearing, just stick it in the cache itself.


RE: Question about settings field of plugin - martec - 2015-06-01

thanks... i will try cache...