Show Posts

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.


Topics - |!^ AnGeL ^!|

Pages: [1]
1
Mods & Plugins (Requests & Discussions) / Random image: any ideas???
« on: August 21, 2005, 09:30:25 PM »
Hi,

How can I add the user name in the Random image??

This is the code that I used:

Code: [Select]
<?php
define
('ROOT_PATH''./');
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)) ? 0;
}

$num_images 5;

$sql "SELECT a.image_id, a.image_date, a.cat_id, a.image_name, a.image_active, a.image_thumb_file
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."
ORDER BY a.image_date DESC
LIMIT 
$num_images";
$result $site_db->query($sql);

while (
$row $site_db->fetch_array($result)){
$image_id $row['image_id'];
$cat_id $row['cat_id'];
#$image_name = $row['image_name'];
$thumb_src = (is_remote($row['image_thumb_file'])) ? $row['image_thumb_file'] : ROOT_PATH.THUMB_DIR."/".$cat_id."/".$row['image_thumb_file'];


echo 
"<center><table><tr><td width=120 align=center><a href=\"".ROOT_PATH."details.php?image_id=$image_id\"><br/><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br></td><td class=main_td valign=top><b>$image_name</b></td></td></table></center>\n";
}
?>

I try to add this code

Code: [Select]
LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)

under this

Code: [Select]
FROM ".IMAGES_TABLE." a, ".CATEGORIES_TABLE." b

but it doesn't work

any ideas

2
Installation, Update & Configuration / two 4images use one table
« on: August 14, 2005, 08:49:34 PM »
Hi,

Thanks to 4homepages.de for the wonderful Image Gallery the 4images

I have this question:

I have in my site two 4images install in one database - the first one in this URL: www.xxxxxx.com/img and the other one is on this URL: www.xxxxxx.com/media - how I can join the usernames in the both of them for example if someone register in img he is already register in media automatic

In other way:

How can I make the both of them use one table for the users?

Regards
AnGeL

Pages: [1]