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

Pages: [1] 2 3 4
1
Discussion & Troubleshooting / To much query time. I need help
« on: January 22, 2015, 04:25:40 PM »
I cant understand, where is the problem. Below is log file of my requests

# Time: 141202  1:54:51
# User@Host: drandrew[drandrew] @ localhost [127.0.0.1]
# Thread_id: 6673171  Schema: drandrew  Last_errno: 1005  Killed: 1053
# Query_time: 191.102375  Lock_time: 0.000000  Rows_sent: 0  Rows_examined: 0  Rows_affected: 0  Rows_read: 1
# Bytes_sent: 66  Tmp_tables: 0  Tmp_disk_tables: 0  Tmp_table_sizes: 0
use drandrew;
SET timestamp=1417474491;
CREATE TABLE IF NOT EXISTS 5images_users_rating (
        
field_id int(11unsigned NOT NULL AUTO_INCREMENT,
        
user_ids int(11NOT NULL DEFAULT '0',
        
other_user_id int(11NOT NULL DEFAULT '0',
        
rating_date int(11NOT NULL DEFAULT '0',        
        
rating_value int(2NOT NULL DEFAULT '0',
        
rating_count int(11NOT NULL DEFAULT '0',
        
PRIMARY KEY(field_id)
        ) 
TYPE=MyISAM;
# Time: 141202  1:54:51
# User@Host: drandrew[drandrew] @ localhost [127.0.0.1]
# Thread_id: 6673174  Schema: drandrew  Last_errno: 1005  Killed: 1053
# Query_time: 190.411156  Lock_time: 0.000000  Rows_sent: 0  Rows_examined: 0  Rows_affected: 0  Rows_read: 1
# Bytes_sent: 66  Tmp_tables: 0  Tmp_disk_tables: 0  Tmp_table_sizes: 0
SET timestamp=1417474491;
CREATE TABLE IF NOT EXISTS 5images_users_rating (
        
field_id int(11unsigned NOT NULL AUTO_INCREMENT,
        
user_ids int(11NOT NULL DEFAULT '0',
        
other_user_id int(11NOT NULL DEFAULT '0',
        
rating_date int(11NOT NULL DEFAULT '0',        
        
rating_value int(2NOT NULL DEFAULT '0',
        
rating_count int(11NOT NULL DEFAULT '0',
        
PRIMARY KEY(field_id)
        ) 
TYPE=MyISAM;
# Time: 141202  1:54:51
# User@Host: drandrew[drandrew] @ localhost [127.0.0.1]
# Thread_id: 6673222  Schema: drandrew  Last_errno: 1005  Killed: 1053
# Query_time: 174.069439  Lock_time: 0.000000  Rows_sent: 0  Rows_examined: 0  Rows_affected: 0  Rows_read: 1
# Bytes_sent: 66  Tmp_tables: 0  Tmp_disk_tables: 0  Tmp_table_sizes: 0
use drandrew;
SET timestamp=1417474491;
CREATE TABLE IF NOT EXISTS 5images_users_rating (
        
field_id int(11unsigned NOT NULL AUTO_INCREMENT,
        
user_ids int(11NOT NULL DEFAULT '0',
        
other_user_id int(11NOT NULL DEFAULT '0',
        
rating_date int(11NOT NULL DEFAULT '0',        
        
rating_value int(2NOT NULL DEFAULT '0',
        
rating_count int(11NOT NULL DEFAULT '0',
        
PRIMARY KEY(field_id)
        ) 
TYPE=MyISAM;
# Time: 141202  1:54:51
# User@Host: drandrew[drandrew] @ localhost [127.0.0.1]
# Thread_id: 6673259  Schema: drandrew  Last_errno: 1005  Killed: 0
# Query_time: 147.307311  Lock_time: 0.000000  Rows_sent: 0  Rows_examined: 0  Rows_affected: 0  Rows_read: 1
# Bytes_sent: 66  Tmp_tables: 0  Tmp_disk_tables: 0  Tmp_table_sizes: 0
use drandrew;
SET timestamp=1417474491;
CREATE TABLE IF NOT EXISTS 5images_users_rating (
        
field_id int(11unsigned NOT NULL AUTO_INCREMENT,
        
user_ids int(11NOT NULL DEFAULT '0',
        
other_user_id int(11NOT NULL DEFAULT '0',
        
rating_date int(11NOT NULL DEFAULT '0',        
        
rating_value int(2NOT NULL DEFAULT '0',
        
rating_count int(11NOT NULL DEFAULT '0',
        
PRIMARY KEY(field_id)
        ) 
TYPE=MyISAM;


What does this process mean?

2
Discussion & Troubleshooting / &lang['example'] in new php. need help
« on: January 12, 2013, 10:40:59 PM »
Hello all! My problem is:

I`ve a php, in which describes some functions only. For the example i`ll post a part of the code

	
echo 
'<br><br><select name="drop_3" id="drop_3">
	
      <option value=" " disabled="disabled" selected="selected">Choose Example</option>
	
      <option value="unknown">Unknown</option>
	
      <option value="Type Manually Airline Here">Unlisted - Type Manually</option>
	
      <option value=" " disabled="disabled">---------------------</option>'
;


Choose Example, Unlisted - Type Manually, Unknown can`t support $lang['choose_example']... Got me error, lang is unknown... How to do this. Help me please! Many thanks!

3
I searched the entire forum and have not been able to find such a solution. Please, anyone help me with this. Click on the link, to open popup window with login fields...

Many thanks!

4
Programming / Total views for lightboxes
« on: May 14, 2012, 02:37:48 PM »
Hello!

This little modification i`ve created for my gallery. I think it might be useful to someone else!

Q: What is that modification do?
A: This mod, will count the number of hits for each album and record the value in the database every time someone would see the photo album. Just 4 steps for modification. P.S. This work in all versions of 4images, and not depends on each installed MODs..

1. Create a table in 4images_lightboxes

ALTER TABLE `4images_lightboxesADD `lightbox_hitsINT(10UNSIGNED AS DEFINED 0;

2. In lightbox.php find

//-----------------------------------------------------
//--- Show Images -------------------------------------
//-----------------------------------------------------
if ($action == "show")
{


Add after:

//Update lightbox Hits
if ($user_info['user_level'] != ADMIN) {
  
$lightbox_id = (isset($HTTP_POST_VARS['lightbox_id']) && $HTTP_POST_VARS['lightbox_id']) ? $HTTP_POST_VARS['lightbox_id'] : ((isset($HTTP_GET_VARS['lightbox_id']) && $HTTP_GET_VARS['lightbox_id']) ? $HTTP_GET_VARS['lightbox_id'] : 0);
  
    
$sql "UPDATE ".LIGHTBOXES_TABLE." l
          SET l.lightbox_hits = l.lightbox_hits + 1
          WHERE l.lightbox_id = '"
.$lightbox_id."'";
  
$site_db->query($sql);
     
}


3: Directly under 2 step, find sql query and at the end of line paste: l.lightbox_hits

4. Find:
$site_template->register_vars(array(
Paste:
"lightbox_hits" => $row['lightbox_hits'],

5. In the lightbox.html use {lightbox_hits}

This is end! Take a look! Enjoy ;-)

Regards,
Andrew

5
Discussion & Troubleshooting / I need a suggest!
« on: January 26, 2012, 11:54:50 AM »
Hello to all...

I need your suggest. My gallery have about 16000 photos. I need to download data derictory to my localhost. I`ve a problems with internet. It is not quickly and i`ve traffic limitation! What soft may you recomend me? What programm i need, as most optimal in my situation?

Thanks!

6
Discussion & Troubleshooting / Two periodic errors on my site...
« on: December 18, 2011, 07:32:57 AM »
Hi to all! This is my problem...

From time to time, i have hard server loads, after that two errors:

Bad SQL QuerySELECT *
              
FROM 5images_users
              WHERE user_id 

You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3


Bad SQL QueryDELETE FROM 5images_sessions
            WHERE session_id 
'95ec5bc07eb8ce7a2522d70ae76cc352' OR session_user_id 
You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2


What file need to observe?

Thanks!

7
Programming / Site slow down due to BOTs...
« on: October 18, 2011, 01:34:12 PM »
There are many requests of the any robots on my site. This is really slow down site loading. Anytime i have error "502 Bad Gateway"...

Look at the information from my log file below:

requests    %bytes       Organization
12334   71,78%   googlebot.com
7913   46,40%   crawl-66-249-66-9.googlebot.com
2810   15,85%   crawl-66-249-72-24.googlebot.com


What to do? Any solutions?

Thanks!

8
Programming / A little space under photo, after uploading...
« on: October 02, 2011, 07:48:55 PM »
I will try to descript my request...

Is it possible to create a little space under each photo, after uploading on site? If picture height is 150px, add under photo 10px else? To better understanding i`ll attach example...

Look at the bottom of picture please... Is it possible? Thanks


9
Discussion & Troubleshooting / More notices at my gallery...
« on: September 20, 2011, 10:08:59 PM »
Hello... I will in turn spread messages, sorting them by a single php file. My db_definitions.php

I`ve open my error log, and saw this messages:

NoticeUndefined indeximage_airline_code in C:\Users\***\Desktop\root\includes\db_field_definitions.php on line 110

Notice
Undefined indeximage_camera in C:\Users\***\Desktop\Server\root\includes\db_field_definitions.php on line 125

Notice
Undefined indeximage_lens in C:\Users\***\Desktop\Server\root\includes\db_field_definitions.php on line 126

Notice
Undefined indexexif_GPSTrack in C:\Users\***\Desktop\Server\root\includes\db_field_definitions.php on line 149

Notice
Undefined indexuser_skype in C:\Users\***\Desktop\Server\root\includes\db_field_definitions.php on line 161

Notice
Undefined indexprofile_hits in C:\Users\***\Desktop\Server\root\includes\db_field_definitions.php on line 162


Line 110: for observing

$additional_image_fields['image_airline_code'] = array($lang['image_airline_code'], "text"0);


What`s wrong?

10
Discussion & Troubleshooting / What is wrong with my emails in gallery?
« on: August 31, 2011, 10:45:51 AM »
From some time i`ve observed this problem with my any emails on the site, please look at attached file. What`s problem?


11
Mods & Plugins (Requests & Discussions) / What is this MOD?
« on: August 26, 2011, 04:26:23 PM »
Please help me to find, or what is the style of this rating?

See attached file

Many thanks for help!

12
Good day. Is it possible to do next:

If photo have more than 2 votes, it will automatically replace to the category "people`s choise" for i.e.???

If yes, please help me! Thanks

13
Good day to all...

Please help me.

How to show user gender on member_uploadform.html

{user_gender} - not work...

Thanks!

14
Programming / Need help... PHP code
« on: March 17, 2011, 12:43:21 PM »
Hello. Please help me with next... I`m not a programmer, very difficult for me  :D

  $thumbnails "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n";
  
  
$count 3;
  
$bgcounter 3;
  while (
$image_row $site_db->fetch_array($result)) {

    if (
$count == 3) {
      
$row_bg_number = ($bgcounter++ % == 0) ? 2;
      
$thumbnails .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    
$thumbnails .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
    
show_image($image_row);
    
$thumbnails .= $site_template->parse_template("mscomments_bit");
    
$thumbnails .= "\n</td>\n";
    
$count++;
    if (
$count == $config['image_cells']) {
      
$thumbnails .= "</tr>\n";

  
  
$thumbnails "</table>\n";

}
}


I need to show next:

<table.....>
<tr>
<td>3 thumbnails</td>
</tr>
<tr>
<td>3 thumbnails</td>
</tr>
.......
</table>

many thanks!

15
Programming / Very strange and unknown error
« on: February 26, 2011, 12:51:29 PM »
Please help me resolve this problem, i don`t understand what is the problem! I`ve this code in file msweek.php

<?php

$time 
time() - 60 60 24 7;
$sql "SELECT COUNT(*) AS num_rows_all
        FROM (" 
IMAGES_TABLE " i, " CATEGORIES_TABLE " c)
        WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.image_date >= " 
$time " AND i.cat_id NOT IN (".get_auth_cat_sql("auth_viewcat""NOTIN").")
        "
;
        
$row $site_db->query_firstrow($sql);
$num_rows_all = (isset($row['num_rows_all'])) ? $row['num_rows_all'] : 0;

$link_arg $site_sess->url(ROOT_PATH."index.php");

$imgtable_width ceil(intval($config['image_table_width']) / $config['image_cells']);
if ((
substr($config['image_table_width'], -1)) == "%") {
  
$imgtable_width .= "%";
}

$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 c.cat_id = i.cat_id AND i.image_date >= " 
$time " AND i.cat_id NOT IN (".get_auth_cat_sql("auth_viewcat""NOTIN").")
        ORDER BY i.image_hits DESC
        LIMIT 2"
;
        
$result $site_db->query($sql);
$num_rows $site_db->get_numrows($result);

if (!
$num_rows)  {
  
$msweek_new_images "<table align=\"center\" width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  
$msweek_new_images .= $lang['no_today_images'];
  
$msweek_new_images .= "</td></tr></table>";
}
else  {
  
$msweek_new_images "<table align=\"center\" width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
  
$count 0;
  
$bgcounter 0;
  while (
$image_row $site_db->fetch_array($result)) {
    if (
$count == 0) {
      
$row_bg_number = ($bgcounter++ % == 0) ? 2;

    }
    
$msweek_new_images .= "<td width=\"".$imgtable_width."\" align=\"center\" >\n";

    
show_image($image_row);
    
$msweek_new_images .= $site_template->parse_template("most_rated_bit");
    
$msweek_new_images .= "\n</td>\n";
    
$count++;
    if (
$count == $config['image_cells']) {

      
$count 0;
    }
  } 
// end while

  
if ($count 0)  {
    
$leftover = ($config['image_cells'] - $count);
    if (
$leftover >= 1) {
      for (
$f 0$f $leftover$f++) {

      }
      
$msweek_new_images .= "</tr>\n";
    }
  }
  
$msweek_new_images .= "</table>\n";
}  
// end else

$site_template->register_vars("msweek_images"$msweek_new_images);
unset(
$msweek_new_images);
?>


And add this path to index.php

include(ROOT_PATH.'msweek.php');

But i have error:

Fatal errorCall to a member function url() on a non-object in /home/users2/m/***/domains/***/msweek.php on line 12

Line 12 is:

$link_arg $site_sess->url(ROOT_PATH."index.php");

Version of the gallery 1.7.9, on my first site it work fine!

In what file maybe problem?

Thanks!


Pages: [1] 2 3 4