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

Pages: [1] 2 3 4
1
Mods & Plugins (Requests & Discussions) / Re: Google recaptcha
« on: February 02, 2017, 02:37:09 PM »
The problem is that I need step-by-step manual how to install it.. I don't know PHP(

2
Mods & Plugins (Requests & Discussions) / Google recaptcha
« on: February 02, 2017, 11:08:53 AM »
Hello! Anyone know how to add Google Recaptcha to 4images? Step by step...
I have found only this. But it's work only with old version of recaptcha (http://recaptcha.net) - it's not working anymore....
Who can help? thanks

3
Discussion & Troubleshooting / image address
« on: September 08, 2010, 08:36:03 PM »
Hello! I need a link to the image that I see now. For example,  on the page http://www.geo-photo.ru/details.php?image_id=4413 it will
Code: [Select]
http://www.geo-photo.ru/data/media/833/Picture_219.jpgHow can I do this? I need insert this address to page.
thanks

4
Mods & Plugins (Releases & Support) / [MOD] Personal user's rank
« on: January 15, 2009, 09:40:44 PM »
The mod's creator is alekinna, and my idea.
This mod adds possibility to write to users a personal rank from admin centre. It is displayed in comment_bit.html and member_profile.html

1. In includes/db_field_definitions.php add:
Code: [Select]
$additional_user_fields['admin_text'] = array($lang['admin_text'], "text", 0);
2. In lang/russian/main.php add:
Code: [Select]
$lang['admin_text'] = "Personal rank: ";
3. In member_profile.html use*:
Code: [Select]
{lang_admin_text}
{admin_text}
*You are can use  {if admin_text} and {endif admin_text}

4. In comment_bit.html use:
Code: [Select]
{if admin_text}
{lang_admin_text}{admin_text}
{endif admin_text}

5. In details.php:
find line with:
Code: [Select]
$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name,add in this line:
Code: [Select]
u.admin_text,
find FIRST:
Code: [Select]
$admin_links = "";before add:
Code: [Select]
$admin_text = $comment_row[$i]['admin_text'];
find:
Code: [Select]
"comment_user_info" => $comment_user_info,after add:
Code: [Select]
"admin_text" => $admin_text,
        "lang_admin_text" => $lang['admin_text'],

6. In PhpMyAdmin create new parameter:
Code: [Select]
ALTER TABLE `4images_users` ADD `admin_text` TEXT NOT NULL;

5
Ok, thanks. That's work!

7
Mods & Plugins (Requests & Discussions) / Re: Where to create new mod?
« on: December 25, 2008, 09:00:07 PM »
Ok, thanks, I'm already has written

8
Hello all! The mod's creator is alekinna, and my idea.
this MOD add rank by quantity of comments and by quantity of photos in comment_bit.html and member_profile.html.

If user has 0 photos or comments - he is passive
1-10 - beginner
10-50 - active
50-100 - super
>100 - MEGA  :D

So,

1. First install this and this patches from V@no.

2. File includes/functions.php
before  ?> add:
Code: [Select]
function get_rank($count, $mode) {
  global $lang;

  if ($count == 0) {
    $rank_commentator = $lang['passive'].$lang['commentator'];
    $rank_photographer = $lang['passive'].$lang['photographer'];
  }
  elseif ($count >= 1 && $count < 10) {
    $rank_commentator = $lang['beginner'].$lang['commentator'];
    $rank_photographer = $lang['beginner'].$lang['photographer'];
  }
  elseif ($count >= 10 && $count < 50) {
    $rank_commentator = $lang['active'].$lang['commentator'];
    $rank_photographer = $lang['active'].$lang['photographer'];
  }
  elseif ($count >= 50 && $count < 100) {
    $rank_commentator = $lang['super'].$lang['commentator'];
    $rank_photographer = $lang['super'].$lang['photographer'];
  }
  else {
    $rank_commentator = $lang['mega'].$lang['commentator'];
    $rank_photographer = $lang['mega'].$lang['photographer'];
  }
  if ($mode == "commentator") {
    return $rank_commentator;
  }
  if ($mode == "photographer") {
    return $rank_photographer;
  }
}

