Author Topic: Include thumbnail pictures in another .php or .shtml page  (Read 5176 times)

0 Members and 1 Guest are viewing this topic.

Offline goyo

  • Newbie
  • *
  • Posts: 18
    • View Profile
Include thumbnail pictures in another .php or .shtml page
« on: May 09, 2002, 09:34:42 AM »
It is possible to ssi or php include, the random thumbnail picture box in a different page on the same server ?

I know it's not easy...any help appreciated...

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Include thumbnail pictures in another .php or .shtml page
« Reply #1 on: May 09, 2002, 09:45:12 AM »
In your php file add this at the top (before any HTML output):
Code: [Select]
<?php 
define
&#40;'ROOT_PATH', './'&#41;;
include&#40;ROOT_PATH.'global.php'&#41;; 
$random_image $site_template->clean_template&#40;get_random_image&#40;&#41;&#41;; 
?>


Define ROOT_PATH as relativ path to the directory 4images is installed in.

Then you can show the random image where you want with:
Code: [Select]
<?php 
echo $random_image
?>


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

Offline goyo

  • Newbie
  • *
  • Posts: 18
    • View Profile
Thank You!
« Reply #2 on: May 09, 2002, 11:33:22 PM »
I will try right away   :D