Author Topic: [Question] Keeping some categories out of the New Images  (Read 7086 times)

0 Members and 1 Guest are viewing this topic.

Offline Vraxor

  • Full Member
  • ***
  • Posts: 134
    • View Profile
    • http://tc-revolution.net
[Question] Keeping some categories out of the New Images
« on: December 16, 2002, 01:15:50 PM »
Hi all,

I have a question about the "new images" at the main page of 4images.

As I currently have a digital art site and one of the categories is Ecards.
Now would i like to upload many Ecards there, but I would not like to see them apear in the new images list. Is this possible?

Also am I thinking about creating a downloads category where users can upload there own files to share, but I don't want that to appear at the new images too, so is it possible to exclude some categories from the new images and if so could someone point me in the right direction.

I don't know if it has already been done by someone, but if someone could give me some help getting started, I know where to search and then I hope to be able to figure the rest out myself.

Cheers,
Vraxor

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
[Question] Keeping some categories out of the New Images
« Reply #1 on: December 16, 2002, 03:26:47 PM »
Best way is to set the date in the past while adding the images. Or you expand the sql query in index.php:
Code: [Select]
AND i.cat_id NOT IN (<cat_id1>, <cat_id2>)
Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Vraxor

  • Full Member
  • ***
  • Posts: 134
    • View Profile
    • http://tc-revolution.net
[Question] Keeping some categories out of the New Images
« Reply #2 on: December 16, 2002, 03:43:44 PM »
Ok Thanks Jan,

I will try this.

Offline migraul

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
    • http://www.frankenfoto.info
[Question] Keeping some categories out of the New Images
« Reply #3 on: March 19, 2003, 04:36:06 PM »
Quote from: Jan
Best way is to set the date in the past while adding the images. Or you expand the sql query in index.php:
Code: [Select]
AND i.cat_id NOT IN (<cat_id1>, <cat_id2>)
Jan


Hallo Jan, an welche Stelle muss dieser Code im SQL?

Danke im voraus!
Begeisterter 4image User der viel Spaß damit hat und auch Freunde dadurch gefunden hat in unserer COMMUNITY

Offline Neo1

  • Full Member
  • ***
  • Posts: 202
    • View Profile
    • http://www.terradreams.de/
[Question] Keeping some categories out of the New Images
« Reply #4 on: March 19, 2003, 09:37:00 PM »
Würde mich auch interessieren. Ich möchte nur neue Bilder aus einer Kategorie anzeigen lassen.....die anderen neuen Bilder sollen nicht auf dem Index erscheinen.

Offline migraul

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
    • http://www.frankenfoto.info
[Question] Keeping some categories out of the New Images
« Reply #5 on: March 19, 2003, 10:02:11 PM »
Quote from: Neo1
Würde mich auch interessieren. Ich möchte nur neue Bilder aus einer Kategorie anzeigen lassen.....die anderen neuen Bilder sollen nicht auf dem Index erscheinen.


Quote
$num_new_images = 8;
$sql = "SELECT 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").get_user_table_field(", u.", "user_homepage")."
        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 AND c.cat_id = i.cat_id AND i.cat_id IN
(".get_auth_cat_sql("auth_viewcat").")
    AND i.cat_id NOT IN (68,4,81)
Just look for something like this under the

//-----------------------------------------------------
//--- Show New Images ---------------------------------
//-----------------------------------------------------

Good Luck,
Vraxor


Dies habe ich vom Super freundlichen Vraxor bekommen, Hier nochmals dank an ihn!
Begeisterter 4image User der viel Spaß damit hat und auch Freunde dadurch gefunden hat in unserer COMMUNITY

Offline Neo1

  • Full Member
  • ***
  • Posts: 202
    • View Profile
    • http://www.terradreams.de/
[Question] Keeping some categories out of the New Images
« Reply #6 on: March 19, 2003, 10:38:21 PM »
Vielen Dank :)

Ich hab das auch in meine new_pics.php für die Startseite der Homepage eingebaut. Funktioniert wunderbar. Ich mußte nur
Code: [Select]
i.cat
gegen
Code: [Select]
a.cat
austauschen.