Author Topic: Multiple image deletions  (Read 8348 times)

0 Members and 1 Guest are viewing this topic.

Offline jortiz13

  • Newbie
  • *
  • Posts: 12
    • View Profile
Multiple image deletions
« on: February 26, 2008, 02:18:53 PM »
Hi, I was searching on this topic but I was not able to fing anything. Is there a mod that allows the users to select more than one pic at a time and then deletes them all?

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Multiple image deletions
« Reply #1 on: February 26, 2008, 07:10:35 PM »
And ... where in gallery ?
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline jortiz13

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Multiple image deletions
« Reply #2 on: February 26, 2008, 08:33:20 PM »
For example we currently have the lightbox on every thumbnail pic and that is available for all user including pics not owned by that user at the . We could add a check box right next to it to delete. But only show that option on the pics owuned by the user logged in at that time.
It could use the same type of process where the pics get selected like the lightbox does, then you can click on a link to see the selected pics like the lightbox do and put something like delete selected images

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Multiple image deletions
« Reply #3 on: February 27, 2008, 02:39:30 AM »
And ... thumbnail for which page ? Please post detail.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline jortiz13

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Multiple image deletions
« Reply #4 on: February 27, 2008, 03:48:46 PM »
You know how the Lightbox works, You have a button for it on every thumbnail and full size pic. You click on the buton and the lightbox container starts gertting pics for you to be able to see them when you click on the Lightbox link. We can do the same proses as the lightbox but for deletions. You will have a buton or check box called exaple, "mark fo deletion" that will go in the an specific area. Then you can go to that area using a link called for example "Delete Marked images", " Delete Selected Imaged" or something like that. You can See the images you marked for deleteton and there should be a buton maybe called "Delete Images" or something like that
Very important, only the users logged in can select it own pics for deletion.

As the system works now you have to go and open every pic and go thru the delete pic porces one pic at a time.
With a mod like this you can just go through the categories when the user has pic, select all pic that wants to delete and go to a single place to delete them all at once.

Maybe this is a very large mod to developed but it could be something good for the next relese

I installed the multiupload mod and it works great. This could be a very good mod to included on the next relese and also
Anothe mod I added was the Hot Links mod. Right on the detaile page for the pic. Works great!!!

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Multiple image deletions
« Reply #5 on: February 27, 2008, 04:14:03 PM »
Quote
With a mod like this you can just go through the categories when the user has pic, select all pic that wants to delete and go to a single place to delete them all at once.

Ah ! - now is clear (and no ... is very small MOD).

Quote
I installed the multiupload mod and it works great.

Which one ?

Ok - I create.

// Step 1

In index.php file,

find:

Code: [Select]
$new_images .= "</table>\n";

add after:

Code: [Select]
if (!empty($user_info['lightbox_image_ids'])) {
      $new_images .= "<script language=\"JavaScript\">\n";
      $new_images .= "function clearlightbox() {\n";
      $new_images .= "if (confirm('" . $lang['delete_lightbox_confirm'] . "')) {\n";
      $new_images .= "location.href = \"" . $site_sess->url(ROOT_PATH . "lightbox.php?action=clearlightbox") . "\"\n";
      $new_images .= "}\n";
      $new_images .= "}\n";
      $new_images .= "</script>\n";     
      $new_images .= "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n<tr class=\"imagerow1\">\n<td align=\"center\" width=\"" . $imgtable_width . "\">\n";     
      $new_images .= "<a href=\"javascript:clearlightbox()\"><b>" . $lang['delete_lightbox'] . "</b></a>\n";
      $new_images .= "</td>\n";
      $new_images .= "</tr>\n";
      $new_images .= "</table>\n";     
  }

// Step 2

In categories.php file,

find:

Code: [Select]
$thumbnails .= "</table>\n";

add after:

Code: [Select]
if (!empty($user_info['lightbox_image_ids'])) {
      $thumbnails .= "<script language=\"JavaScript\">\n";
      $thumbnails .= "function clearlightbox() {\n";
      $thumbnails .= "if (confirm('" . $lang['delete_lightbox_confirm'] . "')) {\n";
      $thumbnails .= "location.href = \"" . $site_sess->url(ROOT_PATH . "lightbox.php?action=clearlightbox") . "\"\n";
      $thumbnails .= "}\n";
      $thumbnails .= "}\n";
      $thumbnails .= "</script>\n";     
      $thumbnails .= "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n<tr class=\"imagerow1\">\n<td align=\"center\" width=\"" . $imgtable_width . "\">\n";     
      $thumbnails .= "<a href=\"javascript:clearlightbox()\"><b>" . $lang['delete_lightbox'] . "</b></a>\n";
      $thumbnails .= "</td>\n";
      $thumbnails .= "</tr>\n";
      $thumbnails .= "</table>\n";     
  }

// Step 3

In search.php file,

find:

Code: [Select]
$thumbnails .= "</table>\n";

add after:

Code: [Select]
if (!empty($user_info['lightbox_image_ids'])) {
      $thumbnails .= "<script language=\"JavaScript\">\n";
      $thumbnails .= "function clearlightbox() {\n";
      $thumbnails .= "if (confirm('" . $lang['delete_lightbox_confirm'] . "')) {\n";
      $thumbnails .= "location.href = \"" . $site_sess->url(ROOT_PATH . "lightbox.php?action=clearlightbox") . "\"\n";
      $thumbnails .= "}\n";
      $thumbnails .= "}\n";
      $thumbnails .= "</script>\n";     
      $thumbnails .= "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n<tr class=\"imagerow1\">\n<td align=\"center\" width=\"" . $imgtable_width . "\">\n";     
      $thumbnails .= "<a href=\"javascript:clearlightbox()\"><b>" . $lang['delete_lightbox'] . "</b></a>\n";
      $thumbnails .= "</td>\n";
      $thumbnails .= "</tr>\n";
      $thumbnails .= "</table>\n";     
  }

Finish.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline jortiz13

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Multiple image deletions
« Reply #6 on: February 27, 2008, 09:54:29 PM »
Remember used the lightbox as an example of the proces. A whole new preces need to be creaded for the deletions and a new page need to be created to put the images in to, to delete them all later.

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Multiple image deletions
« Reply #7 on: February 28, 2008, 03:06:35 AM »
If need create new page for lightbox ... try 'Recycle bin' MOD from V@no.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline jortiz13

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Multiple image deletions
« Reply #8 on: February 28, 2008, 03:29:42 PM »
I used the lightbox as an example for the process that can be used for deletions. The multiple deletions would need a whole new process and at least one additional page and who knows what alse. Sorry I don't know much about programing. I Looked that the Reciycle Bin mod but that is not what I am looking for.

Thanks for you help anyway. I will give up on this mod for now.  :D

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: Multiple image deletions
« Reply #9 on: February 28, 2008, 11:30:53 PM »
Quote
The multiple deletions would need a whole new process and at least one additional page and who knows what alse.

No new process is need ... you need add form in $new_images and $thumbnails and add input form array name in thumbnail_bit.html file ...
After delete success (and use clearlightbox) - page_header.php file is return msg text for delete in self page ...
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?