Jump to content



Photo
- - - - -

admin/categories.php Add image data on image upload


This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1   Juto

Juto
  • Members
  • 369 posts

Posted 26 May 2012 - 00:33

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 ONLINE   multimixer

multimixer

    Lemons or Melons ?

  • Partner
  • 4,568 posts

Posted 26 May 2012 - 06:02

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

#3   Juto

Juto
  • Members
  • 369 posts

Posted 26 May 2012 - 09:18

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. /smile.png' class='bbc_emoticon' alt=':)' />

Hopes that it explains it good enough.

Thanks for your assistance.

Sara

#4   Juto

Juto
  • Members
  • 369 posts

Posted 19 July 2012 - 18:30

Fixed