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

Pages: [1]
1
Discussion & Troubleshooting / A large number of categories - slow work site
« on: September 06, 2013, 10:55:40 AM »
I have a website - Photogallery.

He has more than 8,000 categories. Because of this - loading pages can take up to 10 seconds or more.
During the experiment, while reducing the number of categories - speed increased.

The question how to solve the problem?
Reduce the number of categories - not an option.

2
Mods & Plugins (Requests & Discussions) / Flash random image cloud
« on: September 02, 2013, 02:30:07 PM »
Liked the idea of ​​Flash tag cloud.
http://www.4homepages.de/forum/index.php?topic=24961.0

Is the idea to make online cloud, but that there were previews of random photos. Nobody does not like doing?

3
Mods & Plugins (Requests & Discussions) / AJAX Rating +1 -1
« on: October 04, 2012, 02:51:25 PM »
Unfortunately I do not know AJAX   :(

Need to vote for the photo as like / dislike (+1 / -1).

Ideally - even with the list of who is for / against who.

vote +1 / -1 implemented in AJAX comments http://www.4homepages.de/forum/index.php?topic=23866.0

4
Hi!
Make modifications allowing to enter comments to scanned photos. And faced with the problem of how to pass data from intput fields when adding / removing.

Added to the code action == "validateimages" checkbox and the input line
while ($image_row $site_db->fetch_array($result)) {
      echo 
"<tr class=\"".get_row_bg()."\">";

      
$image_path = (is_remote($image_row['image_media_file'])) ? $image_row['image_media_file'] : MEDIA_TEMP_PATH."/".$image_row['image_media_file'];
      
$file_src get_file_path($image_row['image_media_file'], "media"01);

      echo 
"<td ROWSPAN=3><input type=\"radio\" name=\"image_list[".$image_row['image_id']."]\" value=\"1\" ></td>";
      echo 
"<td ROWSPAN=3 ><input type=\"radio\" name=\"image_list[".$image_row['image_id']."]\" value=\"0\" ></td>";
      echo 
"<td  ROWSPAN=3><a href=\"".$image_path."\" target=\"_blank\"><img src=\"".$file_src."\" border=\"1\" height=\"50\"></a></td>";
      echo 
"<td><b><a href=\"".$image_path."\" target=\"_blank\">".format_text($image_row['image_name'], 2)."</a></b> </td>\n";
	
   echo 
"<td>".format_text($image_row['image_Mesto'], 2)."</td>";
	
   echo 
"<td>".format_text($image_row['image_NOmarsh'], 2)."</td>";
      echo 
"<td><a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$image_row['cat_id'])."\" target=\"_blank\">".format_text($cat_cache[$image_row['cat_id']]['cat_name'], 2)."</a></td>\n";
      
$show_user_name format_text($image_row[$user_table_fields['user_name']], 2);
      if (
$image_row['user_id'] != GUEST && empty($url_show_profile)) {
        
$show_user_name "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&".URL_USER_ID."=".$image_row['user_id'])."\" target=\"_blank\">$show_user_name</a>";
      }
      echo 
"<td>".$show_user_name."</td>\n";

      echo 
"<td >".format_date($config['date_format']." ".$config['time_format'], $image_row['image_date'])."</td>\n";
	
  
      echo 
"<td  ROWSPAN=3><p>";
	
  
      
show_text_link($lang['edit'],"validateimages.php?action=editimage&image_id=".$image_row['image_id']);

      echo 
"</p></td>\n";
      echo 
"</tr>\n";

	
   echo 
"<tr class=\"".get_row_bg()."\">  ";
	
	

     echo 
"<td  colspan=6> <table border=0 align=center >
	
 <tr align=center>
	
	
 <td width=80>Photo size </ td> <td width=60> not sharp </ td> <td width=60> Dark </ td> <td width=80> Relight </ td> <td width=110> Unsuccessful perspective </ td> <td width=130> Foreign objects </ td> <td width=130> little information </ td>
  </ tr> <tr align=center>
<td> <input type=\"checkbox\" name=\"my_check[]\" value=\" size photo does not comply;\"> </ td>
<td> <input type=\"checkbox\" name=\"my_check[]\" value=\" sharp enough;\"> </ td>
<td> <input type=\"checkbox\" name=\"my_check[]\" value=\" Dark;\"> </ td>
<td> <input type=\"checkbox\" name=\"my_check[]\" value=\" Relight;\"> </ td>
<td> <input type=\"checkbox\" name=\"my_check[]\" value=\" Poor angle;\"> </ td>
<td> <input type=\"checkbox\" name=\"my_check[]\" value=\" Foreign objects in the frame;\"> </ td>
<td> <input type=\"checkbox\" name=\"my_check[]\" value=\" little information;\"> </ td>
	

	
	
</tr> </table>
	
	
 </td>"
	
   
	
  echo 
"</tr>\n";
	
	
  
	
	
  
	
   echo 
"<tr class=\"".get_row_bg()."\">";
	
     
	
	
    echo 
"<td colspan=6 align=\"center\"><input name=\"my_check[]\" type=\"text\" size=\"110\"></td>"

	
  echo 
"</tr>\n";
    }


