Author Topic: Suppressing MPG, MOV, AVI in new images  (Read 3026 times)

0 Members and 1 Guest are viewing this topic.

Offline bgmurphy

  • Full Member
  • ***
  • Posts: 113
    • View Profile
Suppressing MPG, MOV, AVI in new images
« on: July 04, 2003, 11:46:05 PM »
hey all -

which php file(s) contain the the coding for displaying new images and what would the coding be to suppress MPG, MOV, AVI when showing new images

all help is appreciated !!

thanx
bruce

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Suppressing MPG, MOV, AVI in new images
« Reply #1 on: July 05, 2003, 12:14:08 AM »
Don't know if it will work (untested):
Replace
Code: [Select]
$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")."
        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").")
        ORDER BY i.image_date DESC
        LIMIT $num_new_images";

with
Code: [Select]
$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")."
        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.image_media_file REGEXP '[^mpg|mov|avi]$'
        ORDER BY i.image_date DESC
        LIMIT $num_new_images";

in index.php

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search