cooper
Beginner


Joined: Nov 10, 2007 Posts: 3
|
Posted: Sat Nov 10, 2007 7:22 pm Post subject: PHPnuke block code |
|
|
I am using the following code to put a block on my PHPnuke site to show a random image and have it link to the gallery when I click on the picture:
<?php
/************************************************************************/
/* Filename: block-randompicgallery2.php */
/* Author: DJB31st */
/* E-mail: PHP@djb31st.co.uk */
/* Thanks to Fosters, VK, Red Bull and Sambuca */
/* Visit www.maxxd.com */
/************************************************************************/
$url = 'test.vettesofcoastalmaine.org/gallery2';//change to the full URL of your gallery 2 install without the http
$nuke = '1'; //set to 1 for code to act as a PHPnuke block, or 0 as a
stand alone page
if($nuke==1)
{
if (eregi("block-randomdavepic.php",$PHP_SELF)) {
Header("Location: ../index.php");
die();
}
}
$file = file("http://$url/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=title");
$content .= trim(substr($file[3],0,-4));
$content .= "\" target='_blank' >";
$content .= trim(substr($file[5],0,-3));
$content .= $file[6];
if($nuke==0)
echo $content;
?>
However, when I click on the picture nothing happens. How can I fix this? |
|