The problem is that I use
 
$my_check = $_POST['my_check'];
    $note = implode(" ", $my_check);


to enter into the database. But when checking several photos at the same time - notes are the same for all photos.


$action == "saveimages"
while ($row $site_db->fetch_array($result)) {
      
$image_cache[$row['image_id']] = $row;
    }

    foreach (
$image_list as $key => $val) {
      
flush();
      
$image_name addslashes($image_cache[$key]['image_name']);
      
$cat_id $image_cache[$key]['cat_id'];
      
$user_id $image_cache[$key]['user_id'];
	
  
$image_Mesto addslashes($image_cache[$key]['image_Mesto']);
	
  
$image_NOmarsh addslashes($image_cache[$key]['image_NOmarsh']);
      
$image_description addslashes($image_cache[$key]['image_description']);
      
$image_keywords addslashes($image_cache[$key]['image_keywords']);
      
$image_date $image_cache[$key]['image_date'];
      
$image_media_file addslashes($image_cache[$key]['image_media_file']);
      
$image_thumb_file addslashes($image_cache[$key]['image_thumb_file']);
      
$image_download_url addslashes($image_cache[$key]['image_download_url']);
      
$note trim($HTTP_POST_VARS['note']);
      
$old_media_path MEDIA_TEMP_PATH."/".$image_media_file;
      
$old_thumb_path THUMB_TEMP_PATH."/".$image_thumb_file;
	
 
          
$current_time time();
       
	
  
	
 
$my_check $_POST['my_check'];
	
 
 
	
$note implode(" "$my_check);

      if (
$val == 1) {
	
    
$status=1;
        
$new_name copy_media($image_media_file"-1"$cat_id);
        
$new_thumb_name copy_thumbnail($new_name$image_thumb_file"-1"$cat_id);

        if (
$new_name) {
          
$additional_field_sql "";
          
$additional_value_sql "";
          if (!empty(
$additional_image_fields)) {
            
$table_fields $site_db->get_table_fields(IMAGES_TABLE);
            foreach (
$additional_image_fields as $key2 => $val2) {
              if (isset(
$image_cache[$key][$key2]) && isset($image_cache[$key][$key2])) {
                
$additional_field_sql .= ", $key2";
                
$additional_value_sql .= ", '".addslashes($image_cache[$key][$key2])."'";
              }
            }
          }
          
$sql1 "INSERT INTO ".IMAGES_TEMP1_TABLE."
                  (cat_id, user_id, image_name, image_Mesto, image_NOmarsh,  image_description, image_date, note, status) 
                  VALUES
                  (
$cat_id$user_id, '$image_name', '$image_Mesto','$image_NOmarsh','$image_description', $current_time,  '$note','$status')";
          
$result1 $site_db->query($sql1);


How to make $note data were entered correctly for each of the entries photo?

PS sorry for my english :)

5
Good day, everybody!

By default, user send the photo gallery and is waiting for her moderation does not follow the fate of his photos.

And if the problem of viewing the moderation queue decides modes  [MOD] Show to user his awaiting validation images http://www.4homepages.de/forum/index.php?topic=27806.0, then the problem of obtaining information about the reasons for the deviation remains.

Nobody met MOD leading a kind of "story" and allows the user to read a list of accepted / rejected photos and notes the moderator explaining the refusal?

Pages: [1]