Newbie question: it works but why is there no formatting?

A place for users and developers of the Xataface to discuss and receive support.

Newbie question: it works but why is there no formatting?

Postby 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?
Last edited by dgoadby on Fri Aug 14, 2009 9:51 am, edited 2 times in total.
David Goadby
dgoadby
 
Posts: 6
Joined: Thu Aug 13, 2009 5:56 am
Location: North Wales, UK

Postby 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).
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby 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
David Goadby
dgoadby
 
Posts: 6
Joined: Thu Aug 13, 2009 5:56 am
Location: North Wales, UK

Postby shannah » Fri Aug 14, 2009 10:16 am

OK... There are 2 different URLs to be concerned with here:
1. The URL to your application likely http://localhost/aqh-demo
2. 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
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby 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');
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Sorted!

Postby 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
David Goadby
dgoadby
 
Posts: 6
Joined: Thu Aug 13, 2009 5:56 am
Location: North Wales, UK


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 12 guests

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