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

Pages: [1]
1
Mods & Plugins (Requests & Discussions) / Postcard Modification
« on: January 10, 2003, 02:48:46 PM »
Thanks Jan

You're the man...

By the way, how can I inform myself about licenses.

I believe a good product with excellent support deserves support from the people who use it.

Jose

P.S: Do you like Handball, Volleyball or Football? I'm a professional photographer who usually covers all the major events taking place in Portugal and some even abroad. Germany will face Portugal in the Weltmeisterschaft in Handball. Maybe i can send you some photos... :) Just my way of saying... Thank you

2
Mods & Plugins (Requests & Discussions) / Postcard Modification
« on: January 10, 2003, 01:38:55 PM »
Hi Jan:

Thank you so much for your effort.

Could you please explain what you changed?

Jose

3
Mods & Plugins (Requests & Discussions) / Postcard Modification
« on: January 09, 2003, 03:51:15 PM »
So Jan.... Any Luck???

Jose

4
Mods & Plugins (Requests & Discussions) / Postcard Modification
« on: January 08, 2003, 07:23:47 PM »
Sure Jan, but i'll email it, so that i can give you a username / password that has all the permissions.

Jose

Sorry for the looks of it, but it is still in early development

5
Mods & Plugins (Requests & Discussions) / Postcard Modification
« on: January 08, 2003, 06:45:35 PM »
Hello everybody:

I have a problem concerning postcards.

I want the postcard to have not the original image, but the thumbnail.

I've changed all the post*.html and replaced {image} with {thumbnail}.

In both postcard create and preview, this works perfectly, but in the postcard send, instead of the thumbnail, it places the following link

Code: [Select]

<a href="./details.php?image_id=0&amp;sessionid=0770f1920d52d714fa37a122c861e9af"><img src="./templates/4waters/icons/jpg.gif" border="0" alt="02004151" /></a>


So, as you can see the image_id=0, and of course the no thumbnail image is loaded instead. That 02004151 is the name of the image.

Please help.

And, if possible Jan, tell me why does this happen only with postcard_send and not the other postcard*.html

Thanks

Jose

6
You're Welcome, Chris.

I'm also expecting to release a portuguese translation for 4images.

Not Brazilian Portuguese, but Portuguese from Portugal.

This was done based on previous work from André Amaral.

I also managed to integrate a freeware shopping cart, based on JavaScript, very easy to integrate with 4images.

However this is not perfect yet. When it is, I'll post the solution in the forum.

Cheers

Jose

7
Mods & Plugins (Requests & Discussions) / Here it is.
« on: January 05, 2003, 11:52:29 AM »
Hi Chris:

Here's what I did.

I basically got the information from the image file and put it directly in the text area reserved for user input of description and keywords.

Here's the code:

Code: [Select]

<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File&#58; checkimages.php                                      *
 *        Copyright&#58; &#40;C&#41; 2002 Jan Sorgalla                                *
 *            Email&#58; jan@4homepages.de                                    *
 *              Web&#58; http&#58;//www.4homepages.de                             *
 *    Scriptversion&#58; 1.7                                                  *
 *                                                                        *
 *    Never released without support from&#58; Nicky &#40;http&#58;//www.nicky.net&#41;   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen &#40;Lizenz.txt&#41; für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    &#40;Licence.txt&#41; for further information.                              *
 *                                                                        *
 *************************************************************************/

define&#40;'IN_CP', 1&#41;;
define&#40;'ROOT_PATH', './../'&#41;;
require&#40;'admin_global.php'&#41;;

include&#40;ROOT_PATH.'includes/search_utils.php'&#41;;

if &#40;$action == ""&#41; &#123;
  
$action "checkimages";
&
#125;

show_admin_header&#40;&#41;;

if &#40;$action == "savenewimages"&#41; &#123;
  
@include&#40;ROOT_PATH."includes/db_field_definitions.php"&#41;;

  
$date time&#40;&#41;;
  
$error = array&#40;&#41;;
  
