[2023-01-23] 4images 1.10 released
0 Members and 1 Guest are viewing this topic.
Hello!Thank you for this mod!Is there a way to include the choice "by hits", so the picture with the most hits will appear?Thanks!
case "by_hits" : $select_mode = "i.image_hits"; $select_mode2 = ", i.image_name ASC"; break;
define('POTD_SELECT_MODE', 'by_hits');
How do I keep the "404 File Not Found" icon from appearing when I am logged off? I have 4images set to not allow guests viewing rights at all. Only registered users can view pictures. When I am at the site as a guest, I get the "404 File Not Found" icon in the spot where the POTD is supposed to be. I would rather it be like the Random Image, and not show anything to when I am not logged in.
if ($user_info['user_level'] != GUEST) {
if ($user_info['user_level'] != GUEST) {$potd_image = (defined("SHOW_POTD_IMAGE") && SHOW_POTD_IMAGE == 0) ? "" : get_potd_image();$site_template->register_vars("potd_image", $potd_image);$site_template->register_vars(array("lang_potd_title" => $lang['potd_title']));switch (POTD_SELECT_MODE) { case "by_rating" : $site_template->register_vars(array("lang_potd_type" => $lang['potd_type_rating'])); break; case "by_votes" : $site_template->register_vars(array("lang_potd_type" => $lang['potd_type_votes'])); break; case "by_comments" : $site_template->register_vars(array("lang_potd_type" => $lang['potd_type_comments'])); break; case "by_downloads" : $site_template->register_vars(array("lang_potd_type" => $lang['potd_type_downloads'])); break; case "by_hits" : $site_template->register_vars(array("lang_potd_type" => $lang['potd_type_hits'])); break;}unset($potd_image); }
is it possible to make the photo of the day first choice the number of favorites (lightbox) ?
switch (POTD_SELECT_MODE) { case "by_rating" : $select_mode = "i.image_rating"; break; case "by_votes" : $select_mode = "i.image_votes"; break; case "by_comments" : $select_mode = "i.image_comments"; break; case "by_downloads" : $select_mode = "i.image_downloads"; break; case "by_hits" : $select_mode = "i.image_hits"; break;}
I dont think what i want is possible but I'll ask, Would there be a way to have it be by top hits of the day? like so it really would be the Pic of the day, otherwise In my galery, it will probably be Pic of the Daya EVERYDAY!
yeah... why not? Code: [Select]switch (POTD_SELECT_MODE) { case "by_rating" : $select_mode = "i.image_rating"; break; case "by_votes" : $select_mode = "i.image_votes"; break; case "by_comments" : $select_mode = "i.image_comments"; break; case "by_downloads" : $select_mode = "i.image_downloads"; break; case "by_hits" : $select_mode = "i.image_hits"; break;}don't forget to add lang strings...
case "by_hits" : $site_template->register_vars(array("lang_potd_type" => $lang['potd_type_hits'])); break;
and beside hits, is there any way that only shows the pic of the day for one day or as long as she's marked as "new"that would be greatthanks
WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND c.cat_id = i.cat_id
WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND c.cat_id = i.cat_id AND i.image_date >= ".(time() - 60 * 60 * 24 * $config['new_cutoff'])."