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(
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.
http://www.geo-photo.ru/data/media/833/Picture_219.jpg
How can I do this? I need insert this address to page. $additional_user_fields['admin_text'] = array($lang['admin_text'], "text", 0);
$lang['admin_text'] = "Personal rank: ";
{lang_admin_text}
{admin_text}
*You are can use {if admin_text} and {endif admin_text}{if admin_text}
{lang_admin_text}{admin_text}
{endif admin_text}
$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name,
add in this line:u.admin_text,
$admin_links = "";
before add:$admin_text = $comment_row[$i]['admin_text'];
"comment_user_info" => $comment_user_info,
after add:"admin_text" => $admin_text,
"lang_admin_text" => $lang['admin_text'],
ALTER TABLE `4images_users` ADD `admin_text` TEXT NOT NULL;
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;
}
}
$lang['rank'] = "Rank:";
$lang['commentator'] = "commentator";
$lang['photographer'] = "photographer";
$lang['passive'] = "Passive ";
$lang['beginner'] = "Beginner ";
$lang['active'] = "Active ";
$lang['super'] = "Super ";
$lang['mega'] = "Mega ";
$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:$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")."
$comment_user_ip = ($user_info['user_level'] == ADMIN) ? $comment_row[$i]['comment_ip'] : "";
before this add:$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;
}
$site_template->register_vars(array(
"comment_id" => $comment_row[$i]['comment_id'],
"comment_user_id" => $comment_user_id,
"rank" => $rank,
"lang_rank" => $lang['rank'],
{if rank}
<b>{lang_rank}</b><br />
{rank}<br />
{endif rank}
$del_img = $site_db->query($sql);
After add:$sql2 = "UPDATE ".USERS_TABLE."
SET user_images = user_images-1
WHERE user_id = ".$image_row['user_id']."";
$site_db->query($sql2);
$image_id = $site_db->get_insert_id();
if ($result) {
After add: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);
}
$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: $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,
$sql = "SELECT image_id
2 times replace:$sql = "SELECT image_id, user_id
$image_ids_sql .= (($image_ids_sql != "") ? ", " : "").$image_row['image_id'];
2 times after add: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);
}
$sql = "DELETE FROM ".IMAGES_TABLE."
WHERE image_id = ".$image_row['image_id'];
if ($site_db->query($sql)) {
After add: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);
}
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:if ($user_id != GUEST) {
$sql = "UPDATE ".USERS_TABLE."
SET user_images = user_images+1
WHERE user_id = $user_id";
$site_db->query($sql);
}
$search_words = array();
Before add:if ($user_id != GUEST) {
$sql2 = "UPDATE ".USERS_TABLE."
SET user_images = user_images+1
WHERE user_id = $user_id";
$site_db->query($sql2);
}
$search_words = array();
Before add:if ($user_id != GUEST) {
$sql = "UPDATE ".USERS_TABLE."
SET user_images = user_images+1
WHERE user_id = $user_id";
$site_db->query($sql);
}
<?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.