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

Pages: 1 ... 4 5 6 7 [8] 9 10 11 12 ... 21
106
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!

107
How to make a same stars as attach???

And how to make sum of voting?

For example: (1 user gave) 5.95 + (2 users gave 4.00) = 9.95

108
Who have this MOD? Please send me... Download link not work. Site got an error

109
Templates & Styles (Releases & Support) / Re: [MOD] reCAPTCHA
« on: March 16, 2011, 09:35:57 PM »
resolved with default captha!!!  :D

110
Templates & Styles (Releases & Support) / Re: [MOD] reCAPTCHA
« on: March 16, 2011, 09:24:32 PM »
This mod not work with this http://www.4homepages.de/forum/index.php?topic=8987.0

When i send a message with blank {recaptcha} field, it send message without problems... In my global.php have this line $captcha_enable_contact    = 1;

What is the prob?

111
I`ve a problem with encoding... See attached pic

112
Something wrong with my Russian unicode... How to resolve?

113
Programming / Re: Very strange and unknown error
« on: February 26, 2011, 07:45:03 PM »
What a .**** I`ve edited this within a 3-4 days :-) Screw my mind!!! Really thanks!!!

114
Programming / Re: Very strange and unknown error
« on: February 26, 2011, 06:11:52 PM »
In the first part of file:

$templates_used 'home,category_bit,whos_online,thumbnail_bit,thumbnail2_bit';
$main_template 'home';

define('GET_CACHES'1);
define('ROOT_PATH''./');
define('MAIN_SCRIPT'__FILE__);
define('GET_USER_ONLINE'1);
include(
ROOT_PATH.'global.php');
include(
ROOT_PATH.'msweek.php');

require(
ROOT_PATH.'includes/sessions.php');

115
Programming / Re: Very strange and unknown error
« on: February 26, 2011, 05:32:44 PM »
Code: [Select]
Fatal error: Call to a member function url() on a non-object in /home/users2/m/milan/domains/planesphotos.net/msweek.php on line 13
Nothing :-(

116
Programming / Re: Very strange and unknown error
« on: February 26, 2011, 01:38:37 PM »
Code: [Select]
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home/users2/m/milan/domains/planesphotos.net/msweek.php on line 2
:-(

117
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!


118
Ok. A little problem... I have this parameters for show thumnails in my categories.php

  $thumbnails "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">\n";
  
$count 0;
  
$bgcounter 0;
  while (
$image_row $site_db->fetch_array($result)){
    if (
$count == 0) {
      
$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_neu get_cat_template($thumb_art$cat_id);
    
$thumbnails .= $site_template->parse_template("$thumbnails_neu");
    
$thumbnails .= "\n</td>\n";

    
$count++;
    if (
$count == $config['image_cells']) {
      
$thumbnails .= "</tr>\n";
      
$count 0;
    }
  } 
// end while


  
if ($count 0)  {
    
$leftover = ($config['image_cells'] - $count);
    if (
$leftover 0) {
      for (
$i 0$i $leftover$i++){
        
$thumbnails .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      
$thumbnails .= "</tr>\n";
    }
  }
  
$thumbnails .= "</table>\n";


See this part:

if ($count == $config['image_cells']) {

In my config in ACP this parameter set is 1...

For new template i need to change this part to 3, but if i will do this it will give affect on all categories templates.... Please, any ideas?

Many thanks


119
Mods & Plugins (Releases & Support) / Re: [Mod] Avatar v2.01
« on: February 18, 2011, 10:31:06 AM »
I`m too have a little Modification for this MOD. With this modification you will be possible to show image owner avatar, on details page or somewhere else!

1. In details.php find first SQL:

$sql "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description,

Replace it with:

$sql "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, u.user_avatar

1.1 Find below:

$cat_id = (isset($image_row['cat_id'])) ? $image_row['cat_id'] : 0;

Insert below:

$user_avatar_image = ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($image_row['user_avatar'] == "") ? "blank.jpg" $image_row['user_avatar'])."\" name=\"new\" width=\"50\" border=\"0\" alt=\"\">" "";
$site_template->register_vars(array(
"user_avatar_image" => $user_avatar_image,
));


2. Open details.html and insert this {user_avatar_image} where you want!

That`s All!

120
Mods & Plugins (Releases & Support) / Re: [MOD] Exif V.1.7.6
« on: February 16, 2011, 08:17:38 PM »
Is it possible to use this MOD with image annotation MOD and GD library???

Pages: 1 ... 4 5 6 7 [8] 9 10 11 12 ... 21