$num_newimages $HTTP_POST_VARS['num_newimages'&#93;;
  
$detailed $HTTP_POST_VARS['detailed'&#93;;

  
for &#40;$i = 1; $i <= $num_newimages; $i++&#41; &#123;
    
$addimage = &#40;isset&#40;$HTTP_POST_VARS['addimage_'.$i&#93;&#41; && $HTTP_POST_VARS['addimage_'.$i&#93; == 1&#41; ? 1 &#58; 0;
    
if &#40;$addimage&#41; &#123;
      
$image_name trim&#40;$HTTP_POST_VARS['image_name_'.$i&#93;&#41;;
      
$cat_id intval&#40;$HTTP_POST_VARS['cat_id_'.$i&#93;&#41;;
      
$image_download_url = &#40;isset&#40;$HTTP_POST_VARS['image_download_url_'.$i&#93;&#41;&#41; ? trim&#40;$HTTP_POST_VARS['image_download_url_'.$i&#93;&#41; &#58; "";

      
if &#40;$image_name == ""&#41; &#123;
        
$error['image_name_'.$i&#93; = 1;
      
&#125;
      
if &#40;$cat_id == 0&#41; &#123;
        
$error['cat_id_'.$i&#93; = 1;
      
&#125;
      
if &#40;$image_download_url != "" && !is_remote&#40;$image_download_url&#41; && !is_local_file&#40;$image_download_url&#41;&#41; &#123;
        
$error['image_download_url_'.$i&#93; = 1;
      
&#125;

      
if &#40;!empty&#40;$additional_image_fields&#41;&#41; &#123;
        
foreach &#40;$additional_image_fields as $key => $val&#41; &#123;
          
if &#40;isset&#40;$HTTP_POST_VARS[$key.'_'.$i&#93;&#41; && intval&#40;$val[2&#93;&#41; == 1 && trim&#40;$HTTP_POST_VARS[$key.'_'.$i&#93;&#41; == ""&#41; &#123;
            
$error[$key.'_'.$i&#93; = 1;
          
&#125;
        
&#125;
      
&#125;
    
&#125;
  
&#125;
  
if &#40;empty&#40;$error&#41;&#41; &#123;
    
$log = array&#40;&#41;;
    
for &#40;$i = 1; $i <= $num_newimages; $i++&#41; &#123;
      
$addimage = &#40;isset&#40;$HTTP_POST_VARS['addimage_'.$i&#93;&#41; && $HTTP_POST_VARS['addimage_'.$i&#93; == 1&#41; ? 1 &#58; 0;
      
if &#40;$addimage&#41; &#123;
        
$image_media_file trim&#40;$HTTP_POST_VARS['image_media_file_'.$i&#93;&#41;;
        
$image_thumb_file trim&#40;$HTTP_POST_VARS['image_thumb_file_'.$i&#93;&#41;;
        
$image_name trim&#40;$HTTP_POST_VARS['image_name_'.$i&#93;&#41;;

        
$cat_id intval&#40;$HTTP_POST_VARS['cat_id_'.$i&#93;&#41;;
        
$old_cat_id intval&#40;$HTTP_POST_VARS['old_cat_id_'.$i&#93;&#41;;
        
        
$user_id = &#40;isset&#40;$HTTP_POST_VARS['user_id_'.$i&#93;&#41; && intval&#40;$HTTP_POST_VARS['user_id_'.$i&#93;&#41; != 0&#41; ? intval&#40;$HTTP_POST_VARS['user_id_'.$i&#93;&#41; &#58; $user_info['user_id'&#93;;

        
$image_description = &#40;isset&#40;$HTTP_POST_VARS['image_description_'.$i&#93;&#41;&#41; ? trim&#40;$HTTP_POST_VARS['image_description_'.$i&#93;&#41; &#58; "";
        
$image_date = &#40;!isset&#40;$HTTP_POST_VARS['image_date_'.$i&#93;&#41;&#41; ? time&#40;&#41; &#58; &#40;&#40;trim&#40;$HTTP_POST_VARS['image_date_'.$i&#93; != ""&#41;&#41; ? "UNIX_TIMESTAMP&#40;'".trim&#40;$HTTP_POST_VARS['image_date_'.$i&#93;&#41;."'&#41;" &#58; time&#40;&#41;&#41;;
        
$image_download_url = &#40;isset&#40;$HTTP_POST_VARS['image_download_url_'.$i&#93;&#41;&#41; ? trim&#40;$HTTP_POST_VARS['image_download_url_'.$i&#93;&#41; &#58; "";

        
if &#40;isset&#40;$HTTP_POST_VARS['image_keywords_'.$i&#93;&#41;&#41; &#123;
          
$image_keywords trim&#40;$HTTP_POST_VARS['image_keywords_'.$i&#93;&#41;;
          
$image_keywords preg_replace&#40;"/[\n\r&#93;/is", " ", $image_keywords&#41;;
          
$image_keywords str_replace&#40;","," ",$image_keywords&#41;;
          
$image_keywords ereg_replace&#40;"&#40; &#41;&#123;2,&#125;", " ", $image_keywords&#41;;
        
&#125;
        
else &#123;
          
$image_keywords "";
        &
#125;
        
$image_active intval&#40;$HTTP_POST_VARS['image_active_'.$i&#93;&#41;;
        
$image_allow_comments intval&#40;$HTTP_POST_VARS['image_allow_comments_'.$i&#93;&#41;;

        
$additional_field_sql "";
        
$additional_value_sql "";
        if &
#40;!empty&#40;$additional_image_fields&#41;&#41; &#123;
          
$table_fields $site_db->get_table_fields&#40;IMAGES_TABLE&#41;;
          
foreach &#40;$additional_image_fields as $key => $val&#41; &#123;
            
if &#40;isset&#40;$HTTP_POST_VARS[$key.'_'.$i&#93;&#41; && isset&#40;$table_fields[$key&#93;&#41;&#41; &#123;
              
$additional_field_sql .= ", $key";
              
$additional_value_sql .= ", '".un_htmlspecialchars&#40;trim&#40;$HTTP_POST_VARS[$key.'_'.$i&#93;&#41;&#41;."'";
            
&#125;
          
&#125;
        
&#125;

        
if &#40;$cat_id != $old_cat_id&#41; &#123;
          
$image_media_file copy_media&#40;$image_media_file, $old_cat_id, $cat_id&#41;;
          
$image_thumb_file copy_thumbnail&#40;$image_media_file, $image_thumb_file, $old_cat_id, $cat_id&#41;;
        
&#125;

        
$sql "INSERT INTO ".IMAGES_TABLE.
                &#40;cat_id, user_id, image_name, image_description, image_keywords, image_date, image_active, image_media_file, image_thumb_file, image_download_url, image_allow_comments"
.$additional_field_sql."&#41; 
                VALUES 
                &#40;
$cat_id$user_id, '$image_name', '$image_description', '$image_keywords', $image_date$image_active, '$image_media_file', '$image_thumb_file', '$image_download_url', $image_allow_comments".$additional_value_sql."&#41;";
        
$result $site_db->query&#40;$sql&#41;;
        
$image_id $site_db->get_insert_id&#40;&#41;;

        
if &#40;$result&#41; &#123;
          
$search_words = array&#40;&#41;;
          
foreach &#40;$search_match_fields as $image_column => $match_column&#41; &#123;
            
if &#40;isset&#40;$HTTP_POST_VARS[$image_column.'_'.$i&#93;&#41;&#41; &#123;
              
$search_words[$image_column&#93; = stripslashes&#40;$HTTP_POST_VARS[$image_column.'_'.$i&#93;&#41;;
            
&#125;
          
&#125;
          
add_searchwords&#40;$image_id, $search_words&#41;;
          
$log[&#93; = $lang['image_add_success'&#93;."&#58; <b>".stripslashes&#40;$image_name&#41;."</b> &#40;$image_media_file&#41;";
        
&#125;
        
else &#123;
          
$log[&#93; = $lang['image_add_error'&#93;."&#58; <b>$image_media_file</b>";
        
&#125;
      
&#125;
    
&#125;
    
show_table_header&#40;$lang['nav_images_check'&#93;, 1&#41;;
    
echo "<tr>\n<td class=\"tablerow\">\n";
    echo 
"<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\"><tr><td>&nbsp;</td><td>\n";
    if &
#40;!empty&#40;$log&#41;&#41; &#123;
      
foreach &#40;$log as $val&#41; &#123;
        
echo $val."<br />";
      &
#125;
    
&#125;
    
else &#123;
      
echo $lang['no_newimages_added'&#93;;
    
&#125;
    
echo "</td>\n</tr>\n</table>\n";
    echo 
"</td>\n</tr>\n";
    
show_table_footer&#40;&#41;;
  
&#125;
  
else &#123;
    
$msg sprintf&#40;"<span class=\"marktext\">%s</span>", $lang['lostfield_error'&#93;&#41;;
    
$action "checkimages";
  &
#125;
&#125;

if &#40;$action == "checkimages"&#41; &#123;
  
$cat_id = &#40;isset&#40;$HTTP_POST_VARS['cat_id'&#93;&#41;&#41; ? intval&#40;$HTTP_POST_VARS['cat_id'&#93;&#41; &#58; 0;
  
$detailed_checked = &#40;isset&#40;$HTTP_POST_VARS['detailed'&#93;&#41; && $HTTP_POST_VARS['detailed'&#93; == 1&#41; ? " checked=\"checked\"" &#58; "";
  
$num_newimages = &#40;isset&#40;$HTTP_POST_VARS['num_newimages'&#93;&#41;&#41; ? intval&#40;$HTTP_POST_VARS['num_newimages'&#93;&#41; &#58; 30;
  
if &#40;$num_newimages == "" || !$num_newimages&#41; &#123;
    
$num_newimages 30;
  &
#125;
  
show_form_header&#40;"checkimages.php", "checkimages"&#41;;
  
show_table_header&#40;$lang['nav_images_check'&#93;, 2&#41;;
  
$desc get_category_dropdown&#40;$cat_id, 0, 4&#41;;
  
$desc .= "&nbsp;&nbsp;&nbsp;&nbsp;".$lang['num_newimages_desc'&#93;."<input type=\"text\" name=\"num_newimages\" value=\"".$num_newimages."\" size=\"5\">";
  
$desc .= "&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"checkbox\" name=\"detailed\" value=\"1\"".$detailed_checked.">".$lang['detailed_version'&#93;;
  
show_custom_row&#40;$desc, "<input type=\"submit\" value=\"".$lang['nav_images_check'&#93;."\" class=\"button\">"&#41;;
  
show_table_footer&#40;&#41;;
  
echo "</form>";
&
#125;

if &#40;isset&#40;$HTTP_POST_VARS['action'&#93;&#41; && $action == "checkimages"&#41; &#123;
  
if &#40;isset&#40;$HTTP_POST_VARS['detailed'&#93;&#41; && $HTTP_POST_VARS['detailed'&#93; == 1&#41; &#123;
    
$detailed 1;
    
$colspan 2;
  &
#125;
  
else &#123;
    
$detailed 0;
    
$colspan 6;
  &
#125;

  
$cat_id = &#40;isset&#40;$HTTP_POST_VARS['cat_id'&#93;&#41;&#41; ? intval&#40;$HTTP_POST_VARS['cat_id'&#93;&#41; &#58; 0;
  
$cat_path = &#40;$cat_id == 0&#41; ? "" &#58; "/".$cat_id;

  
$handle opendir&#40;MEDIA_PATH.$cat_path&#41;;
  
$image_list_all = array&#40;&#41;;
  
while &#40;$file = @readdir&#40;$handle&#41;&#41; &#123;
    
if &#40;$file != "." && $file != ".."&#41; &#123;
      
if &#40;check_media_type&#40;$file&#41;&#41; &#123;
        
$image_list_all[&#93; = $file;
      
&#125;
    
&#125;
  
&#125;
  
sort&#40;$image_list_all&#41;;

  
$where_sql = &#40;$cat_id != 0&#41; ? "WHERE cat_id = $cat_id" &#58; "";
  
$sql "SELECT image_media_file 
          FROM "
.IMAGES_TABLE.
          
$where_sql 
          ORDER BY image_media_file"
;
  
$result $site_db->query&#40;$sql&#41;;

  
$image_list_sql = array&#40;&#41;;
  
while &#40;$row = $site_db->fetch_array&#40;$result&#41;&#41; &#123;
    
$image_list_sql[&#93; = $row['image_media_file'&#93;;
  
&#125;
  
sort&#40;$image_list_sql&#41;;

  
$image_list = array&#40;&#41;;
  
$image_counter 0;
  for &
#40;$i = 0; $i < count&#40;$image_list_all&#41;; $i++&#41; &#123;
    
if &#40;!in_array&#40;$image_list_all[$i&#93;, $image_list_sql&#41;&#41; &#123;
      
$image_list[&#93; = $image_list_all[$i&#93;;
      
$image_counter++;
    &
#125;
    
if &#40;$image_counter == $num_newimages&#41; &#123;
      
break;
    &
#125;
  
&#125;
  
sort&#40;$image_list&#41;;

  
$num_all_newimages sizeof&#40;$image_list&#41;;

  
if &#40;$num_newimages > $num_all_newimages&#41; &#123;
    
$num_newimages $num_all_newimages;
  &
#125;

  
if &#40;$msg != ""&#41; &#123;
    
printf&#40;"<b>%s</b>\n", $msg&#41;;
  
&#125;

  
printf &#40;"<p>%s</p>\n", preg_replace&#40;"/".$site_template->start."num_all_newimages".$site_template->end."/siU", $num_all_newimages, $lang['checkimages_note'&#93;&#41;&#41;;

  
show_form_header&#40;"checkimages.php", "savenewimages", "form"&#41;;
  
show_hidden_input&#40;"cat_id", $cat_id&#41;;
  
show_table_header&#40;$lang['nav_images_check'&#93;, $colspan&#41;;

  
if &#40;$num_all_newimages&#41; &#123;
    
show_description_row&#40;"<input name=\"allbox\" type=\"checkbox\" onClick=\"CheckAll&#40;&#41;;\" checked=\"checked\" /> <b>".$lang['check_all'&#93;."</b>", $colspan&#41;;
  
&#125;
  
else &#123;
    
show_description_row&#40;$lang['no_newimages'&#93;, $colspan&#41;;
  
&#125;

  
for &#40;$i = 1; $i <= $num_newimages; $i++&#41; &#123;
    //Check Image
    
$file_type get_file_extension&#40;$image_list[$i-1&#93;&#41;;
    
$image_name get_file_name&#40;$image_list[$i-1&#93;&#41;;

    
$thumb_file 0;
    if &
#40;file_exists&#40;THUMB_PATH.$cat_path."/".$image_name.".jpg"&#41;&#41; &#123;
      
$thumb_file $image_name.".jpg";
    &
#125;
    
elseif &#40;file_exists&#40;THUMB_PATH.$cat_path."/".$image_name.".JPG"&#41;&#41; &#123;
      
$thumb_file $image_name.".JPG";
    &
#125;
    
elseif &#40;file_exists&#40;THUMB_PATH.$cat_path."/".$image_name.".jpeg"&#41;&#41; &#123;
      
$thumb_file $image_name.".jpeg";
    &
#125;
    
elseif &#40;file_exists&#40;THUMB_PATH.$cat_path."/".$image_name.".JPEG"&#41;&#41; &#123;
      
$thumb_file $image_name.".JPEG";
    &
#125;
    
elseif &#40;file_exists&#40;THUMB_PATH.$cat_path."/".$image_name.".gif"&#41;&#41; &#123;
      
$thumb_file $image_name.".gif";
    &
#125;
    
elseif &#40;file_exists&#40;THUMB_PATH.$cat_path."/".$image_name.".GIF"&#41;&#41; &#123;
      
$thumb_file $image_name.".GIF";
    &
#125;
    
elseif &#40;file_exists&#40;THUMB_PATH.$cat_path."/".$image_name.".png"&#41;&#41; &#123;
      
$thumb_file $image_name.".png";
    &
#125;
    
elseif &#40;file_exists&#40;THUMB_PATH.$cat_path."/".$image_name.".PNG"&#41;&#41; &#123;
      
$thumb_file $image_name.".PNG";
    &
#125;

    
$checked = &#40;isset&#40;$HTTP_POST_VARS['image_name_'.$i&#93;&#41; && &#40;!isset&#40;$HTTP_POST_VARS['addimage_'.$i&#93;&#41; || $HTTP_POST_VARS['addimage_'.$i&#93; != 1&#41;&#41; ? "" &#58; " checked=\"checked\"";

    
if &#40;$detailed&#41; &#123;
      
show_table_separator&#40;"<input type=\"checkbox\" name=\"addimage_".$i."\" value=\"1\"".$checked." /> ".$image_list[$i-1&#93;, 2&#41;;
      
if &#40;$file_type == "gif" || $file_type == "jpg"  || $file_type == "png"&#41; &#123;
        
$file_src MEDIA_PATH.$cat_path."/".$image_list[$i-1&#93;;
        
show_image_row&#40;$lang['image'&#93;, $file_src, 1&#41;;
      
&#125;
      
else &#123;
        
show_image_row&#40;$lang['image'&#93;, ICON_PATH."/".$file_type.".gif", 1&#41;;
      
&#125;
      
show_hidden_input&#40;"image_media_file_".$i, $image_list[$i-1&#93;&#41;;

      
if &#40;$thumb_file&#41; &#123;
        
show_image_row&#40;$lang['thumb'&#93;, THUMB_PATH.$cat_path."/".$thumb_file, 1, "", 50&#41;;
        
show_hidden_input&#40;"image_thumb_file_".$i, $thumb_file&#41;;
      
&#125;
      
else &#123;
        
show_custom_row&#40;$lang['thumb'&#93;, $lang['no_thumb_newimages_ext'&#93;&#41;;
        
show_hidden_input&#40;"image_thumb_file_".$i, ""&#41;;
      
&#125;
      
show_input_row&#40;$lang['field_download_url'&#93;.$lang['download_url_desc'&#93;, "image_download_url_".$i, "", $textinput_size&#41;;

      
$image_name = &#40;isset&#40;$error['image_name_'.$i&#93;&#41;&#41; ? $HTTP_POST_VARS['image_name_'.$i&#93; &#58; str_replace&#40;"_"," ", $image_name&#41;;
      
$title $lang['field_image_name'&#93;.&#40;&#40;isset&#40;$file_src&#41;&#41; ? get_iptc_insert_link&#40;$file_src, "object_name", "image_name_".$i, 0&#41; &#58; ""&#41;;
      
show_input_row&#40;$title, "image_name_".$i, $image_name, $textinput_size&#41;;

      
$title $lang['field_description_ext'&#93;.&#40;&#40;isset&#40;$file_src&#41;&#41; ? get_iptc_insert_link&#40;$file_src, "caption", "image_description_".$i&#41; &#58; ""&#41;;
      
$caption ""
  if &#40;$imageinfo = @getimagesize&#40;$file_src, $info&#41;&#41; &#123; 
   if &#40;isset&#40;$info['APP13'&#93;&#41;&#41; &#123; 
$iptc iptcparse&#40;$info['APP13'&#93;&#41;; 
if &#40;is_array&#40;$iptc&#41;&#41; &#123; 
   if &#40;isset&#40;$iptc['2#120'&#93;&#41;&#41; &#123; 
  $caption "";  
  foreach &#40;$iptc['2#120'&#93; as $val&#41; &#123; 
    $caption .= &#40;&#40;$caption != "" &#41; ? " " &#58; ""&#41;.$val; 
  
  &#125; 
&#125;
&#125; 
   &#125; 
  &#125; 
  show_textarea_row&#40;$title, "image_description_".$i, $caption, $textarea_size&#41;;

      
$title $lang['field_keywords_ext'&#93;.&#40;&#40;isset&#40;$file_src&#41;&#41; ? get_iptc_insert_link&#40;$file_src, "keyword", "image_keywords_".$i&#41; &#58; ""&#41;;
      
$keyword ""
  if &#40;$imageinfo = @getimagesize&#40;$file_src, $info&#41;&#41; &#123; 
   if &#40;isset&#40;$info['APP13'&#93;&#41;&#41; &#123; 
$iptc iptcparse&#40;$info['APP13'&#93;&#41;; 
if &#40;is_array&#40;$iptc&#41;&#41; &#123; 
   if &#40;isset&#40;$iptc['2#025'&#93;&#41;&#41; &#123; 
  $keyword "";  
  foreach &#40;$iptc['2#025'&#93; as $val&#41; &#123; 
    $keyword .= &#40;&#40;$keyword != "" &#41; ? " " &#58; ""&#41;.$val; 
  
  &#125; 
&#125;
&#125; 
   &#125; 
  &#125; 

     
show_textarea_row&#40;$title, "image_keywords_".$i, $keyword, $textarea_size&#41;;

      
show_cat_select_row&#40;$lang['field_category'&#93;, $cat_id, 3, $i&#41;;
      
show_user_select_row&#40;$lang['user'&#93;, $user_info['user_id'&#93;, $i&#41;;

      
$date date&#40;"Y-m-d H&#58;i&#58;s", time&#40;&#41;&#41;;
  if &#40;$imageinfo = @getimagesize&#40;$file_src, $info&#41;&#41; &#123; 
    if &#40;isset&#40;$info['APP13'&#93;&#41;&#41; &#123; 
  $iptc iptcparse&#40;$info['APP13'&#93;&#41;; 
  if &#40;is_array&#40;$iptc&#41;&#41; &#123; 
    if &#40;isset&#40;$iptc['2#055'&#93;[0&#93;&#41;&#41; &#123; 
  $date $iptc['2#055'&#93;[0&#93;; 
  $date preg_replace&#40;"/&#40;[0-9&#93;&#123;4&#125;&#41;&#40;[0-9&#93;&#123;2&#125;&#41;&#40;[0-9&#93;&#123;2&#125;&#41;/", "\\1-\\2-\\3", $date&#41;; 
    &#125; 
  &#125; 
    &#125; 
  &#125;   
      
$title $lang['field_date'&#93;.$lang['date_desc'&#93;.$lang['date_format'&#93;.&#40;&#40;isset&#40;$file_src&#41;&#41; ? get_iptc_insert_link&#40;$file_src, "date_created", "image_date_".$i, 0&#41; &#58; ""&#41;;
      
show_input_row&#40;$title, "image_date_".$i, $date, $textinput_size&#41;;

      
show_hidden_input&#40;"old_cat_id_".$i, $cat_id&#41;;
      
show_radio_row&#40;$lang['field_free'&#93;, "image_active_".$i, 1&#41;;
      
show_radio_row&#40;$lang['field_allow_comments'&#93;, "image_allow_comments_".$i, 1&#41;;
      
show_additional_fields&#40;"image", array&#40;&#41;, IMAGES_TABLE, $i&#41;;
    
&#125;
    
else &#123;
      
echo "<tr class=".get_row_bg&#40;&#41;.">\n";
      
echo "<td><input type=\"checkbox\" name=\"addimage_".$i."\" value=\"1\"$checked></td>\n";
      
$link "<a href=\"".MEDIA_PATH.$cat_path."/".$image_list[$i-1&#93;."\" target=\"_blank\">".$image_list[$i-1&#93;."</a>";
      
show_hidden_input&#40;"image_media_file_".$i, $image_list[$i-1&#93;&#41;;
      
if &#40;$thumb_file&#41; &#123;
        
$thumb_status $lang['thumb_newimages_exists'&#93;;
        
show_hidden_input&#40;"image_thumb_file_".$i, $thumb_file&#41;;
      
&#125;
      
else &#123;
        
$thumb_status $lang['no_thumb_newimages'&#93;;
        
show_hidden_input&#40;"image_thumb_file_".$i, ""&#41;;
      
&#125;
      
echo "<td><b>".$link."</b><br />-&raquo; ".$thumb_status."</td>\n";


      if &
#40;isset&#40;$error['image_name_'.$i&#93;&#41;&#41; &#123;
        
$lang['field_image_name'&#93; = sprintf&#40;"<span class=\"marktext\">%s</span>", $lang['field_image_name'&#93;&#41;;
        
$image_name $HTTP_POST_VARS['image_name_'.$i&#93;;
      
&#125;
      
else &#123;
        
$image_name str_replace&#40;"_"," ", $image_name&#41;;
      
&#125;
      
echo "<td>".$lang['field_image_name'&#93;."&#58;<br /><input type=\"text\" name=\"image_name_".$i."\" value=\"".$image_name."\">\n";
      
if &#40;isset&#40;$error['cat_id_'.$i&#93;&#41;&#41; &#123;
        
$lang['field_category'&#93; = sprintf&#40;"<span class=\"marktext\">%s</span>", $lang['field_category'&#93;&#41;;
      
&#125;
      
$cat_id = &#40;isset&#40;$HTTP_POST_VARS['cat_id_'.$i&#93;&#41;&#41; ? intval&#40;$HTTP_POST_VARS['cat_id_'.$i&#93;&#41; &#58; $cat_id;
      
echo "<td>".$lang['field_category'&#93;."&#58;<br />".get_category_dropdown&#40;$cat_id, 0, 3, $i&#41;."</td>\n";
      
show_hidden_input&#40;"old_cat_id_".$i, $cat_id&#41;;

      
echo "<td>".$lang['field_free'&#93;."&#58;<br />";
      
if &#40;isset&#40;$HTTP_POST_VARS['image_active_'.$i&#93;&#41; && $HTTP_POST_VARS['image_active_'.$i&#93; == 0&#41; &#123;
        
$c1 "";
        
$c2 " checked=\"checked\"";
      &
#125;
      
else &#123;
        
$c1 " checked=\"checked\"";
        
$c2 "";
      &
#125;
      
echo "<input type=\"radio\" name=\"image_active_".$i."\" value=\"1\"".$c1."> ".$lang['yes'&#93;."&nbsp;&nbsp;&nbsp;\n";
      
echo "<input type=\"radio\" name=\"image_active_".$i."\" value=\"0\"".$c2."> ".$lang['no'&#93;." ";
      
echo "</td>\n";

      echo 
"<td>".$lang['field_allow_comments'&#93;."&#58;<br />";
      
if &#40;isset&#40;$HTTP_POST_VARS['image_allow_comments_'.$i&#93;&#41; && $HTTP_POST_VARS['image_allow_comments_'.$i&#93; == 0&#41; &#123;
        
$c1 "";
        
$c2 " checked=\"checked\"";
      &
#125;
      
else &#123;
        
$c1 " checked=\"checked\"";
        
$c2 "";
      &
#125;
      
echo "<input type=\"radio\" name=\"image_allow_comments_".$i."\" value=\"1\"".$c1."> ".$lang['yes'&#93;."&nbsp;&nbsp;&nbsp;\n";
      
echo "<input type=\"radio\" name=\"image_allow_comments_".$i."\" value=\"0\"".$c2."> ".$lang['no'&#93;." ";
      
echo "</td>\n";
      echo 
"</tr>\n";
    &
#125;
  
&#125;
  
if &#40;$num_all_newimages&#41; &#123;
    
show_hidden_input&#40;"num_newimages", $num_newimages&#41;;
    
show_hidden_input&#40;"detailed", $detailed&#41;;
    
show_form_footer&#40;$lang['add'&#93;, $lang['reset'&#93;, $colspan&#41;;
  
&#125;
  
else &#123;
    
show_table_footer&#40;&#41;;
  
&#125;
&#125;
show_admin_footer&#40;&#41;;
?>



Please note that I chose to keep the filename as the title of the photo. This is because I have a program that assigns a special name to each of my photos, that allows to identify the photos, quite straight forward.

Any doubts or anything I can help, drop me a line

8
Discussion & Troubleshooting / I think I found a bug!!!
« on: January 03, 2003, 01:48:08 AM »
Hello Everybody:

During my quest to make a download log I noticed that if you press the download button and then choose to cancel the download, even if you cancel it before it starts, the download count increases.

Isn't there anyway to ensure that the download was complete and only then increase the count?

Thanks Guys

Happy New Year!!

Jose

9
Hi:

Try nopdesign's cart.

It's also javascript, very easy to integrate into 4images and has a very active support forum that will help you.

My website isn't up yet, but i have integrated nopdesign's cart easily.

run a search to get to the website. i believe it's called nopcart!

10
Hi Everybody:

I would like to ask help from all you guys who know PHP :oops: .

I would like to modify the detailed version of Check for new Images page , in the admin section, so that instead of having to press the IPTC *** button to pass the IPTC information to the respective fields, these would be automatically be filled.

This is because I have approx. 1500 images, all with IPTC info and I would like to copy the caption and keyword fields from the IPTC information to the description and keyword fields in the image, so that the information contained in the caption and keyword fields of the IPTC information is searchable.

Thank you all  :D

And Happy New Year!!!  :P


Jose Rodrigues

---- Edited ----

Never Mind... I have managed to alter it myself. If anyone wishes to make the same modifications drop me a line.

11
Chit Chat / I have solved my problem! This is how i did it!
« on: September 20, 2002, 12:28:19 PM »
*** This explanation is only for windows ***

The php.ini can be in different places.

You can even have more than one.

There should be one php.ini ( the default one ) in your System directory, tipically your system or system32 directory.

make a new text file and name it test.php

than  put this inside it:

Code: [Select]
<?
phpinfo();
?>


and save it.

Then, goto your web browser and open the file.

If php is installed correctly, you'll see which php.ini file is being used ( you'll see the path where the php.ini is )

Got it?

Jose

----------------------------------------------------------------------------

By the way, the thumbnails look perfect on your website, so i don't know what is your problem

12
Chit Chat / I have solved my problem! This is how i did it!
« on: September 18, 2002, 10:21:29 AM »
I just said what i said, because i saw a lot of questions in this forum that refered to the same problem... :)

How did you get your imagemagick to work? :?:

the program works fine on my pc, but i get those (usual?) errors of
Quote
Error creating thumbnail
and those lines in the apache log
Quote
[File or directory not found]
when they are there. :x

Any tips on this? :?:

Anyway, it works super with GD, so i'm not expecting to change to imagemagick.  :)

Thanks on the tip :idea:  on the zlib. I'll certainly use it. :D

Greets

Jose

13
Chit Chat / I have solved my problem! This is how i did it!
« on: September 17, 2002, 11:37:32 PM »
Hello Everybody:

Just to tell you that i'm finally generating autothumbnails.

This is how I did it...

1 - Forget ImageMagick

Forget ImageMagick. Go for the GD library, which is an extension for php, already included in the instalation.

Edit your php.ini and uncomment the line

extension=php_gd.dll

then restart windows.

if you get an error similar to "unable to load dinamic library php_gd.dll", get a copy of libsasl.dll and put it in the directory that holds php.exe.

restart it again, if needed.

then go to the settings of admin site of 4images and change the library to GD.

now try generating the autothumbnails...

voilá! there you have it...

To Jan:

Just a suggestion Jan, put this hint in the install documentation. It helps a lot. At least, it helped me...

14
Installation, Update & Configuration / What does this mean?
« on: September 17, 2002, 08:45:28 PM »
Hello everybody:

I'm having quite some trouble getting 4images to work on my server.

As stated in my previous topic i'm getting an error creating the thumbnails.

Create thumbnail for: Fofo1 (FofoNenoPressJoseRodrigues1.jpg) ....  
   Error creating thumbnail!


Create thumbnail for: zzz (examples.jpg) ....  
   Error creating thumbnail!


when i check my apache log, i get this:

C:\immagick\convert.exe: no delegate for this image format (./../data/media/1/FofoNenoPressJoseRodrigues1.jpg) [No such file or directory].
C:\immagick\convert.exe: no delegate for this image format (./../data/media/1/examples.jpg) [No such file or directory].

but the files are there!!

What's going on and how can I correct it?

Windows users please tell me about your experiences trying to get the autothumbnailer to work.

Thanks guys

Jose

Pages: [1]