Not logged in. · Lost password · Register
Forum: Features request RSS
Settings Repository
Keefy #1
Member since Mar 2003 · 89 posts
Group memberships: Members
Show profile · Link to this post
Hi Henry, got another for you:

I'm thinking that some form of way to store settings could be very useful. I was originally wanting to do this using client-side cookies, however then you have to set everything up on each client.

My ongoing XML skin does some neat stuff with the new image stuff you added. Hover-effects and the like...  :)   However, when we first chatted about adding image support, you pointed out that it's not a good idea to force anyone into any particular naming of the image files. To handle this in my skin, I've variablised this setting, and I'm about to work on a configuration page to allow the user to configure everything without having to edit any files.

I'd like to be able to use some sort of key:value system. Using cookies could get me by, but it's not the nicest approach, due to the per-client problems I mentioned.

If you did decide to do this, the browseamp.ini file could be a good place to store it. Be aware though that it may be possible to overwrite existing BrowseAmp settings (e.g. the security ones), so perhaps a unique ini file per skin might be better.

WRT getting and setting the options, there would need to be a post command that could update a value, as well as some sort of <#setting key="pictureFile"> tag that can be added. I don't think there are any problems that would make this difficult to do.

Let me know what you think...
Avatar
Henry (Administrator) #2
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Yeah very nice idea indeed!

ini-file handling is pretty easy and I think a skin specific ini would be the best way. Give me some days...

Thanks for this idea.  :-D
Avatar
Henry (Administrator) #3
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I have created a tag that displays a [Section]->Key value from skin.ini located in the directory of each skin.

Example
last edited: <#inifile section=about key=lastmodified default="no idea">

I had no idea yet how to do a post command to set a value 'cause you need 3 strings (Section, Key and new value) and  GET commands have only key=value format... I could set a default [Section] but that's not what I like to do.

Any ideas?
Keefy #4
Member since Mar 2003 · 89 posts
Group memberships: Members
Show profile · Link to this post
Good point, forgot about the ini file sectioning stuff.

To do the URL, you could use some form of delimiter e.g. %00. So the URL might look like:

key=about%00lastmodified

Not the nicest, but it would work. Perhaps %00 isn't the best char to use though, perhaps some other character that is URL safe. If you used a slash, it could almost be like a file system, e.g.

key=about/lastmodified

That would be more logical
Avatar
Henry (Administrator) #5
Member since Jan 2003 · 865 posts · Location: Munich Germany
Group memberships: Administrators, Members
Show profile · Link to this post
The BrowseAmp url parser has to recognize the ini-file update so you need another prefix to mark this.
Hmm, how would you handle multiple changes?

Very difficult...
Keefy #6
Member since Mar 2003 · 89 posts
Group memberships: Members
Show profile · Link to this post
The BrowseAmp url parser has to recognize the ini-file update so you need another prefix to mark this.

You mean the actual ini file to use? It would be safest to restrict this to the skin one only e.g. %skindir%/skin.ini 

Then there is no potential for someone modifying the security settings in the main one.

Hmm, how would you handle multiple changes?

You don't.  ;)   With JavaScript, you can do it one at a time. Off the top-of-my-head, create a blank "dummy.html" and put it in a hidden iframe. Then set the src to the first desired URL, then "#", then the next one. This might not work exactly as I described, I'm only guessing, but something similar would work.

A config page could make this easy by having an "set" button next to each option, which calls the set URL. Then you would only need to do one at a time.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Page created in 157 ms (76.5 ms) · 63 database queries in 61.5 ms
Current time: 2018-12-18, 13:32:59 (UTC +00:00)