Page 1 of 1

PostPosted: Tue Oct 24, 2006 8:55 am
by wreid
Hi,

I just started using dataface and was using it on an old database of mine. Everything has worked out, however, I was following the tutorial about setting the fields.ini file and I can't get it to display - it still shows my fields as matrix_id, matrix_name and matrix_phrase.

this is my fields.ini:

[matrix_id]
widget:label = "Matrix Id"

[matrix_name]
widget:label = "Matrix Name"

[matrix_phrase]
widget:label = "Matrix Phrase"

located in "tables\matrix" directory - the table is also called matrix

Any help on this would be much appreciated!

PostPosted: Tue Oct 24, 2006 9:50 am
by shannah
Okay.. it appears that it probably isn't picking up your fields.ini file. Some things to consider:

Everything is case sensitive. E.g. if you table is named 'matrix', then your fields.ini file should be at 'tables/matrix' and if your table is named 'Matrix' your fields.ini file should be at 'tables/Matrix'.

Also.. make sure that your 'tables' directory is in the same directory as your application's index.php file.

If these don't help you, perhaps post your index.php file, relevant portions of the table definition, and let me know the directory structures of where all of your files are..

Also make sure that your fields.ini file is at least readable by the web server.

Hope this helps a little.

-Steve

PostPosted: Tue Oct 24, 2006 11:26 am
by wreid
Thanks for the reply Steve.

It's kinda of weird - This is the path I use on my windows box

C:\AppServ\www\Matrix\tables\matrix

This folder contains the one file "fields.ini" with the info specified before. There are no changes to the index.php file, however I'll reprint it anyway:


$time = microtime(true);
// use the timer to time how long it takes to generate a page
require_once 'C:\AppServ\www\dataface/dataface-public-api.php';
// include the initialization file
df_init(__FILE__, '/dataface');
// initialize the site

$app =& Dataface_Application::getInstance();
// get an application instance and perform initialization
$app->display();
// display the application


$time = microtime(true) - $time;
echo "

Execution Time: $time

";
?>


The folder structure works like this:
www\
dataface\
Matrix \
.htaccess
conf.ini
index.php
tables\
compiled_stats\
episodes\
matrix\
fields.ini
matrix_item\
stats\

As a test I ran the tutorial example and everything worked fine with the "FacultyOfWidgetry". I was wondering if the "_" would mess it up in any way, but i'm grasping at straws at this point.

Again any help would be appreciated.

PostPosted: Tue Oct 24, 2006 11:29 am
by wreid
Sorry directory structure didn't come out right...

www\
--dataface\
--Matrix\
----.htaccess
----conf.ini
----index.php
----tables\
------compiled_stats\
------episodes\
------matrix\
--------fields.ini
------matrix_item\
------stats\

PostPosted: Tue Oct 24, 2006 11:36 am
by wreid
Ok, it was a silly capitalization error. I was looking at the Dataface app screen which showed the fields as "matrix_id", "matrix_phrase", "matrix_name", etc - I put it in the fields.ini like that. I just decided to add a column in phpmyadmin and then i noticed that it was in fact "MATRIX_ID", "MATRIX_NAME", "MATRIX_PHRASE".

Thanks for the help Steve. I hope I don't make other silly errors like that!

PostPosted: Tue Oct 24, 2006 11:54 am
by shannah
Glad to hear it's working.

Best regards

Steve