Author Topic: No Thumbnails if from a selected category  (Read 5105 times)

0 Members and 1 Guest are viewing this topic.

Offline Washi

  • Newbie
  • *
  • Posts: 21
    • View Profile
No Thumbnails if from a selected category
« on: September 16, 2005, 03:44:59 PM »
Ok, I hope I'm in the right forum for this. If I'm not, I'm sorry.

I'm having a very weird problem. On one part of my gallery, I host LJ icons, which are 100x100 pixels big. I used the different categories templates and the different thumbnails_bit mods to make it only list the icons, without opening a new details page everytime, just a straight-forward listing of the icons. Basically, I don't use the details.html for those icons.
Now, my problem is is there anyway to block images from that category to appear on the new images in index.php and on the New Images page. Or instead of them linking to the details page, to make them link to the category page, but only if they're from that category.
I hope I'm making sense, and thank you for any help/insight you can give me on this. :D

Offline Washi

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: No Thumbnails if from a selected category
« Reply #1 on: September 22, 2005, 02:04:07 PM »
Nothing? Anyone? Please?

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: No Thumbnails if from a selected category
« Reply #2 on: September 22, 2005, 02:50:46 PM »
If you are not planning to use details page for any of the images in that category, you can it this way:
in details.php find:
Code: [Select]
$random_cat_image = (defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == 0) ? "" : get_random_image($cat_id);Insert above:
Code: [Select]
if (in_array($cat_id, array(1,2,3,4,5,6,7)))
{
  header("Location: ".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$cat_id, "&"));
  exit;
}

update the array with list the categories IDs.

It will redirect any requests for details.php to the parent category where the image is.
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 Washi

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: No Thumbnails if from a selected category
« Reply #3 on: September 22, 2005, 03:20:33 PM »
Thanks so much V@no, as always, you rock. I'll go do that as soon as I finish this thingy I'm working on. :D

ETA: Works like a gem! Thanks again!