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.


Messages - |!^ AnGeL ^!|

Pages: [1]
1
Mods & Plugins (Requests & Discussions) / Re: Random image: any ideas???
« on: August 23, 2005, 05:34:09 AM »
Yes I follow it step by step

Thank you for help me

Now I have this problem with the image table

I want to put the images inside one square and scrolling it from up to down but the code multiplying it on the images

I add this code

Code: [Select]
echo "<marquee onmouseover='this.stop()' onmouseout='this.start()' scrollAmount='2' scrollDelay='6' direction='up' height='161' style='border: 1px solid #663300; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px; text-align:center' width='158'>\n";
Above this

Code: [Select]
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";
This is the code, can you see it

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 
"<marquee onmouseover='this.stop()' onmouseout='this.start()' scrollAmount='2' scrollDelay='6' direction='up' height='161' style='border: 1px solid #663300; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px; text-align:center' width='158'>\n";
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";
}
?>

2
Mods & Plugins (Requests & Discussions) / Re: Random image: any ideas???
« on: August 23, 2005, 01:15:28 AM »
Ok,

How can I make the images scrolling in this code?

I try to add this code

Code: [Select]
echo "<marquee onmouseover='this.stop()' onmouseout='this.start()' scrollAmount='2' scrollDelay='6' direction='up' height='161' style='border: 1px solid #663300; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px; text-align:center' width='158'>\n";
but it seems not a good looking

this is the full code with the scrolling

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 
"<marquee onmouseover='this.stop()' onmouseout='this.start()' scrollAmount='2' scrollDelay='6' direction='up' height='161' style='border: 1px solid #663300; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px; text-align:center' width='158'>\n";
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";
}
?>

any ideas??

3
Mods & Plugins (Requests & Discussions) / Re: Random image: any ideas???
« on: August 22, 2005, 02:39:19 AM »
Code: [Select]
<?php

define
('GET_CACHES'1);
define('ROOT_PATH''./');
define('GET_USER_ONLINE'1);
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');
$user_access get_permission();

$site_db = new Db($db_host$db_user$db_password$db_name);

$num_images 5;

$additional_sql "";
if (!empty(
$additional_image_fields)) {
  foreach ($additional_image_fields as $key => $val) {
    $additional_sql .= ", i.".$key;
  }
}

$sql "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.""user_name")."
        FROM "
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
        LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
        WHERE i.image_active = 1 AND i.cat_id = 
$cat_id AND c.cat_id = i.cat_id
        ORDER BY "
.$config['image_order']." ".$config['image_sort']."
        LIMIT 1"
;
$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'];


$user_table_tracking "";

$user_table_tracking .= "<center><table width=\"120\" cellpadding=\"0\" cellspacing=\"0\"><tr class=\"head2\"><td width=\"120\" align=\"center\" class=\"row2\"><a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_row['image_id'])."\"><br/><img src=\"".$thumb_src."\" border=\"0\" alt=\"$image_name\"></a><br></td><td class=\"main_td\" valign=\"top\"><b>".$row['image_name']."</b></td></td></table></center>\n";

$site_template->register_vars(array(
"user_table_tracking" => $user_table_tracking
));

unset (
$user_table_tracking);
}
?>

4
Mods & Plugins (Requests & Discussions) / Re: Random image: any ideas???
« on: August 22, 2005, 12:59:42 AM »
It still blank and I used {user_table_tracking} in the home.html and it not showing any thing

5
Mods & Plugins (Requests & Discussions) / Re: Random image: any ideas???
« on: August 22, 2005, 12:18:17 AM »
Now I have a blank page

6
Mods & Plugins (Requests & Discussions) / Re: Random image: any ideas???
« on: August 21, 2005, 11:27:58 PM »
DB Error: Bad SQL Query: SELECT a.image_id, a.image_date, a.cat_id, a.image_name, a.image_active, a.image_thumb_file, a.cat_name, u.user_name FROM 4images_images a, 4images_categories b LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE a.image_active=1 AND a.cat_id = b.cat_id AND b.auth_viewcat=0 AND b.auth_viewimage=0 ORDER BY a.image_date DESC LIMIT 5
Unknown column 'a.cat_name' in 'field list'

7
Mods & Plugins (Requests & Discussions) / Re: Random image: any ideas???
« on: August 21, 2005, 11:07:55 PM »
Fatal error: Cannot redeclare is_remote()

8
Mods & Plugins (Requests & Discussions) / Re: Random image: any ideas???
« on: August 21, 2005, 10:39:51 PM »
Thanks TheOracle for your reply

The error:

Fatal error: Call to undefined function: get_user_table_field()

I want to add the user name on this mod, the code shows only this
Code: [Select]
$sql = "SELECT a.image_id, a.image_date, a.cat_id, a.image_name, a.image_active, a.image_thumb_file

and I add this on the end of it

Code: [Select]
a.cat_name".get_user_table_field(", u.", "user_name")."

then I 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

all I want is like this:


image name: google
Added by: AnGeL ========>> I want to add this to the Random image that's all

simply like this

9
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

10
Installation, Update & Configuration / Re: two 4images use one table
« on: August 15, 2005, 03:45:02 AM »
Thanks

I have fixed my problem by my self

bye

11
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]