Author Topic: [MOD] Search between specifyed date  (Read 85883 times)

0 Members and 1 Guest are viewing this topic.

Offline RuthE

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Discover Kate Gallery
Re: [MOD] Search between specifyed date
« Reply #30 on: July 06, 2005, 04:30:59 PM »
yes, u are right, replace:
Code: [Select]
AND m.word_id = w.word_id AND i.image_date > UNIX_TIMESTAMP('".$date_start."') AND i.image_date < UNIX_TIMESTAMP('".$date_end."')with:
Code: [Select]
AND m.word_id = w.word_id AND i.image_date >= UNIX_TIMESTAMP('".$date_start."') AND i.image_date <= UNIX_TIMESTAMP('".$date_end."')

I think this is where I got the code that seems to be wrong.

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: [MOD] Search between specifyed date
« Reply #31 on: July 06, 2005, 11:58:40 PM »
there is no such thing in the original code, it possible was before, but I guess I've updated it with a different approach and u should not change anything in the original code unless u have a problem (thats actualy applyed to anything u do)
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 RuthE

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Discover Kate Gallery
Re: [MOD] Search between specifyed date
« Reply #32 on: July 12, 2005, 08:32:25 PM »
I feel like an idiot, well, sort of. I was hoping this mod would allow users to see all images added between certain dates, but it doesn't seem to work without a search phrase. Is there a way to make it work without anying in the search box?

Kind of like the edit images works in the admin panel, which simply searches by whichever field (or fields) is filled.

Offline dosensteck

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: [MOD] Search between specifyed date
« Reply #33 on: July 19, 2005, 08:51:24 PM »
i  try to edit the search form now past 2 days...  i dont get it :(

what i want are buttons for the months. push on the button march search images from 1st march to 31th march. i hope anyone can help me with this? :)

ps: sorry for my bad english  :(


Offline Bear

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Re: [MOD] Search between specifyed date
« Reply #34 on: October 01, 2005, 08:17:18 PM »
great mod
thank you

Offline venator

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: [MOD] Search between specifyed date
« Reply #35 on: October 30, 2005, 04:31:25 PM »
hm... how work search.... i uderstand logiсk of serch... please tell me about search logick (если по русски будет вообще чудесно.)

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: [MOD] Search between specifyed date
« Reply #36 on: October 30, 2005, 04:39:53 PM »
hm... how work search.... i uderstand logiсk of serch... please tell me about search logick (если по русски будет вообще чудесно.)
Не понял вопроса...
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 venator

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: [MOD] Search between specifyed date
« Reply #37 on: October 30, 2005, 04:57:34 PM »
Quote
Не понял вопроса...
plz see PM...

Offline wallpapers

  • Full Member
  • ***
  • Posts: 107
    • View Profile
    • Tuned-Cars.Net
Re: [MOD] Search between specifyed date
« Reply #38 on: March 10, 2006, 06:41:34 AM »
Easy al always :D
great mod :lol:
thanks 8)



Offline Zyga

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: [MOD] Search between specifyed date
« Reply #39 on: May 09, 2006, 11:47:26 PM »
I feel like an idiot, well, sort of. I was hoping this mod would allow users to see all images added between certain dates, but it doesn't seem to work without a search phrase. Is there a way to make it work without anying in the search box?

Kind of like the edit images works in the admin panel, which simply searches by whichever field (or fields) is filled.

good sollution could be something like "show all" check box
just select date click on checkbox and....
U see all images added between yyyy-mm-dd and yyyy-mm-dd

Offline awf

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: [MOD] Search between specifyed date
« Reply #40 on: July 28, 2006, 10:49:53 PM »
странно, но в 1.7.2, если искать фотки допустим за месяц, то в результате выдаются все (за всё время существования галереи) фотки... может я чего-то не так делаю.... надеюсь на помощь.
Спасибо

Offline ccsakuweb

  • Sr. Member
  • ****
  • Posts: 498
  • Patri
    • View Profile
    • My Art
Re: [MOD] Search between specifyed date
« Reply #41 on: September 28, 2006, 05:21:28 PM »
hi! i installed this mod in my gallery 1.7.3 i had to modified some code from search.php because is different than your search version. This mod works correctly but now the comodin * doesn't works then i can't see all images from a day, i need to know some keyword from the images

And there is a change in 1.7.3 version, My code with this mod is:

Code: [Select]
function date_select($start, $end, $now, $text_array = ""){
   $options = "";
   $start = ($start) ? $start : $start + 1;
   for ($i = $start; $i <= $end; $i++){
     $select = ($i == $now) ? " selected" : "";
     $options .= "<option value=\"".$i."\"".$select.">".(($text_array) ? $text_array[$i - 1] : $i)."</option>";
   }
   return $options;
 }

 $site_template->register_vars(array(
   "search_keywords" => format_text(stripslashes($org_search_keywords), 2),
   "year_start" => date_select($year_default, $year_now, $year_start),
   "year_end" => date_select($year_default, $year_now, $year_end),
   "month_start" => date_select(1, 12, $month_start, $lang['month_array']),
   "month_end" => date_select(1, 12, $month_end, $lang['month_array']),
   "day_start" => date_select(1, 31, $day_start),
   "day_end" => date_select(1, 31, $day_end),
   "lang_search_date" => $lang['search_date'],
   "lang_search_date_start" => $lang['search_start'],
   "lang_search_date_end" => $lang['search_end'],   
    "search_user" => format_text(stripslashes($org_search_user), 2),
    "lang_search_by_keyword" => $lang['search_by_keyword'],
    "lang_search_by_username" => $lang['search_by_username'],
    "lang_new_images_only" => $lang['new_images_only'],
    "lang_search_terms" => $lang['search_terms'],
    "lang_or" => $lang['or'],
    "lang_and" => $lang['and'],

Code: [Select]
   "search_keywords" => format_text(stripslashes($org_search_keywords), 2), this line is different than your line
Code: [Select]
   "search_keywords" => htmlspecialchars(stripslashes($org_search_keywords)),
please i need to search with * could you help me?
:arrow: 4images Paid Mods: Links, Blog, Albums, Subdomains for users, Diferent templates for user profile, Related picture in details, Last pictures in details.
And the mod that you request me.   Demo: http://www.myart.es

A website dedicated to artist people who loves drawing, design, writing and more

Offline dplmartin

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: [MOD] Search between specifyed date
« Reply #42 on: December 05, 2008, 10:23:28 AM »
Did anyone ever figure out how this mod could be changed so that it does not require any keyword or just one * to show all images between set dates?

Dominic

Offline Peter Lehner

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: [MOD] Search between specifyed date
« Reply #43 on: March 10, 2019, 10:58:12 AM »
Mit der Version 1.8 funktioniert die MOD für Datumsuche nicht, Basis hat sich zu stark verändert.

With the version 4images 1.8 does not work the MOD for the date search, the base code has changed too much.