Page 1 of 1

Pathing problem due to my mistakes....

PostPosted: Tue Feb 12, 2013 11:49 am
by mike.jones
Hi,

Trying to get Xataface going to assist in a data entry for an upcoming event.

We are installing the application folder (contest) in a subfolder of the domain due to some setup issues from wayback when.

We have the .htaccess file redirecting to the sub-folder for all writes where we have Joomla! installed and running.

swmobridgecontest.org is the URL

We are able to Xataface working, but the paths to the style sheet and the graphics don't seem to be correct.

Here is the index.php file

Code: Select all
<?php
/**
* File: index.php
* Description:
* -------------
*
* This is an entry file for this Dataface Application.  To use your application
* simply point your web browser to this file.
*/
$time = microtime(true);
  // use the timer to time how long it takes to generate a page
require_once '/home/swmobridge/swmobridgecontest.org/cms/contest/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 "<p>Execution Time: $time</p>";
?>


Here is where the path for the images seems to be pointing...

<img src="/dataface/images/logo-small.jpg


The makesite script was utilized to deploy the folders and such.

Do I simply modifiy the index.php to have the df_init(___FILE___, '/dataface'); spell out the direct path?

Anyway, my relative pathing kung-fu is weak and pitiful, so any assistance would be appreciated.

Regards,

Mike

Re: Pathing problem due to my mistakes....

PostPosted: Tue Feb 12, 2013 1:00 pm
by auphi
I have the same setup. Get rid of the / in "df_init(___FILE___, '/dataface');"

You can also use the relative path for require_once.

Here's my index.php
Code: Select all
require_once "xataface/dataface-public-api.php";
df_init(__FILE__, "xataface");
$app =& Dataface_Application::getInstance();
$app->display();

Note: my sub-folder is named "xataface", it looks like yours is "dataface" so make sure to change your index file accordingly.

Re: Pathing problem due to my mistakes....

PostPosted: Tue Feb 12, 2013 3:33 pm
by mike.jones
Wonderful - appreciate the assistance.

Works great!