3. File lang/english/main.php
before  ?> add:
Code: [Select]
$lang['rank'] = "Rank:";
  $lang['commentator'] = "commentator";
$lang['photographer'] = "photographer";
  $lang['passive'] = "Passive ";
  $lang['beginner'] = "Beginner ";
  $lang['active'] = "Active ";
  $lang['super'] = "Super ";
  $lang['mega'] = "Mega ";

4. File details.php
Find:
Code: [Select]
$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq")."Replace:
Code: [Select]
$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date, u.user_images".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq")."
Find:
Code: [Select]
$comment_user_ip = ($user_info['user_level'] == ADMIN) ? $comment_row[$i]['comment_ip'] : "";before this add:
Code: [Select]
$rank = "";
      if ($comment_user_id != GUEST) {
        $rank_commentator = get_rank($comment_row[$i][$user_table_fields['user_comments']], "commentator");
        $rank_photographer = get_rank($comment_row[$i]['user_images'], "photographer");
        $rank = $rank_commentator."<br />".$rank_photographer;
      }

find:
Code: [Select]
$site_template->register_vars(array(
        "comment_id" => $comment_row[$i]['comment_id'],
        "comment_user_id" => $comment_user_id,

after add:
Code: [Select]
        "rank" => $rank,
        "lang_rank" => $lang['rank'],

5. File comment_bit.html
use
Code: [Select]
{if rank}
<b>{lang_rank}</b><br />
{rank}<br />
{endif rank}

6. File member.php
Find:
Code: [Select]
$del_img = $site_db->query($sql);After add:
Code: [Select]
$sql2 = "UPDATE ".USERS_TABLE."
          SET user_images = user_images-1
          WHERE user_id = ".$image_row['user_id']."";
  $site_db->query($sql2);

Find:
Code: [Select]
$image_id = $site_db->get_insert_id();
        if ($result) {
After add:
Code: [Select]
if ($user_info['user_id'] != GUEST) {
            $sql = "UPDATE ".USERS_TABLE."
                    SET user_images = user_images+1
                    WHERE user_id = ".$user_info['user_id']."";
            $site_db->query($sql);
          }


find:
Code: [Select]
  $site_template->register_vars(array(
      "user_id" => $user_row['user_id'],
      "user_name" => (isset($user_row['user_name'])) ? format_text($user_row['user_name'], 2) : REPLACE_EMPTY,
replace:
Code: [Select]
  $rank_commentator = get_rank($user_row['user_comments'], "commentator");
     $rank_photographer = get_rank($user_row['user_images'], "photographer");
     
    $site_template->register_vars(array(
      "user_id" => $user_row['user_id'],
      "user_name" => (isset($user_row['user_name'])) ? format_text($user_row['user_name'], 2) : REPLACE_EMPTY,
      "lang_rank" => $lang['rank'],
      "rank_commentator" => $rank_commentator,
"rank_photographer" => $rank_photographer,

7. File member_profile.html
Use {rank_commentator} and {rank_photographer} and {lang_rank}

8. File admin/categories.php
2 times find:

Code: [Select]
$sql = "SELECT image_id2 times replace:
Code: [Select]
$sql = "SELECT image_id, user_id
2 times find:
Code: [Select]
$image_ids_sql .= (($image_ids_sql != "") ? ", " : "").$image_row['image_id'];2 times after add:
Code: [Select]
if ($image_row['user_id'] != GUEST) {
        $sql2 = "UPDATE ".USERS_TABLE."
                SET user_images = user_images-1
                WHERE user_id = ".$image_row['user_id'];
        $site_db->query($sql2);
      }

9. File admin/images.php
Find:
Code: [Select]
$sql = "DELETE FROM ".IMAGES_TABLE."
            WHERE image_id = ".$image_row['image_id'];
    if ($site_db->query($sql)) {
After add:
Code: [Select]
if ($image_row['user_id'] != GUEST) {
        $sql2 = "UPDATE ".USERS_TABLE."
                SET user_images = user_images-1
                WHERE user_id = ".$image_row['user_id'];
        $site_db->query($sql2);
      }

Find:
Code: [Select]
if ($result) {
          $search_words = array();
          foreach ($search_match_fields as $image_column => $match_column) {
            if (isset($HTTP_POST_VARS[$image_column.'_'.$i])) {
              $search_words[$image_column] = stripslashes($HTTP_POST_VARS[$image_column.'_'.$i]);
            }
          }
          add_searchwords($image_id, $search_words);
After add:
Code: [Select]
if ($user_id != GUEST) {
            $sql = "UPDATE ".USERS_TABLE."
                    SET user_images = user_images+1
                    WHERE user_id = $user_id";
            $site_db->query($sql);
          }

10. File admin/validateimages.php
Find:
Code: [Select]
$search_words = array();Before add:
Code: [Select]
if ($user_id != GUEST) {
              $sql2 = "UPDATE ".USERS_TABLE."
                      SET user_images = user_images+1
                      WHERE user_id = $user_id";
              $site_db->query($sql2);
            }

11. File checkimages.php
Find:
Code: [Select]
$search_words = array();Before add:
Code: [Select]
if ($user_id != GUEST) {
            $sql = "UPDATE ".USERS_TABLE."
                    SET user_images = user_images+1
                    WHERE user_id = $user_id";
            $site_db->query($sql);
          }

12. Save this code as rank_install.php
Code: [Select]
<?php
define
('ROOT_PATH''./');
include(
ROOT_PATH.'config.php');
include(
ROOT_PATH.'global.php');

$sql_data "ALTER TABLE `".USERS_TABLE."` ADD `user_images` int(10) unsigned NOT NULL default '0' AFTER `user_comments`";
            
$site_db->query($sql_data);

$sql "SELECT user_id, COUNT(image_id) AS count
        FROM " 
IMAGES_TABLE "
        GROUP BY user_id"
;
$result $site_db->query($sql);
while(
$row $site_db->fetch_array($result))
{
  
$sql "UPDATE " USERS_TABLE "
          SET user_images = " 
$row['count'] . "
          WHERE user_id = " 
$row['user_id'];
  
$site_db->query($sql);
}
?>

Done.
Install it and delete from server.

That's all!

9
Mods & Plugins (Requests & Discussions) / Where to create new mod?
« on: December 25, 2008, 12:33:38 PM »
I'm don't understand: if I has a new MOD, can I create a new topic in "Mods & Plugins (Releases & Support)"???

10
I'm sorry!  :oops: This mod realy work!!!!  :roll:

BUT Some questions:

1) If I has subsubcategories, photos therefrom are not shown. Probably to correct it?
2) Can mod show photos from cat_master too? On a level with subcategories?
3) If I change a category on cat_master, and I come once again into options, is shown that cat_master it is not necessary. Each time to come in phpMyAdmin it is inconvenient
4) Whether it is possible to do cat_master at once at category creation?

If somebody answers at least one question, I will be grateful!  :wink: Thanks

11
So, is this impossible?

12
How to make a field "Description" obligatory for filling?

13
Mods & Plugins (Releases & Support) / Re: Answers in comments
« on: December 15, 2008, 12:18:55 PM »
People wish to communicate, but often pass answers to the comments. BECAUSE there are no notices  :(

14
Mods & Plugins (Releases & Support) / Re: Answers in comments
« on: December 12, 2008, 04:33:24 PM »
and like on youtube. yes.

15
Mods & Plugins (Releases & Support) / Re: Answers in comments
« on: December 10, 2008, 03:14:04 PM »
Something like on photosight.ru (for example)

V@no русский ты наш человек)) Спасибо за прошлую помощь. Пока ты тут, перехожу на русский. Вот смотри как на фотосайте например тут. в 7 и 9 комментарии. То есть например автор фотки может ответить на конкретный коммент. И получается градация некая...

Pages: [1] 2 3 4