Author Topic: Archives of the photos  (Read 5952 times)

0 Members and 1 Guest are viewing this topic.

Offline Lesik

  • Newbie
  • *
  • Posts: 38
    • View Profile
Archives of the photos
« on: September 10, 2005, 02:45:17 PM »
We need a MOD an archives of the photos, that takes out the photos by the date of their entrance on the separate pages.
look: http://klick.kl.funpic.de/detail_list.php?sessionid=f805e6ec62f000b2ec49043107c0f1ac

mne nuzhen MOD kotoryi pokazhet vse foto na otdelnoi stranice po date ih postupleniy
-------------------------------------------------------------------------------------------------------------------------
Я решил эту проблему САМ. СПАСИБО ЧТО НИКТО НЕ ОТВЕТИЛ.  :evil:  (НА ЭТОМ САЙТЕ СУПЕР ПОДДЕРЖКА)
Может это и тупое решение проблемы но хоть как нибудь.
Если кому нибудь нужно вывести на отдельной странице все фотографии по дате поступления, сделайте следующее.

1. Сделайте дубль файла SEARCH.PHP и переименуйте его например в ALL_IMAGES.PHP

2. Найдите строчки:

  if (!empty($search_id['search_new_images']) && $search_id['search_new_images'] == 1) {
    $new_cutoff = time() - 60 * 60 * 24 * $config['new_cutoff'];
    $sql_where_query .= "AND i.image_date >= $new_cutoff ";
  }

И замените на:

//  if (!empty($search_id['search_new_images']) && $search_id['search_new_images'] == 1) {
//    $new_cutoff = time() - 60 * 60 * 24 * $config['new_cutoff'];
    $sql_where_query .= "AND i.image_date >= 0";
//  }

3. Замените в файле all_images.php все строчки search.php на all_images.php

4. В файле includes/page_header.php ПО СООТВЕТСТУЮЩИМ РАЗДЕЛАМ
Добавте следующе строчки:

  "url_all_images" => $site_sess->url(ROOT_PATH."all_images.php?search_new_images=1"),

и

   "lang_all_images" => $lang['all_images'],

ЗАБЫЛ. Найдите в all_images.php следующий кусок:

  $sql = "SELECT DISTINCT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
          FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
          LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
          WHERE i.image_active = 1
          $sql_where_query
          AND c.cat_id = i.cat_id AND i.cat_id IN ($cat_id_sql)
          ORDER BY ".$config['image_order']." ".$config['image_sort']."
          LIMIT $offset, $perpage";
  $result = $site_db->query($sql);

и замените на:

  $sql = "SELECT DISTINCT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
          FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
          LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
          WHERE i.image_active = 1
          $sql_where_query
          AND c.cat_id = i.cat_id AND i.cat_id IN ($cat_id_sql)
          ORDER BY i.image_date desc
          LIMIT $offset, $perpage";
  $result = $site_db->query($sql);

5. В шаблонах в файле home.html найтите сроки

     <a href="{url_top_images}"><b>{lang_top_images}</b></a>&nbsp;
     <a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;

и после них добавте строку:

    <a href="{url_all_images}"><b>{lang_all_images}</b></a>&nbsp;&nbsp;

6. Добавте в lang/...../main.php
   
    $lang['all_images'] = "По дате поступления";   


Все у Вас появилась возможность просматривать все фотографии по дате поступления.
Если кто нибудь найдет возможность сделать это как у Detlev ссылка (вверху этой темы), или сделать тоже самое только в виде календаря, напишите пожалуйста.

Lesik

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: Archives of the photos
« Reply #1 on: July 01, 2006, 09:44:35 PM »
We need a MOD an archives of the photos, that takes out the photos by the date of their entrance on the separate pages.
look: http://klick.kl.funpic.de/detail_list.php?sessionid=f805e6ec62f000b2ec49043107c0f1ac

mne nuzhen MOD kotoryi pokazhet vse foto na otdelnoi stranice po date ih postupleniy
-------------------------------------------------------------------------------------------------------------------------
Я решил эту проблему САМ. СПАСИБО ЧТО НИКТО НЕ ОТВЕТИЛ.  :evil:  (НА ЭТОМ САЙТЕ СУПЕР ПОДДЕРЖКА)
Может это и тупое решение проблемы но хоть как нибудь.
Если кому нибудь нужно вывести на отдельной странице все фотографии по дате поступления, сделайте следующее.

