You are here:  » Using same feed across multiple directories


Using same feed across multiple directories

Submitted by paddyman on Tue, 2008-05-13 15:26 in

Hi David,

Not too sure how to explain this Question !!

I'm creating a news site with multiple folders. Each product will have its own folder and its own installation of PT. Lets say the site is about Tennis, I will be comparing prices for Tennis balls in mysite.com/tennisballs and prices for racquets in mysite.com/tennisracquets.

Most of these products will be in the same merchant feeds. Do you know if it would be possible to use feeds from mysite.com/feeds rather than mysite.com/tennisballs/feeds so I wouldn't have to upload the feeds multiple times for each directory.

Looking at mysite.com/tennisballs/admin/index.php I see

$feedDir = "../feeds/";

How would I change this to look for mysite.com/feeds

Would there be much more involved.

Thanks

Adrian

Submitted by support on Wed, 2008-05-14 08:12

Hi Adrian,

You are on the right lines. Basically, wherever you have:

"../feeds/"

you need to change this to the fully qualified path on your server, for example:

"/home/users/adrian/mysite.com/public_html/feeds/"

You will find "../feeds/" in the following files:

admin/index.php
admin/feeds_register_step1.php
admin/feeds_register_step2.php
admin/feeds_extras.php
includes/admin.php

If you are not sure what the full path to the feeds directory you want to use is, here is a trick to find out. Create the following file in the feeds directory:

whereami.php:

<?php
  $path 
$_SERVER["SCRIPT_FILENAME"];
  
$path str_replace("whereami.php","",$path);
  print 
$path;
?>

Upload it and then browse to that file, and it will print out the full pathname on the server that you then need to use in place of "../feeds/"!

Cheers,
David.

Submitted by paddyman on Thu, 2008-05-15 06:41

Thanks David,

Works great :)

Adrian