Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

[SOLVED] configuration path. 07 Jun 2012 05:40 #2497

  • liubov
  • liubov's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
Hi Admin,

I have 3 directories for uploaded images, and I have chosen [IMAGES]/pedigrees_photo in the component parameters.
Configuration says that [IMAGES] is 'site images root', but images are uploaded as [COM_SITE] in :
my_component/files/pedigrees_photo.

I would like to get them in /images/pedigrees_photo ...

Thx,

Marc

Please Log in or Create an account to join the conversation.

Last edit: by liubov.

Re: [IMAGES] configuration path. 07 Jun 2012 08:26 #2499

  • liubov
  • liubov's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
Ok, I know what happens, now !
return array(
			'DIR_PEDIGREES_PHOTO' => $config->get("upload_dir_pedigrees_photo", "[COM_SITE]" .DS. "files" .DS. "pedigrees_photo") .DS,
			'DIR_PEDIGREES_LOGO' => $config->get("upload_dir_pedigrees_logo", "[COM_SITE]" .DS. "files" .DS. "pedigrees_logo") .DS,
			'DIR_PORTEES_PHOTO_CHIOTS' => $config->get("upload_dir_portees_photo_chiots", "[COM_SITE]" .DS. "files" .DS. "portees_photo_chiots") .DS,
			'DIR_ACTUALITES_PHOTO' => $config->get("upload_dir_actualites_photo", "[COM_SITE]" .DS. "files" .DS. "actualites_photo") .DS,
			'DIR__TRASH' => $config->get("trash_dir", JPATH_ADMIN_JBREEDM .DS. "images" . DS . "trash") .DS,

			'COM_ADMIN' => JPATH_ADMIN_JBREEDM,
			'ADMIN' => JPATH_ADMINISTRATOR,
			'COM_SITE' => JPATH_SITE_JBREEDM,
			'IMAGES' => JPATH_SITE .DS. $config->get('image_path', 'images')  .DS,
			'MEDIAS' => JPATH_SITE .DS. $configMedias->get('file_path', 'images') .DS,
			'ROOT' => JPATH_SITE
		);

	}

When the code is generate, the images DIR is writed in the code (classes/file.php), and in the config.xml file.
The problem :
The user has the possibility to rename the images DIR with the Params Button (Component configuration).
In that case, the call to
$config->get("upload_dir_pedigrees_photo" ...)
returns the default value [COM_SITE] ...

Please Log in or Create an account to join the conversation.

Last edit: by liubov.

Re: [IMAGES] configuration path. 07 Jun 2012 10:02 #2502

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Well,

Is it still an issue for you ?
I can't understand if you solved it or no ?
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: [IMAGES] configuration path. 07 Jun 2012 10:27 #2504

  • liubov
  • liubov's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
Yes, this ticket is solved for me, because I know how it works ... U can close it.

But note that you write 'DIR_name_photo' as variable in the code (classes/file.php) but the user can change the name of this Directory (Params).

In that case, Images will be uploaded in the default Directory [COM_SITE], cause the variables won't match.

That's all.

Marc

Please Log in or Create an account to join the conversation.

Last edit: by liubov.
  • Page:
  • 1
Time to create page: 0.104 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started