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 - photopulse

Pages: [1]
1
Hi Chris

can you help me further, or is it to much work ? Please let me know.

Thank you
Jean-Luc

2
Chris,

thanx for the infos.

I replaced a part of the top.php file with the mod bellow (could not attached the top.php)

Code: [Select]
// Rating
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_thumb_file, i.image_rating, i.image_votes, c.cat_name, u.user_name
       FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c, ".USERS_TABLE." u
       WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND i.cat_id = c.cat_id AND i.user_id = u.user_id $cat_match_sql
       ORDER BY i.image_rating DESC, i.image_votes DESC
       LIMIT 20";
$result = $site_db->query($sql);
$top_list = array();
$i = 1;
while ($row = $site_db->fetch_array($result)) {
 $top_list[$i] = $row;
 $i++;
}
$site_db->free_result();

for ($i = 1; $i <= 20; $i++) {
 if (isset($top_list[$i])) {
   $register_array['image_rating_'.$i] = (check_permission("auth_viewimage", $top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" : htmlspecialchars($top_list[$i]['image_name']);
   $register_array['image_rating_openwindow_'.$i] = (check_permission("auth_viewimage", $top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" : htmlspecialchars($top_list[$i]['image_name']);
   $register_array['image_rating_user_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i]['user_id'])."\">".htmlspecialchars($top_list[$i]['user_name'])."</a>";
   $register_array['image_rating_cat_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i]['cat_id'])."\">".htmlspecialchars($top_list[$i]['cat_name'])."</a>";
   $register_array['image_rating_number_'.$i] = "<b>".$top_list[$i]['image_rating']."</b> (".$top_list[$i]['image_votes']." ".$lang['votes'].")";
   $register_array['image_rating_thumb_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\"><img src=\"data/thumbnails/".$top_list[$i]['cat_id']."/".$top_list[$i]['image_thumb_file']."\" width=\"48\" height=\"36\" border=\"0\" alt=\"\" />";
 }
 else {
   $register_array['image_rating_'.$i] = "--";
   $register_array['image_rating_user_'.$i] = "--";
   $register_array['image_rating_cat_'.$i] = "--";
   $register_array['image_rating_number_'.$i] = "--";
   $register_array['image_rating_thumb_'.$i] = "--";
 }
}

// Votes
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_thumb_file, i.image_rating, i.image_votes, c.cat_name, u.user_name
       FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c, ".USERS_TABLE." u
       WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND i.cat_id = c.cat_id AND i.user_id = u.user_id $cat_match_sql
       ORDER BY i.image_votes DESC, i.image_name ASC
       LIMIT 20";
$result = $site_db->query($sql);
$top_list = array();
$i = 1;
while ($row = $site_db->fetch_array($result)) {
 $top_list[$i] = $row;
 $i++;
}
$site_db->free_result();

for ($i = 1; $i <= 20; $i++) {
 if (isset($top_list[$i])) {
   $register_array['image_votes_'.$i] = (check_permission("auth_viewimage", $top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" : htmlspecialchars($top_list[$i]['image_name']);
   $register_array['image_votes_openwindow_'.$i] = (check_permission("auth_viewimage", $top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" : htmlspecialchars($top_list[$i]['image_name']);
   $register_array['image_votes_user_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i]['user_id'])."\">".htmlspecialchars($top_list[$i]['user_name'])."</a>";
   $register_array['image_votes_cat_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i]['cat_id'])."\">".htmlspecialchars($top_list[$i]['cat_name'])."</a>";
   $register_array['image_votes_number_'.$i] = "<b>".$top_list[$i]['image_rating']."</b> (".$top_list[$i]['image_votes']." ".$lang['votes'].")";
   $register_array['image_votes_thumb_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\"><img src=\"data/thumbnails/".$top_list[$i]['cat_id']."/".$top_list[$i]['image_thumb_file']."\" width=\"48\" height=\"36\" border=\"0\" alt=\"\" />";
 }
 else {
   $register_array['image_votes_'.$i] = "--";
   $register_array['image_votes_user_'.$i] = "--";
   $register_array['image_votes_cat_'.$i] = "--";
   $register_array['image_votes_number_'.$i] = "--";
   $register_array['image_votes_thumb_'.$i] = "--";
 }
}

// Hits
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_thumb_file, i.image_hits, c.cat_name, u.user_name
       FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c, ".USERS_TABLE." u
       WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND i.cat_id = c.cat_id AND i.user_id = u.user_id $cat_match_sql
       ORDER BY i.image_hits DESC, i.image_name ASC
       LIMIT 20";
$result = $site_db->query($sql);
$top_list = array();
$i = 1;
while ($row = $site_db->fetch_array($result)) {
 $top_list[$i] = $row;
 $i++;
}
$site_db->free_result();

for ($i = 1; $i <= 20; $i++) {
 if (isset($top_list[$i])) {
   $register_array['image_hits_'.$i] = (check_permission("auth_viewimage", $top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" : htmlspecialchars($top_list[$i]['image_name']);
   $register_array['image_hits_openwindow_'.$i] = (check_permission("auth_viewimage", $top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" : htmlspecialchars($top_list[$i]['image_name']);
   $register_array['image_hits_user_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i]['user_id'])."\">".htmlspecialchars($top_list[$i]['user_name'])."</a>";
   $register_array['image_hits_cat_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i]['cat_id'])."\">".htmlspecialchars($top_list[$i]['cat_name'])."</a>";
   $register_array['image_hits_number_'.$i] = "<b>".$top_list[$i]['image_hits']."</b>";
   $register_array['image_hits_thumb_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\"><img src=\"data/thumbnails/".$top_list[$i]['cat_id']."/".$top_list[$i]['image_thumb_file']."\" width=\"48\" height=\"36\" border=\"0\" alt=\"\" />";
 }
 else {
   $register_array['image_hits_'.$i] = "--";
   $register_array['image_hits_user_'.$i] = "--";
   $register_array['image_hits_cat_'.$i] = "--";
   $register_array['image_hits_number_'.$i] = "--";
   $register_array['image_hits_thumb_'.$i] = "--";
 }
}

// Downloads
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_thumb_file, i.image_downloads, c.cat_name, u.user_name
       FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c, ".USERS_TABLE." u
       WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND i.cat_id = c.cat_id AND i.user_id = u.user_id $cat_match_sql
       ORDER BY i.image_downloads DESC, i.image_name ASC
       LIMIT 20";
$result = $site_db->query($sql);
$top_list = array();
$i = 1;
while ($row = $site_db->fetch_array($result)) {
 $top_list[$i] = $row;
 $i++;
}
$site_db->free_result();

for ($i = 1; $i <= 20; $i++) {
 if (isset($top_list[$i])) {
   $register_array['image_downloads_'.$i] = (check_permission("auth_viewimage", $top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" : htmlspecialchars($top_list[$i]['image_name']);
   $register_array['image_downloads_openwindow_'.$i] = (check_permission("auth_viewimage", $top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" : htmlspecialchars($top_list[$i]['image_name']);
   $register_array['image_downloads_user_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i]['user_id'])."\">".htmlspecialchars($top_list[$i]['user_name'])."</a>";
   $register_array['image_downloads_cat_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i]['cat_id'])."\">".htmlspecialchars($top_list[$i]['cat_name'])."</a>";
   $register_array['image_downloads_number_'.$i] = "<b>".$top_list[$i]['image_downloads']."</b>";
   $register_array['image_downloads_thumb_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\"><img src=\"data/thumbnails/".$top_list[$i]['cat_id']."/".$top_list[$i]['image_thumb_file']."\" width=\"48\" height=\"36\" border=\"0\" alt=\"\" />";
 }
 else {
   $register_array['image_downloads_'.$i] = "--";
   $register_array['image_downloads_user_'.$i] = "--";
   $register_array['image_downloads_cat_'.$i] = "--";
   $register_array['image_downloads_number_'.$i] = "--";
   $register_array['image_downloads_thumb_'.$i] = "--";
 }
}

// Comments
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_comments, i.image_rating, i.image_thumb_file, i.image_votes, c.cat_name, u.user_name
       FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c, ".USERS_TABLE." u
       WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND i.cat_id = c.cat_id AND i.user_id = u.user_id $cat_match_sql
       ORDER BY i.image_comments DESC, i.image_votes DESC
       LIMIT 20";
$result = $site_db->query($sql);
$top_list = array();
$i = 1;
while ($row = $site_db->fetch_array($result)) {
 $top_list[$i] = $row;
 $i++;
}
$site_db->free_result();

for ($i = 1; $i <= 20; $i++) {
 if (isset($top_list[$i])) {
   $register_array['image_comments_'.$i] = (check_permission("auth_viewimage", $top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" : htmlspecialchars($top_list[$i]['image_name']);
   $register_array['image_comments_openwindow_'.$i] = (check_permission("auth_viewimage", $top_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".htmlspecialchars($top_list[$i]['image_name'])."</a>" : htmlspecialchars($top_list[$i]['image_name']);
   $register_array['image_comments_user_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$top_list[$i]['user_id'])."\">".htmlspecialchars($top_list[$i]['user_name'])."</a>";
   $register_array['image_comments_cat_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$top_list[$i]['cat_id'])."\">".htmlspecialchars($top_list[$i]['cat_name'])."</a>";
   $register_array['image_comments_number_'.$i] = "<b>".$top_list[$i]['image_comments']."</b>";
   $register_array['image_comments_thumb_'.$i] = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$top_list[$i]['image_id'])."\"><img src=\"data/thumbnails/".$top_list[$i]['cat_id']."/".$top_list[$i]['image_thumb_file']."\" width=\"48\" height=\"36\" border=\"0\" alt=\"\" />";


 }
 else {
   $register_array['image_comments_'.$i] = "--";
   $register_array['image_comments_user_'.$i] = "--";
   $register_array['image_comments_cat_'.$i] = "--";
   $register_array['image_comments_number_'.$i] = "--";
   $register_array['image_comments_thumb_'.$i] = "--";
 }
}

and deleted the line for rating, votes, download and comments in the top.html I just kept the hits part and adapted it to show 20 thumbnails ...

-------

For getting the message "only registered user can view the previews ..." and so on I modified the function.php file as describe before and also added at the end of the lang/deutsch/main.php this line :

Code: [Select]
$lang['members_only'] = "Nur registrierte Benutzer sind berechtigt die Vorschaubilder anzusehen. Sie haben die Mˆglichkeit sich kostenlos ¸ber die Registrierung anzumelden um Zugang zu den Vorschaubilder und weitere Funktionen zu erhalten.";
sincerly

Jean-Luc


3
Hi Chris

I am sorry I don't know further  :( I found the code and tried to copy it in the top.php file and to change some things but I really don't know what I am doing ... my knowledge is really to bad !
Can you help me further ? It's the last thing we have to find out before we buy the licenses ...
Thanx a lot
Jean-Luc

Here is the code of the function.php file :
Code: [Select]
function get_thumbnail_code($media_file_name, $thumb_file_name = "", $image_id, $cat_id, $image_name = "", $mode = "", $show_link = 1, $open_window = 0) {
 global $site_sess, $config, $lang;;

 if (!check_media_type($media_file_name)) {
   $thumb = "<img ".(($show_link) ? "" : "onClick=\"alert('".$lang['members_only']."');\"")."src=\"".ICON_PATH."/404.gif\" border=\"0\" alt=\"\" />";
 }
 else {
   if (!get_file_path($thumb_file_name, "thumb", $cat_id, 0, 0)) {
     $file_src = ICON_PATH."/".get_file_extension($media_file_name).".gif";
     $image_info = @getimagesize($dummy);
     $width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";
     $thumb = "<img src=\"".$file_src."\" ".(($show_link) ? "" : "onClick=\"alert('".$lang['members_only']."'); \"")."border=\"0\"".$width_height." alt=\"".$image_name."\" />";
   }
   else {
     $file_src = get_file_path($thumb_file_name, "thumb", $cat_id, 0, 1);
     $image_info = @getimagesize($file_src);
     $width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";
     $thumb = "<img src=\"".$file_src."\" ".(($show_link) ? "" : "onClick=\"alert('".$lang['members_only']."'); \"")."border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" />";
   }
 }

 if ($show_link) {
   if ($open_window) {
     $thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".$thumb."</a>";
   }
   else {
     $thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\">".$thumb."</a>";
   }
 }
 return $thumb;
}

4
Salut Chris

Thank you to put me on the way ... I will try ... PHP is quiet new to me ... but I go for it !!  :wink:
A la prochaine.

J-L

6
Hi,

We are testing and modifying for 3 weeks now. And we found almost every answers to our questions in this forum !!  :lol:

We still have a small problem with the top images page.

On our site only registered user can view the Previews (big images). If a guest clics on a thumbnail a message appears that only registered user can view the previews and so on...

We modified the top images pages that the thumbnails are showed in the top 20 list. And there is the Problem, we don't know how to have the same message when a guest clics on the thumbnails of the top images list. At the moment when a guest clics nothing happen.

here the link to our test site :

http://www.photopulse.ch then click up right on stock photography. To enter the protected area use username : stock and Pass : travel

If you need any php code for viewing tell me please.

Thank you for your help

sincerly

Jean-Luc

7
Hi Vincent

Yeaah ! it works !  :lol:

I modified the registers.php file with the mod (thanx also to V@no!!) from the topic you sent me above.
Really a great mod.

For us it was very important that the IPTC Keywords and the IPTC Description (that I changed into location) are reconized bei the search function of  4images. We removed the other IPTC text informations that are less important for us.

You can check our stock photography site (we are still testing, and want to buy both licenses at the end of the month) under

http://www.photopulse.ch then click up right on stock photography. To enter the protected area use username : stock and Pass : travel

the picture we imported with the IPTC infos is the first one (big.jpg) on the entrance page. Feal free to register to see the Preview with the IPTC-Infos.

Thank you
sincerly

Jean-Luc



8
Hi vincent

thanx a lot for the infos.
You meen that with this mod it is possible to use the IPTC-Keywords as search words ?

I visited your website and for example for this picture did you wrote the keywords manually or have they been automaticly generated throw the IPTC-Keywords ?
http://www.foto-kocher.com/details.php?image_id=1394

Thank you
Jean-Luc

9
Hello

We are photographers and we have about 3000 Pictures in which the IPTC-Informations are embeded.
Is there a way that the IPTC-Keywords and some IPTC-Informations are reconized from the search engine of 4images ?

I searched the forum but did not find an answer ...

I use a normal ftp tool to upload my pictures direct in the categories on the web-server and then use the fonction "check for new images" in the control panel to activate them.

Thank you for your help

Jean-Luc

10
Discussion & Troubleshooting / Re: Thumbnails? Where are they?
« on: April 27, 2005, 07:20:22 PM »

Your problem is due to norton internet security - check the "ad blocking" function !!!

J-L

11
OK thanx everybody

We will kick Symantec and see if they have a solution. If we find something out I will post it here later on

Jean-Luc

12
Hello

We tested the tool for now 2 weeks and everything is working fine but we still have a big problem.
some thumbnails does not appear on some machines due to norton internet security program !

On my machine everything is working well and on some other also but on some machines some of the thumbnails are missing ??? this is very strange and after some tests we find out that it has something to do with the norton internet security program and the "ad blocking" function. When this option is activated some of my thumbnails don't show up. we checked the settings of norton and could not find any strings in the the norton reference file that would explain why those thumbnails are blocked !!?

So we really don't know why some thumbs are showing up and other not ? even if they are exactly the same (rights, owner, jpg, ...) the only thing that is different are the name of the thumbs.

Here the link to the site : http://www.photopulse.ch/stock2  ... check gallery namibia

here a direct link to a thumbnail that appears : http://www.photopulse.ch/stock2/data/thumbnails/1/GD03-251-16.jpg

here a direct link to a thumbnail that does not appear : http://www.photopulse.ch/stock2/data/thumbnails/1/GD03-250-01.jpg

we wanted to buy the 2 licenses but before we have to resolve this problem.

Did somebody had the same problem ? can somebody help us ?

Thanx a lot
Jean-Luc


Pages: [1]