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

Pages: [1] 2
1
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

2
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

3
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;

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

5
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)"???

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

7
if at the user for example 10 comments - a rank "new", 20 - "starting" and so on. Too most by quantity of photos
Whether it is possible?

8
Whether it is possible, that users could answer concrete comments to a photo?
I'm need the following: that user could answer each other in comments to photos like on youtube





The answer and solution by alekinna here :
http://www.4homepages.de/forum/index.php?topic=23498.msg130641#msg130641

9
In my hosting is restrictions: 100 letters at an o'clock and 500 letters in day. What will do 4images if I will try to dispatch biggest quantity of letters? Whether they will be delivered later?

10
Mods & Plugins (Requests & Discussions) / 2 Random-images or more
« on: October 23, 2008, 06:23:45 PM »
How to make, that on pages was 2 and more random-photos?

11
In Russian there are two letters the difference in which is insignificant ("е" and "ё"). How by search to level one letter to another?

12
for watermarks I have found only this mod. But in it watermark it is added at loading of photos on a server. Whether probably to make so that watermark it was added only at a photo conclusion? (That is the file on a server did not change)
Whether it will strongly load the hosting processor?
Thanks



I will try to explain differently:
When the user requests a photo, only then starts to work script and temporarily adds to a photo watermark. Thus, at each inquiry to each photo the script temporarily adds watermark.

Such way just would allow to store photos on a server in an untouched kind, and also freely to change watermark at any moment.

13
Mods & Plugins (Requests & Discussions) / Search by categories?
« on: October 21, 2008, 08:00:22 PM »
I has in my gallery a lot of categories. And i'm need take, if user writing in SEARCH any name, search is conducted including on categories names. it is possible?

14
I have in the gallery many categories. And it is inconvenient to me to add new categories, as the list too big. Whether probably to make, to enter only ID categories (a subcategory, sorting...)?

15
Discussion & Troubleshooting / bag with russian comment
« on: November 28, 2006, 01:08:16 PM »
My site site in Russian. Earlier with addition of comments all was good. But now them for some reason began possible to add only in English. The coding windows-1251. Prompt what to do. Thanks!

Pages: [1] 2