Author Topic: Search for inactive images  (Read 5807 times)

0 Members and 1 Guest are viewing this topic.

Offline erikito

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • http://www.erikito.com/hotornot/
Search for inactive images
« on: March 15, 2005, 03:05:59 PM »
Hi everybody. I'm currently working on a mod that inactivates images when they are too low rated (instead of deleting them... 'cause someone who clears his cookies could destroy my entire database like this unless I store votes in db... even then they could register a couple of times with different emails and nicknames and still do it...)

Now it's working ok, but I need a special searchpage for inactive images, so I can easily find these (low rated) inactive images, to manually delete them or reactivate them.

Temporarily I added this pathetic little code... because I can't really figure out the search codes...:

Quote
In admin.php add:

$lang['only_inactive_images'] = "Only show inactive images? Type 'yes' or leave empty";


Open 'images.php' (in admin dir) and find:

Quote
if ($action == "modifyimages") {
  show_form_header("images.php", "findimages", "form");
  show_table_header($lang['nav_images_edit'], 2);

Add below:

//auto-inactive mod
  show_input_row($lang['only_inactive_images'], "image_active", "", $textinput_size);
//end

Find:

if ($action == "findimages") {
  $condition = "1=1";

Add below:

  $image_active = trim($HTTP_POST_VARS['image_active']);
  if ($image_active == "yes") {
    $condition .= " AND i.image_active = '0'";
  }

When you go to edit images in the ACP in the top you'll see this field:

Only show inactive images? Type 'yes' or leave empty

If you type 'yes' it will show all inactive images... Modifying these images sucks...

SO, I would like a 'plugin' that only searches for inactive images, and shows the following in the search results:

Thumbnail  |  Image name  |  Rating (editable)   |  Votes (editable)  |  Validation option  |  DELETE option (delete image thumbnail comments etc...)

I'd be nice if you could also choose to view images in a 'certain' pixel size (like in V@no's checkimages mod)

If a plugin is not practical or possible adding an extra page under IMAGES in the acp will also do hahaha....

Can anybody help me out with this?

As soon as I have this search page I'll post the auto-inactivation mod.

cheers
« Last Edit: March 15, 2005, 03:20:38 PM by erikito »
Visit my gallery if you want to see the hottest chicks on the net.
No spam, no crap, it's just for fun ;)

Thanks for the great script and your help guys!

http://www.erikito.com/

Offline sweetmisery29f

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: Search for inactive images
« Reply #1 on: March 16, 2005, 07:05:25 PM »
This is the exact same Mod that I would need (see my post on March 13). I really hope that some smart guy out there helps with this. I need to be able to look for deactivated images and then get a list of them and the option to just click in the list to get them activate again.

I'm sooo looking forward to this, thanks!  :D

Sweet

Offline erikito

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • http://www.erikito.com/hotornot/
Re: Search for inactive images
« Reply #2 on: March 16, 2005, 08:03:52 PM »
I thought of a cheap little way to search for only deactivated images in edit images in the acp: :lol:

Open 'images.php' (in admin dir) and find:

Quote
if ($action == "modifyimages") {
  show_form_header("images.php", "findimages", "form");
  show_table_header($lang['nav_images_edit'], 2);

Add below:

Quote
//find inactive mod
  show_input_row($lang['only_inactive_images'], "image_active", "", $textinput_size);
//end

Find:

Quote
if ($action == "findimages") {
  $condition = "1=1";

Add below:

Quote
//find inactive mod
  $image_active = trim($HTTP_POST_VARS['image_active']);
  if ($image_active == "yes") {
    $condition .= " AND i.image_active = '0'";
  }
//end

Open admin/'admin.php' and below:

Quote
//-----------------------------------------------------
//--- Images ------------------------------------------
//-----------------------------------------------------

Add anywhere:

Quote
//find inactive mod
$lang['only_inactive_images'] = "Only show inactive images? Type 'yes' or leave empty";
//end

................................

Now go to 'edit images' in the ACP.... In the top you will find my magic field... enter 'yes'... and only inactive images will show up. If you enter nothing, the search engine will work as usual (not finding inactive images if I recall correctly)

Editing the pictures is still some trouble but hell.... at least you can find them!
 :wink:

As soon as I get some more time, and I know a little more... I'll work on something better... in the mean time, I hope it's usefull.

greets!


Visit my gallery if you want to see the hottest chicks on the net.
No spam, no crap, it's just for fun ;)

Thanks for the great script and your help guys!

http://www.erikito.com/

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Search for inactive images
« Reply #3 on: March 16, 2005, 11:40:58 PM »
actualy it was long time included in "Batch copy/move/edit images" mod:
http://www.4homepages.de/forum/index.php?topic=6759.0
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline erikito

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
    • http://www.erikito.com/hotornot/
Re: Search for inactive images
« Reply #4 on: March 17, 2005, 02:06:54 AM »
jippy! thx. Now I have a sweet piece of code to learn from and to play with... so that's how you get a damn radiobutton to work hahahaha...

I'm going to try to modify it a little to my needs.

And v@no slow down so I can show off a little hehehehe  :lol: :wink:

grtz! :wink:
Visit my gallery if you want to see the hottest chicks on the net.
No spam, no crap, it's just for fun ;)

Thanks for the great script and your help guys!

http://www.erikito.com/