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...:
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:
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 emptyIf 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