1
Check the new Tutorial subforum with helpfull guides and tutorials for modifications and tweaks.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Quote from: soopafly134Could someone at least confirm that the installation process I explained above it correct?
Could it be because my host is running PHP 4.1?
Anyone??
Open index.php
findCode: [Select]$num_new_images = $config['image_cells'];
change toCode: [Select]$num_new_images = X;
where X is number of new images u want to be displayed.
also u can do this way:Code: [Select]$num_new_images = $config['image_cells'] * 2;
<TABLE height="47" cellSpacing=4 border=0>[/code]
<TBODY>
<TR vAlign=top>
<TD align=middle height="4">
<TABLE cellSpacing=0 cellPadding=0 border=0 height="1">
<TBODY>
<TR>
<TD align=middle height="70">
<P>
<FORM action={self} method=post target=_top>
<TABLE borderColor=#000000 cellSpacing=0 cellPadding=0 width=331>
<TBODY>
<TR vAlign=center>
<TD align=middle width="462">
<TABLE borderColor=#000000 cellSpacing=0 cellPadding=1 width="100%"
bgColor=#ffcc33 border=1>
<TBODY>
<TR vAlign=center>
<TD align=middle>
<TABLE width=254 border=0>
<TBODY>
<TR>
<TD align=middle colSpan=3 width="418"><font size="2"><b>Rate Me</b></font></TD></TR>
<TR>
<TD width="62"></TD>
<TD align=middle width="319">
<TABLE cellSpacing=0 cellPadding=0 width=147>
<TBODY>
<TR>
<TD width="70"><INPUT onclick=submit() type=radio value=1 name=1><FONT
size=1>1</FONT></TD>
<TD width="70"><INPUT onclick=submit() type=radio value=2 name=2><FONT
size=1>2</FONT></TD>
<TD width="70"><INPUT onclick=submit() type=radio value=3 name=3><FONT
size=1>3</FONT></TD>
<TD width="70"><INPUT onclick=submit() type=radio value=4 name=4><FONT
size=1>4</FONT></TD>
<TD width="25"><INPUT onclick=submit() type=radio value=5 name=5><FONT
size=1>5</FONT></TD>
</TR></TBODY></TABLE></TD>
<TD width="29"></TD></TR>
<TR>
<TD width="62"><FONT color=#006699 size=2><B>NOT</B></FONT></TD>
<TD align=middle width="319">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR height=5>
<TD bgColor=#f00000></TD></TR></TBODY></TABLE></TD>
<TD width="29"><FONT color=#cc3300 size=2><B>HOT</B></FONT></TD></TR>
</TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<input type="hidden" name="action" value="rateimage">
<input type="hidden" name="id" value="{image_id}"></FORM></P></TD></TR>
<TR>
<TD align=middle height="1">
<TABLE>
<TBODY>
<TR>
<TD></TD></TR></TBODY></TABLE> </TD></TR>
</TBODY></TABLE></TD></TR></TBODY></TABLE>
Take a look at the HTML source code of your page and check the image source.
Jan
<?php
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: random.php *
* Copyright: (C) 2002 Jan Sorgalla *
* Email: jan@4homepages.de *
* Web: http://www.4homepages.de *
* Scriptversion: 1.0 for 4images 1.6.1 *
* *
* Never released without support from: Nicky (http://www.nicky.net) *
* *
**************************************************************************
* *
* Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz- *
* bedingungen (http://www.4homepages.de/4images/lizenz.php) für *
* weitere Informationen. *
* --------------------------------------------------------------- *
* This script is NOT freeware! Please read the Copyright Notice *
* (http://www.4homepages.de/4images/lizenz_e.php) for further *
* information. *
* *
*************************************************************************/
// PATH to your 4images Gallery / PFAD zu Ihrer 4images Gallerie
define('ROOT_PATH', './members/gallery/');
include(ROOT_PATH.'config.php');
include(ROOT_PATH.'includes/db_mysql.php');
include(ROOT_PATH.'includes/constants.php');
$site_db = new Db($db_host, $db_user, $db_password, $db_name);
function is_remote($file_name) {
return (preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $file_name)) ? 1 : 0;
}
$sql = "SELECT COUNT(*) as total_images
FROM ".IMAGES_TABLE." a, ".CATEGORIES_TABLE." b
WHERE a.image_active=1
AND a.cat_id = b.cat_id
AND b.auth_viewcat=".AUTH_ALL."
AND b.auth_viewimage=".AUTH_ALL."
";
$row = $site_db->query_firstrow($sql);
$total_images = $row['total_images'];
mt_srand((double)microtime() * 1000000);
$number = ($total_images > 1) ? mt_rand(0, $total_images - 1) : 0;
$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments
FROM ".IMAGES_TABLE." a, ".CATEGORIES_TABLE." b
WHERE a.image_active=1
AND a.cat_id = b.cat_id
AND b.auth_viewcat=".AUTH_ALL."
AND b.auth_viewimage=".AUTH_ALL."
LIMIT $number, 1";
$row = $site_db->query_firstrow($sql);
$image_id = $row['image_id'];
$cat_id = $row['cat_id'];
$image_name = $row['image_name'];
$image_comments = $row['image_comments'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];
echo "<a href=\"".ROOT_PATH."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";
echo "<b>$image_name</b><br>\n";
echo "Comments: $image_comments<br>\n";
?>
<?php
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: random.php *
* Copyright: (C) 2002 Jan Sorgalla *
* Email: jan@4homepages.de *
* Web: http://www.4homepages.de *
* Scriptversion: 1.0 for 4images 1.6.1 *
* *
* Never released without support from: Nicky (http://www.nicky.net) *
* *
**************************************************************************
* *
* Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz- *
* bedingungen (http://www.4homepages.de/4images/lizenz.php) für *
* weitere Informationen. *
* --------------------------------------------------------------- *
* This script is NOT freeware! Please read the Copyright Notice *
* (http://www.4homepages.de/4images/lizenz_e.php) for further *
* information. *
* *
*************************************************************************/
// PATH to your 4images Gallery / PFAD zu Ihrer 4images Gallerie
define('ROOT_PATH', './members/gallery/');
include(ROOT_PATH.'config.php');
include(ROOT_PATH.'includes/db_mysql.php');
include(ROOT_PATH.'includes/constants.php');
$site_db = new Db($db_host, $db_user, $db_password, $db_name);
function is_remote($file_name) {
return (preg_match('#^https?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $file_name)) ? 1 : 0;
}
$sql = "SELECT COUNT(*) as total_images
FROM ".IMAGES_TABLE." a, ".CATEGORIES_TABLE." b
WHERE a.image_active=1
AND a.cat_id = b.cat_id
AND b.auth_viewcat=".AUTH_ALL."
AND b.auth_viewimage=".AUTH_ALL."
";
$row = $site_db->query_firstrow($sql);
$total_images = $row['total_images'];
mt_srand((double)microtime() * 1000000);
$number = ($total_images > 1) ? mt_rand(0, $total_images - 1) : 0;
$sql = "SELECT a.image_id, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.image_comments
FROM ".IMAGES_TABLE." a, ".CATEGORIES_TABLE." b
WHERE a.image_active=1
AND a.cat_id = b.cat_id
AND b.auth_viewcat=".AUTH_ALL."
AND b.auth_viewimage=".AUTH_ALL."
LIMIT $number, 1";
$row = $site_db->query_firstrow($sql);
$image_id = $row['image_id'];
$cat_id = $row['cat_id'];
$image_name = $row['image_name'];
$image_comments = $row['image_comments'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];
echo "<a href=\"".ROOT_PATH."details.php?image_id=$image_id\"><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br>\n";
echo "<b>$image_name</b><br>\n";
echo "Comments: $image_comments<br>\n";
?>
<html>
<?php require("/home/virtual/site1/fst/var/www/html/forums/main.php"); ?>
<body bgcolor="#DFDFDF" link="#66899C" alink="#FF0000" vlink="#66899C">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber12">
<tr>
<td width="100%">
<p align="center"> <?php require("/home/virtual/site1/fst/var/www/html/php/header.php"); ?></td>
</tr>
</table>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="93%" id="AutoNumber7" height="15">
<tr>
<td width="100%" height="1" background="http://www.torquespeed.net/forums/style_images/1/tile_back.gif">
<?php
echo bar(1);
?></td>
</tr>
</table>
</center>
</div>
<p style="margin-top: 0; margin-bottom: 0" align="center">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="93%" id="AutoNumber1" height="30">
<tr>
<td width="100%" height="30">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="AutoNumber19">
<tr>
<td width="100%">
<p align="center"> <?php require("./random.php"); ?><img src="<?php echo $thumb_src; ?>" border="1"></td>
</tr>
<tr>
<td width="100%"> </td>
</tr>
</table>
</center>
</div>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber10" height="25">
<tr>
<td width="100%" height="25" background="http://www.torquespeed.net/forums/style_images/1/tile_back.gif"> <img border="0" src="http://www.torquespeed.net/forums/style_images/1/nav_m.gif" width="8" height="8">
<font color="#FFFFFF" face="Tahoma">Home</font></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="14" style="border-left-style: solid; border-left-width: 1; border-right-style: solid; border-right-width: 1">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#FFFFFF" width="100%" id="AutoNumber14">
<tr>
<td width="50%" bordercolor="#FFFFFF">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber15">
<tr>
<td width="100%"> <?php
echo news(7,2,0,500);
?></td>
</tr>
</table>
</td>
<td width="50%" bordercolor="#FFFFFF">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber16">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber17">
<tr>
<td width="100%" background="http://www.torquespeed.net/forums/style_images/1/tile_sub.gif">
<p align="center">Top 12 Topics</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber18">
<tr>
<td width="2%" bgcolor="#FFFFFF"> </td>
<td width="98%" bgcolor="#FFFFFF"> <?php
echo posts_x(12);
?></td>
</tr>
<tr>
<td width="2%" bgcolor="#FFFFFF"> </td>
<td width="98%" bgcolor="#FFFFFF"> </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" height="14" bgcolor="#9FB3D0">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber11">
<tr>
<td width="50%"> </td>
<td width="50%">
<p align="right"> </td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
<p style="margin-top: 0; margin-bottom: 0"> </p>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber13">
<tr>
<td width="100%">
<p align="center"><?php require("/home/virtual/site1/fst/var/www/html/php/footer.php"); ?></td>
</tr>
<tr>
<td width="100%"> </td>
</tr>
</table>
hmmm....did u copy/past my code?
make sure it's ../ not ./
let me explain what is the differenece between those two.
if u have your gallery as www.yoursite.com/members/gallery/
and then u put your random.php into www.yoursite.com/test/random.php
then u must change ROOT_PATH to ../members/gallery/
if u put as ./members/gallery/ the server will trying find your path as www.yoursite.com/test/members/gallery/
" ../ " means, server will look one directory behind it was called from.
" ./ " means, server will look from the same directory it was called from.
so, again. as many dirrectories are bihind your random.php (/test/proba/random/pictures/random.php ) as many ../../../../ u must put to make sure server look from the root.
hope this can help.
so, if u run your random.php from the root, change to this: ./members/gallery/
if u run from /test/random.php - to this: ../members/gallery/