INI files documentation about to start, a couple questions..

A place to discuss development of the Xataface core.

Postby Aoirthoir » Thu Sep 21, 2006 5:21 pm

Mr. Steve,

I've finally gathered all the requests from the forums and entered them into the Issue Tracker, gone through all of the errors and seperated them by category, to mark resolved the ones that are, and to detail solutions to them and others. I have a few more to go into the forum to ask about...but they are basically wrapped up. I've gone over the tutorial a couple of times again so I think I have a handle on how we would program mods to DF. So now, for simplicity sake, I wish to start with the INI files documentation. If I am able to get more done over the weekend I will consider that a bonus. Much of the info about ini's is already documented. But I gather from reading the posts there are still features that are undocumented, or not even mentioned.

Thus my question is, how would I go about finding those things out? Does each INI have one place in a particular .php file that it is loaded from? Or that its variables are read from? (Short of me pouring over all the code in the DF system...)

Any assistance you could give would be greatly appreciated.
Aoirthoir
 
Posts: 420
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Thu Sep 21, 2006 5:48 pm

The definitive source is ME, I guess. In fact the INI files can be bent to add any information you want. The Dataface_Table class has a method named loadFieldsINIFile() (or something like that) where it loads the fields.ini file. This is where is simply loads the information into memory. You can add parameters to your fields.ini file that don't exist, but you can still access them in your own modules and templates.

For example. Say you wanted to add a property to your field. Call this property "foo", and the field name is "bar".

Add if to your ini file like so:

Code: Select all
[bar]
foo = "My Foo Value"



You can always access this value from within the app as follows:

Code: Select all
$table =& Dataface_Table::loadTable('mytable');
$field =& $table->getField('bar');

$foo = $field['foo']; // will by "My Foo Value"



This flexibility is good and bad. Good because it can grow indefinitely. Bad because there is no one place to check to see if an option is supported.

In many cases I'll add and use some options in the ini file, but I won't document them until they are tested and ready to roll. This is kind of a feasibility issue, as advertised features that don't work or are complicated to understand result in a lot of support requests... better to wait until something is tested, and "simplified" before documenting it.

I'd say that about half to 3 quarters of the available options have been documented on this site in some shape or form. The other bunch of features I either haven't had time to document, or I'm waiting for one reason or another.

Best regards

Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby Aoirthoir » Thu Sep 21, 2006 8:54 pm

Thank you. A lot of it is documented in the forum. At one place Mr. Neil mentions prefs.* and am not quite sure what that is yet.

However, it is also nice to know that we can read our own values anywhere.

So then because of all the support issues that could arise for you, it seems to be best that I should just gather together all of the settings you have mentioned in the forums. Most of them are documented in the ini references I am seeing as I look over what I have thus far. And just a couple here and there that are not documented there, but are in the forum (spread out of course over lots of pages of dicussion.) So then you can just review them when I am ready and make any comments you wish. If I get the ini's done tonight, or tonight and tomorrow, I will move on, otherwise it will be a weekend project for the INIs.

Thank you kindly for your time bro.
Aoirthoir
 
Posts: 420
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Developers

Who is online

Users browsing this forum: No registered users and 5 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved