Jump to content



Latest News: (loading..)

- - - - -

admin/categories.php Add image data on image upload


  • Please log in to reply
3 replies to this topic

#1   Juto

Juto
  • Members
  • 369 posts
  • Real Name:Sara
  • Gender:Female

Posted 26 May 2012 - 12:33 AM

Hi, hopefully someone knows if I am correct. I need to manipulate product images data.

Is this the right place to do it In admin/categories.php?

   if ($action == 'new_product_preview') {
// copy image only if modified
		if ($dir && !is_dir(DIR_FS_CATALOG_IMAGES . $dir)) {
	   if (mkdir(DIR_FS_CATALOG_IMAGES . $dir)) $messageStack->add('Folder ' . $dir . ' created in '. $images_dir . '.', 'success');
	}
		$products_image = new upload('products_image');
//	  Should my code be here? <==================
		$products_image->set_destination(DIR_FS_CATALOG_IMAGES . ($dir ? $dir .'/' : ''));
		if ($products_image->parse() && $products_image->save()) {

Thanks in advance

Sara

#2   multimixer

multimixer

    Lemons or Melons ?

  • Partner
  • 4,376 posts
  • Real Name:George Zarkadas
  • Gender:Male
  • Location:Greece

Posted 26 May 2012 - 06:02 AM

It would be useful to know what exactly you try to do

#3   Juto

Juto
  • Members
  • 369 posts
  • Real Name:Sara
  • Gender:Female

Posted 26 May 2012 - 09:18 AM

Hi George, nice to see you again.
This is the story:
I have a GPS with an application from which I can retrieve GPS coordinates and datum.
Also, I am using a digital camera taking photo's at the GPS spot.
Now, when I upload or change an existing image I would love to insert the GPS data.

The purpose is to then connect to google map to show where the spot is, using the gps coordinates.

The spot could be a hotel in Greece for example. :)

Hopes that it explains it good enough.

Thanks for your assistance.

Sara

#4   Juto

Juto
  • Members
  • 369 posts
  • Real Name:Sara
  • Gender:Female

Posted 19 July 2012 - 06:30 PM

Fixed