4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: erikito 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...:
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 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
-
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
-
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:
if ($action == "modifyimages") {
show_form_header("images.php", "findimages", "form");
show_table_header($lang['nav_images_edit'], 2);
Add below:
//find inactive mod
show_input_row($lang['only_inactive_images'], "image_active", "", $textinput_size);
//end
Find:
if ($action == "findimages") {
$condition = "1=1";
Add below:
//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:
//-----------------------------------------------------
//--- Images ------------------------------------------
//-----------------------------------------------------
Add anywhere:
//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!
-
actualy it was long time included in "Batch copy/move/edit images" mod:
http://www.4homepages.de/forum/index.php?topic=6759.0
-
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: