Newbie question: it works but why is there no formatting?
Archived from the Xataface Users forum.
dgoadby — Fri Aug 14, 2009 6:40 am
I installed V1.1.4, checked the installation with dataface_info ok. I then created a small application which has one table in it.
I ran the app and it works except it is just plain text, no colours, no logos etc which I had expected. It appears that the default template is not being used for some reason.
I am using WampServer2.0i under windows and other php apps such as serendipity and sugar are working ok.
conf.ini file looks like this:
- Code: Select all
- `[_database]
host = “localhost”
user = “root”
password = “”
name = “aqh”[_tables]
Prices = “Prices”`
And the bits that matter in index.php look like this:
- Code: Select all
require_once 'C:\wamp\www\xataface-1.1.4\dataface-public-api.php'; df_init(__FILE__, 'http://localhost/aqh-demo'); $app =& Dataface_Application::getInstance(); $app->display();
The whole of the Xataface folder is untouched ie as unzipped.
As I am sure it works fine, what have I not done?
shannah — Fri Aug 14, 2009 7:15 am
The problem is the 2nd parameter to your df_init() call. This should be an accessible URL to the Xataface directory. It can be absolute or relative. (i.e. this is not a file path - it is a URL).
dgoadby — Fri Aug 14, 2009 9:47 am
Hi Shannah,
My PHP was not displayed correctly so I have now corrected it.
When I access the app then http://localhost/aqh-demo is the URL I use so I assume it works. Since the application works ie I can view and edit the table then I also assume that Xataface is working too. It’s just not using the template (that’s my guess anyway) for some reason.
David
shannah — Fri Aug 14, 2009 10:16 am
OK… There are 2 different URLs to be concerned with here:
-
The URL to your application likely http://localhost/aqh-demo
-
The URL to the xataface directory. Maybe you have it in a subfolder of aqu-demo? This might be something like http://localhost/aqh-demo/xataface .
shannah — Fri Aug 14, 2009 10:27 am
i.e.
- Code: Select all
df_init(__FILE__, 'http://localhost/aqh-demo');
should be something like
- Code: Select all
df_init(__FILE__, 'http://localhost/aqh-demo/xataface');
dgoadby — Fri Aug 14, 2009 12:16 pm
Thanks Shannah
I changed the parm as below and voila!
df_init(__FILE__, ‘http://localhost/xataface-1.1.4’);
I reread the documentation more slowly and it describes it quite clearly. A DOH moment for me
Thanks again.
David