Change the default path

Phoca Gallery - image gallery extension
Zappu
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 20 Nov 2008, 15:16

Re: Change the default path

Post by Zappu »

and some hints, do not change the gallery path which appears as images/phocagallery only, you need also to change the other path definitions like:

Code: Select all

		
$path['orig_abs_ds'] 	= JPATH_ROOT . DS . 'images' . DS . 'stories' . DS . 'phocagallery' . DS ;
$path['orig_abs'] 	= JPATH_ROOT . DS . 'images' . DS . 'stories' . DS . 'phocagallery' ;

BigMan
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 05 Oct 2011, 14:10

Re: Change the default path

Post by BigMan »

Hi,

Has anyone done this recently? I cannot see the helpers directories. It seems like the manner in which this is done has been changed - and pointers much appreciated.

Would I be right that this has now been moved into (under the admin section):

./libraries/phocagallery/path/path.php: $instance->image_abs = JPATH_ROOT . DS . 'images' . DS . 'phocagallery' . DS ;
./libraries/phocagallery/path/path.php: $instance->avatar_abs = JPATH_ROOT . DS . 'images' . DS . 'phocagallery' . DS . 'avatars' . DS ;


Thanks,

BigMan
royalskids
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 14 Sep 2014, 18:23

Re: Change the default path

Post by royalskids »

I´d like to bump this one
Anyone know any solution for changing path?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48859
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Change the default path

Post by Jan »

Hi, if you are using Joomla! 3, the file to edit is stored here:

administrator\components\com_phocagallery\libraries\phocagallery\path\path.php

But as I wrote, I didn't test it, so there can be some dependencies in other parts of the code

So the path should be changed in this file and then tested if it does not break any other feature in the system :idea:

Jan
If you find Phoca extensions useful, please support the project
royalskids
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 14 Sep 2014, 18:23

Re: Change the default path

Post by royalskids »

Changed:

Code: Select all


$instance->image_abs 			= JPATH_ROOT . DS . 'images' . DS . 'phocagallery' . DS ;

			$instance->image_rel			= 'images/phocagallery';
To:

Code: Select all

$instance->image_abs 			= JPATH_ROOT . DS . 'images' . DS ;

			$instance->image_rel			= 'images/';

And it works, But I have to add all images manually? Is there any way to automaticly detect photos in folder?

Thanks for great help!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48859
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Change the default path

Post by Jan »

Hi, no, you need to copy them to the folder you need and you need to check if the thumbnail creation will work with such folder :idea:

Jan
If you find Phoca extensions useful, please support the project
aslopez
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 17 Mar 2016, 14:07

Re: Change the default path

Post by aslopez »

Can anyone help me? I'm try to change the path to:

Code: Select all

$instance->image_rel = "//192.168.200.140/images/sources/";
But I'm getting this error:
JFolder: :files: Path is not a folder. Path: \192.168.200.140\images\sources\
JFolder: :folder: Path is not a folder. Path: \192.168.200.140\images\sources\
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48859
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Change the default path

Post by Jan »

Hi, this means, that the path is not correct and Joomla! methods cannot find any such path on your server :idea:

Jan
If you find Phoca extensions useful, please support the project
aslopez
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 17 Mar 2016, 14:07

Re: Change the default path

Post by aslopez »

Hi Jan, thanks for the quick response. Here's my scenario, Joomla is located in 192.168.200.180 and I'm trying to change the default image directory to 192.168.200.140. So whenever the admin uploads anything, it will save it in 192.168.200.140. Is that even possible?
aslopez
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 17 Mar 2016, 14:07

Re: Change the default path

Post by aslopez »

I finally found a way to make it work! :cry:

I used a symbolic link in windows to link the local directory to a network path.

Code: Select all

mklink /D C:\xampp\htdocs\joomla\images \\192.168.200.180\repository\images 
I know this has nothing to do with this joomla component but I hope it helps someone who has the same issue.
Post Reply