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

Pages: [1]
1
Chit Chat / Спам в комментариях...
« on: November 07, 2009, 03:01:10 PM »
В моей галерее комментарии могут добавлять все, включая гостей. Изменять этот параметр я не хочу.
Использую [MOD] Anti-Spam v1.0 for Guestbook & Comments, но в последнее время он не помогает.

Спам появляется только в комментариях к фоткам (в гостевой нет).
У спамера абсолютно разные IP, нормальная запись в User Agent.
Приходит всегда с Google после запроса Verification code inurl:details.php?image_id=.

На сайтах, где включена старндартная captcha - та же история.
Похоже кто-то нашёл слабое место в галерее.

Как с этим бороться?

2
Discussion & Troubleshooting / Using Lightbox_id
« on: January 08, 2009, 06:06:29 AM »
Hi all,

Can somebody explain me for what we use lightbox_id in the table LIGHTBOXES if we have user_id ?
I just want to understand.

3
Discussion & Troubleshooting / Update comments count
« on: December 23, 2008, 04:11:53 AM »
I do little mod that uses user_comments from USERS_TABLE and found that this value not changed if:

1. whole category was deleted
2. image was deleted in ACP  (member.php work fine)

To fix first problem I did
in the file admin/categories.php

find two times
Code: [Select]
$image_ids_sql .= (($image_ids_sql != "") ? ", " : "").$image_row['image_id'];
add below
Code: [Select]
$sql2 = "SELECT user_id
              FROM ".COMMENTS_TABLE."
              WHERE image_id = ".$image_row['image_id']." AND user_id <> ".GUEST;
      $result = $site_db->query($sql2);

      while ($row = $site_db->fetch_array($result)) {
        $sql3 = "UPDATE ".USERS_TABLE."
                SET ".get_user_table_field("", "user_comments")." = ".get_user_table_field("", "user_comments")." - 1
                WHERE ".get_user_table_field("", "user_id")." = ".$row['user_id'];
        $site_db->query($sql3);
      }


To fix second problem I did

in the file admin/images.php

find
Code: [Select]
    if (!empty($user_table_fields['user_comments'])) {
      $sql = "SELECT user_id
              FROM ".COMMENTS_TABLE."
              WHERE image_id = ".$image_row['image_id']." AND user_id <> ".GUEST;
      $result = $site_db->query($sql);

      while ($row = $site_db->fetch_array($result)) {
        $sql = "UPDATE ".USERS_TABLE."
                SET ".get_user_table_field("", "user_comments")." = ".get_user_table_field("", "user_comments")." - 1
                WHERE ".get_user_table_field("", "user_id")." = ".$row['user_id'];
        $site_db->query($sql);
      }
    }

replace with
Code: [Select]
//    if (!empty($user_table_fields['user_comments'])) {
      $sql = "SELECT user_id
              FROM ".COMMENTS_TABLE."
              WHERE image_id = ".$image_row['image_id']." AND user_id <> ".GUEST;
      $result = $site_db->query($sql);

      while ($row = $site_db->fetch_array($result)) {
        $sql = "UPDATE ".USERS_TABLE."
                SET ".get_user_table_field("", "user_comments")." = ".get_user_table_field("", "user_comments")." - 1
                WHERE ".get_user_table_field("", "user_id")." = ".$row['user_id'];
        $site_db->query($sql);
      }
//    }


Can someone just check my solution and tell me if I did right?

4
Discussion & Troubleshooting / Uploading 2 files with the same name
« on: December 08, 2008, 05:11:20 AM »
In my general settings I set Upload mode=Save files with new name
and it's work fine if I upload 2 files with the same name and the same extension.
But I want it will work also if the extension is different.
How can I do this?

5
Hello,
I saw some mods for different tops, but not exactly what I need.
I want to put all most rated images from each category in one category/page.
How can I do that?

Pages: [1]
Post your comments here