Author Topic: Hiding random image  (Read 4179 times)

0 Members and 1 Guest are viewing this topic.

Offline BevS97

  • Newbie
  • *
  • Posts: 28
    • View Profile
Hiding random image
« on: October 28, 2002, 01:07:09 PM »
I want to remove the random image from all the screens - I can see in all the templates some code which starts      {if random_image}  
if I remove that code, then I get the effect I want,  but I am wondering if I can set the  random_image variable somewhere to false,  so that the code is not run everywhere and I don't need to manually change all the templates?

Bev

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Edit the templates
« Reply #1 on: October 28, 2002, 03:33:30 PM »
Nope.  You have to remove them from the templates.  There is no on/off switch in the Admin control panel.

Offline BevS97

  • Newbie
  • *
  • Posts: 28
    • View Profile
Hiding random image
« Reply #2 on: October 28, 2002, 07:14:04 PM »
I have discovered an easier way than removing them from the templates.

look in includes/constant.php and there is some code

Quote
// If you have a lot of images in your database,
// the random image function could make your programm slow.
// Try first to set "SHOW_RANDOM_CAT_IMAGE" to 0.
define('SHOW_RANDOM_IMAGE', 1);
define('SHOW_RANDOM_CAT_IMAGE', 1);


I changed them both to 0, and the random images have gone from all screens.  Much easier than trying to find all the references to random in all the templates,  and easy to reinstate if I change my mind.

 Bev

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
Nice
« Reply #3 on: October 28, 2002, 08:02:03 PM »
Very good!  I wasn't aware of this.  Or at least I had forgotten about it.

Thanks for teaching me something new about 4images today.