1. Сделайте дубль файла SEARCH.PHP и переименуйте его например в ALL_IMAGES.PHP

2. Найдите строчки:

  if (!empty($search_id['search_new_images']) && $search_id['search_new_images'] == 1) {
    $new_cutoff = time() - 60 * 60 * 24 * $config['new_cutoff'];
    $sql_where_query .= "AND i.image_date >= $new_cutoff ";
  }

И замените на:

//  if (!empty($search_id['search_new_images']) && $search_id['search_new_images'] == 1) {
//    $new_cutoff = time() - 60 * 60 * 24 * $config['new_cutoff'];
    $sql_where_query .= "AND i.image_date >= 0";
//  }

3. Замените в файле all_images.php все строчки search.php на all_images.php

4. В файле includes/page_header.php ПО СООТВЕТСТУЮЩИМ РАЗДЕЛАМ
Добавте следующе строчки:

  "url_all_images" => $site_sess->url(ROOT_PATH."all_images.php?search_new_images=1"),

и

   "lang_all_images" => $lang['all_images'],

ЗАБЫЛ. Найдите в all_images.php следующий кусок:

  $sql = "SELECT DISTINCT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
          FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
          LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
          WHERE i.image_active = 1
          $sql_where_query
          AND c.cat_id = i.cat_id AND i.cat_id IN ($cat_id_sql)
          ORDER BY ".$config['image_order']." ".$config['image_sort']."
          LIMIT $offset, $perpage";
  $result = $site_db->query($sql);

и замените на:

  $sql = "SELECT DISTINCT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
          FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
          LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
          WHERE i.image_active = 1
          $sql_where_query
          AND c.cat_id = i.cat_id AND i.cat_id IN ($cat_id_sql)
          ORDER BY i.image_date desc
          LIMIT $offset, $perpage";
  $result = $site_db->query($sql);

5. В шаблонах в файле home.html найтите сроки

     <a href="{url_top_images}"><b>{lang_top_images}</b></a>&nbsp;
     <a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;

и после них добавте строку:

    <a href="{url_all_images}"><b>{lang_all_images}</b></a>&nbsp;&nbsp;

6. Добавте в lang/...../main.php
   
    $lang['all_images'] = "По дате поступления";   


Все у Вас появилась возможность просматривать все фотографии по дате поступления.
Если кто нибудь найдет возможность сделать это как у Detlev ссылка (вверху этой темы), или сделать тоже самое только в виде календаря, напишите пожалуйста.

Lesik

In english ??

Offline masterred

  • Sr. Member
  • ****
  • Posts: 494
    • View Profile
Re: Archives of the photos
« Reply #2 on: January 31, 2008, 06:10:56 PM »
hi

As you can create an archive of photographs, that is not to eliminate them and to find photos rises above

thanks
Apache/2.2.21 (Win32)
PHP/5.3.5
Mysql Version: 5.5.19
4images Version: 1.7.?



Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Archives of the photos
« Reply #3 on: January 31, 2008, 06:28:41 PM »
... hui ...  8O ... there is a link to my website ...
... but it is not my MOD-description ...
... I can't read that hieroglyphics ... but I think the original language was maybe russian ...
... and why is there a evil devil ...  :evil:


@masterred
... sorry, but I also can't understand your statement ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline masterred

  • Sr. Member
  • ****
  • Posts: 494
    • View Profile
Re: Archives of the photos
« Reply #4 on: February 20, 2008, 10:57:47 PM »
... hui ...  8O ... there is a link to my website ...
... but it is not my MOD-description ...
... I can't read that hieroglyphics ... but I think the original language was maybe russian ...
... and why is there a evil devil ...  :evil:


@masterred
... sorry, but I also can't understand your statement ...


@mawenzi

It is possible to create file images, photographs rises in months and years passed by the subscribers.
Example:

Archive images
Images of the month of January 2007
Images of February 2007
Images of the month of April 2006
Images of the month of April 2004
etc.

thanks
Apache/2.2.21 (Win32)
PHP/5.3.5
Mysql Version: 5.5.19
4images Version: 1.7.?