1
Discussion & Troubleshooting / Re: can't upload images, no error message
« on: September 19, 2006, 04:32:35 PM »
thanks V@no, that was it!
You're looking for some 4images templates and styles? Then visit this thread to show websites with 4images templates to download.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
$year_default = 2003;
$year_now = date("Y", time());
$year_start = (isset($HTTP_POST_VARS['year_start']) ) ? intval($HTTP_POST_VARS['year_start']) : ((isset($HTTP_GET_VARS['year_start'])) ? intval($HTTP_GET_VARS['year_start']) : $year_default);
$year_end = (isset($HTTP_POST_VARS['year_end']) ) ? intval($HTTP_POST_VARS['year_end']) : ((isset($HTTP_GET_VARS['year_end'])) ? intval($HTTP_GET_VARS['year_end']) : $year_now);
$month_start = (isset($HTTP_POST_VARS['month_start']) ) ? intval($HTTP_POST_VARS['month_start']) : ((isset($HTTP_GET_VARS['month_start'])) ? intval($HTTP_GET_VARS['month_start']) : 1);
$month_end = (isset($HTTP_POST_VARS['month_end']) ) ? intval($HTTP_POST_VARS['month_end']) : ((isset($HTTP_GET_VARS['month_end'])) ? intval($HTTP_GET_VARS['month_end']) : date("n", time()));
$day_start = (isset($HTTP_POST_VARS['day_start']) ) ? intval($HTTP_POST_VARS['day_start']) : ((isset($HTTP_GET_VARS['day_start'])) ? intval($HTTP_GET_VARS['day_start']) : 1);
$day_end = (isset($HTTP_POST_VARS['day_end']) ) ? intval($HTTP_POST_VARS['day_end']) : ((isset($HTTP_GET_VARS['day_end'])) ? intval($HTTP_GET_VARS['day_end']) : date("j", time()));
$date_start = $year_start."-".$month_start."-".$day_start;
$date_end = $year_end."-".$month_end."-".$day_end;
$sql = "SELECT m.image_id, i.image_date
FROM ".WORDLIST_TABLE." w, ".WORDMATCH_TABLE." m
LEFT JOIN ".IMAGES_TABLE." i ON (m.image_id = i.image_id)
WHERE w.word_text LIKE '".addslashes(str_replace("*", "%", $split_words[$i]))."'
AND m.word_id = w.word_id AND i.image_date >= UNIX_TIMESTAMP('".$date_start."') AND i.image_date <= UNIX_TIMESTAMP('".$date_end."')
$match_field_sql";
$site_template->register_vars(array(
"search_keywords" => stripslashes($org_search_keywords),
"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'],
$sql = "SELECT m.image_id, i.image_date
FROM ".WORDLIST_TABLE." w, ".WORDMATCH_TABLE." m
LEFT JOIN ".IMAGES_TABLE." i ON (m.image_id = i.image_id)
WHERE w.word_text LIKE '".addslashes(str_replace("*", "%", $split_words[$i]))."'
AND m.word_id = w.word_id AND i.image_date >= UNIX_TIMESTAMP('".$date_start."') AND i.image_date < UNIX_TIMESTAMP('".$date_end."')
$match_field_sql";
AND m.word_id = w.word_id AND i.image_date > UNIX_TIMESTAMP('".$date_start."') AND i.image_date < UNIX_TIMESTAMP('".$date_end."')
AND m.word_id = w.word_id AND i.image_date > UNIX_TIMESTAMP('".$date_start."') AND i.image_date <= UNIX_TIMESTAMP('".$date_end."')
AND i.image_date <= UNIX_TIMESTAMP
$lang['mini_top_title'] = "As Mais Populares";
$lang['mini_top_hits'] = "Mais vista";
$lang['mini_top_rating'] = "Melhor votação";
$lang['mini_top_downloads'] = "Mais downloads";
$lang['mini_top_comments'] = "Mais comentada";
$lang['mini_top_votes'] = "Mais votada";
what about a date searchable field?
something like this:
eg:
search images since {start_counting} until {end_couting}
this would be cool to search all images submitted in a specific month or week, for example. Admin Control Panel has that option, but registed users don't, and i think it's a good think to have