• [MOD] Treat bots as users with less rights 3 0 5 1
Currently:  

Author Topic: [MOD] Treat bots as users with less rights  (Read 142587 times)

0 Members and 1 Guest are viewing this topic.

Offline Carpfish

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Carp-Photo-Portal
Re: [MOD] Treat bots as users with less rights
« Reply #75 on: August 27, 2009, 07:50:10 PM »
Mir ist gerade aufgefallen, das wenn man mit Google Translate auf meine Website geht wo der Mod Instaliert ist,  mann automatisch als googlbot angemeldet ist.
Das sollte aber nicht sein, so kann jeder der die seite übersetzt alles mögliche machen.
Kann mann was dagegen tun, oder habe ich was falsch gemacht.

Gruß Andy

I've just noticed that if you go with Google Translate on my website where the mod is instaled, man is automatically registered as a foot ball.
That should not be, so anyone can translate the page to do everything possible.
Man can do something about it, or what have I done wrong.

Gruß Andy

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Treat bots as users with less rights
« Reply #76 on: August 28, 2009, 01:55:44 AM »
replace
Code: [Select]
"Google" => "googlebot",

with:
Code: [Select]
"Googlebot" => "googlebot",
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Carpfish

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Carp-Photo-Portal
Re: [MOD] Treat bots as users with less rights
« Reply #77 on: August 28, 2009, 08:13:25 AM »
Thanks V@no ... :lol:

Offline zubair1

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: [MOD] Treat bots as users with less rights
« Reply #78 on: January 21, 2010, 07:37:46 PM »
Hi,

can some one please be kind enough to tell me if this mod is compatible with the latest version of 4images 1.7.7?

i have been trying to get this mod to work for hours but no luck.


everything goes well, i see the searchbots on my site appearing, but for some reason the conditions are not being met.

i did the 4.1. and 4.2 steps, but when i see the page as a googlebot it still shows me the Message that i wrote for non-Bot users which it shouldn't.

Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: page_header.php                                      *
 *        Copyright: (C) 2002-2009 Jan Sorgalla                           *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.7                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/
if (!defined('ROOT_PATH')) {
  die(
"Security violation");
}

// Cache Templates
/*$template_list = 'header,footer,category_dropdown_form,user_logininfo,user_loginform';
if (isset($templates_used) && $templates_used != "") {
  $template_list = $template_list.",".$templates_used;
}
$site_template->cache_templates($template_list);*/

//-----------------------------------------------------
//--- Register Global Vars ----------------------------
//-----------------------------------------------------
$total_images 0;
$total_categories 0;
$auth_cat_sql['auth_viewcat']['IN'] = 0;
$auth_cat_sql['auth_viewcat']['NOTIN'] = 0;

$cache_id create_cache_id(
  
'data.auth_and_info',
  array(
$user_info[$user_table_fields['user_id']])
);

if (!
$data get_cache_file($cache_idnull)) {
  if (!empty(
$cat_cache)) {
    foreach (
$cat_cache as $key => $val) {
      if (
check_permission("auth_viewcat"$key)) {
        
$total_categories++;
        if (isset(
$val['num_images'])) {
          
$total_images += $val['num_images'];
        }
        else {
          
$cat_cache[$key]['num_images'] = 0;
        }
        
$auth_cat_sql['auth_viewcat']['IN'] .= ", ".$key;
      }
      else {
        
$auth_cat_sql['auth_viewcat']['NOTIN'] .= ", ".$key;
      }
    }
  }

  
$data = array();

  
$data['total_images'] = $total_images;
  
$data['total_categories'] = $total_categories;
  
$data['auth_viewcat']['IN'] = $auth_cat_sql['auth_viewcat']['IN'];
  
$data['auth_viewcat']['NOTIN'] = $auth_cat_sql['auth_viewcat']['NOTIN'];

  
save_cache_file($cache_idserialize($data));

} else {
  
$data unserialize($data);

  
$total_images $data['total_images'];
  
$total_categories $data['total_categories'];
  
$auth_cat_sql['auth_viewcat']['IN'] = $data['auth_viewcat']['IN'];
  
$auth_cat_sql['auth_viewcat']['NOTIN'] = $data['auth_viewcat']['NOTIN'];
}

$file get_included_files();
$file get_file_name(basename($file[0]));
$list = array("categories""details""index""member""postcards""register""search""top");
$array = array();
foreach (
$list as $name)
{
  
$array[$name] = ($name == $file);
}
$site_template->register_vars($array);

$site_template->register_vars(array(
  
"home_url"  => ROOT_PATH,
  
"media_url" => MEDIA_PATH,
  
"thumb_url" => THUMB_PATH,
  
"icon_url" => ICON_PATH,
  
"template_url" => TEMPLATE_PATH,
  
"template_image_url" => TEMPLATE_PATH."/images",
  
"template_lang_image_url" => TEMPLATE_PATH."/images_".$config['language_dir'],
  
"site_name" => $config['site_name'],
  
"site_email" => $config['site_email'],
  
"user_loggedin" => ($user_info['user_level'] == GUEST || $user_info['user_level'] == USER_AWAITING) ? 1,
  
"user_loggedout" => ($user_info['user_level'] == GUEST || $user_info['user_level'] == USER_AWAITING) ? 0,
  
"is_admin" => ($user_info['user_level'] == ADMIN) ? 0,
  
"self" => $site_sess->url($self_url),
  
"self_full" => $site_sess->url($script_url."/".$self_url),
  
"script_version" => SCRIPT_VERSION,
  
"cp_link" => ($user_info['user_level'] != ADMIN) ? "" "\n<p align=\"center\">[<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php")."\">Admin Control Panel</a>]</p>\n",
  
"total_categories" => $total_categories,
  
"total_images" => $total_images,
  
"url_new_images" => $site_sess->url(ROOT_PATH."search.php?search_new_images=1"),
  
"url_top_images" => $site_sess->url(ROOT_PATH."top.php"),
  
"url_top_cat_images" => $site_sess->url(ROOT_PATH."top.php".(($cat_id && preg_match("/categories.php/"$self_url)) ? "?".URL_CAT_ID."=".$cat_id "")),
  
"url_register" => (!empty($url_register)) ? $site_sess->url($url_register) : $site_sess->url(ROOT_PATH."register.php"),
  
"url_search" => $site_sess->url(ROOT_PATH."search.php"),
  
"url_lightbox" => $site_sess->url(ROOT_PATH."lightbox.php"),
  
"url_control_panel" => (!empty($url_control_panel)) ? $site_sess->url($url_control_panel) : $site_sess->url(ROOT_PATH."member.php?action=editprofile"),
  
"url_categories" => $site_sess->url(ROOT_PATH."categories.php"),
  
"url_home" => $site_sess->url(ROOT_PATH."index.php"),
  
"url_login" => (!empty($url_login)) ? $site_sess->url($url_login) : $site_sess->url(ROOT_PATH."login.php"),
  
"url_logout" => (!empty($url_logout)) ? $site_sess->url($url_logout) : $site_sess->url(ROOT_PATH."logout.php"),
  
"url_member" => (!empty($url_member)) ? $site_sess->url($url_member) : $site_sess->url(ROOT_PATH."member.php"),
  
"url_upload" => (!empty($url_upload)) ? $site_sess->url($url_upload) : $site_sess->url(ROOT_PATH."member.php?action=uploadform"),
  
"url_lost_password" => (!empty($url_lost_password)) ? $site_sess->url($url_lost_password) : $site_sess->url(ROOT_PATH."member.php?action=lostpassword"),
  
"url_captcha_image" => $site_sess->url(ROOT_PATH."captcha.php"),
  
"thumbnails" => "",
  
"paging" => "",
  
"paging_stats" => "",
  
"has_rss" => false,
  
"rss_title" => "",
  
"rss_url" => "",
  
"copyright" => '
<p id="copyright" align="center">
  Powered by <b>4images</b> '
.SCRIPT_VERSION.'
  <br />
  Copyright &copy; 2002-'
.date('Y').' <a href="http://www.4homepages.de" target="_blank">4homepages.de</a>
</p>
'
,
));

if (!empty(
$additional_urls)) {
  
$register_array = array();
  foreach (
$additional_urls as $key => $val) {
    
$register_array[$key] = $site_sess->url($val);
  }
  
$site_template->register_vars($register_array);
}

// Replace Globals in $lang
$lang $site_template->parse_array($lang);

$site_template->register_vars(array(
  
"lang_site_stats" => $lang['site_stats'],
  
"lang_registered_user" => $lang['registered_user'],
  
"lang_random_image" => $lang['random_image'],
  
"lang_categories" => $lang['categories'],
  
"lang_sub_categories" => $lang['sub_categories'],
  
"lang_new_images" => $lang['new_images'],
  
"lang_top_images" => $lang['top_images'],
  
"lang_search" => $lang['search'],
  
"lang_advanced_search" => $lang['advanced_search'],
  
"lang_lightbox" => $lang['lightbox'],
  
"lang_register" => $lang['register'],
  
"lang_control_panel" => $lang['control_panel'],
  
"lang_login" => $lang['login'],
  
"lang_auto_login" => $lang['lang_auto_login'],
  
"lang_logout" => $lang['logout'],
  
"lang_lost_password" => $lang['lost_password'],
  
"lang_user_name" => $lang['user_name'],
  
"lang_password" => $lang['password'],
  
"lang_go" => $lang['go'],
  
"lang_images_per_page" => $lang['images_per_page'],
  
"charset" => $lang['charset'],
  
"direction" => $lang['direction']
));

//-----------------------------------------------------
//--- Category Dropdown -------------------------------
//-----------------------------------------------------

if (!$cache_enable) {
    
$category_dropdown_selfjump get_category_dropdown($cat_id1);
} else {
  
$cache_id create_cache_id(
    
'data.dropdown_selfjump',
    array(
      
$user_info[$user_table_fields['user_id']],
      
$config['template_dir'],
      
$config['language_dir']
    )
  );

  if (!
$category_dropdown_selfjump get_cache_file($cache_id)) {
    
// Always append session id if cache is enabled
    
$old_session_mode $site_sess->mode;
    
$site_sess->mode 'get';

    
// Set $cat_id to 0 to ensure that no category is selected
    
$category_dropdown_selfjump get_category_dropdown(01);

    
$site_sess->mode $old_session_mode;

    
save_cache_file($cache_id$category_dropdown_selfjump);
  }
}

$site_template->register_vars("category_dropdown_selfjump"$category_dropdown_selfjump);
unset(
$category_dropdown_selfjump);

// -------------------------------------
if (!$cache_enable) {
    
$category_dropdown_form $site_template->parse_template("category_dropdown_form");
} else {
  
$cache_id create_cache_id(
    
'data.dropdown_form',
    array(
      
$user_info[$user_table_fields['user_id']],
      
// $cat_id, // uncomment if the current category should be selected, will increase the number of cache files
      
$config['template_dir'],
      
$config['language_dir']
    )
  );

  if (!
$category_dropdown_form get_cache_file($cache_id)) {
    
// Always append session id if cache is enabled
    
$old_session_mode $site_sess->mode;
    
$site_sess->mode 'get';

    
$category_dropdown_form $site_template->parse_template("category_dropdown_form");

    
$site_sess->mode $old_session_mode;

    
save_cache_file($cache_id$category_dropdown_form);
  }
}

$site_template->register_vars("category_dropdown_form"$category_dropdown_form);
unset(
$category_dropdown_form);

//-----------------------------------------------------
//--- Random Image ------------------------------------
//-----------------------------------------------------
$random_image = (defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == 0) ? "" get_random_image();
$site_template->register_vars("random_image"$random_image);
unset(
$random_image);

//-----------------------------------------------------
//--- Set Paging Vars ---------------------------------
//-----------------------------------------------------
if (isset($HTTP_POST_VARS['setperpage'])) {
  
$setperpage intval($HTTP_POST_VARS['setperpage']);
  if (
$setperpage) {
    
$site_sess->set_session_var("perpage"$setperpage);
    
$session_info['perpage'] = $setperpage;
  }
}

if (isset(
$session_info['perpage'])) {
  
$perpage $session_info['perpage'];
}
else {
  
$perpage ceil($config['default_image_rows'] * $config['image_cells']);
}

//-----------------------------------------------------
//--- Set Perpage Dropdown ----------------------------
//-----------------------------------------------------
$setperpage_dropdown "\n<select onchange=\"if (this.options[this.selectedIndex].value != 0 && typeof forms['perpagebox'] != 'undefined'){ forms['perpagebox'].submit() }\" name=\"setperpage\" class=\"setperpageselect\">\n";
for(
$i 1$i <= $config['custom_row_steps']; $i++) {
  
$setvalue $config['image_cells'] * $i;
  
$setperpage_dropdown .= "<option value=\"".$setvalue."\"";
    if (
$setvalue == $perpage) {
    
$setperpage_dropdown .= " selected=\"selected\"";
  }
  
$setperpage_dropdown .= ">";
  
$setperpage_dropdown .= $setvalue;
  
$setperpage_dropdown .= "</option>\n";
}
$setperpage_dropdown .= "</select>\n";
if (
$cat_id != 0) {
  
$setperpage_dropdown .= "<input type=\"hidden\" name=\"cat_id\" value=\"".$cat_id."\" />\n";
}
if (isset(
$show_result) && $show_result == 1) {
  
$setperpage_dropdown .= "<input type=\"hidden\" name=\"show_result\" value=\"1\" />\n";
}
$site_template->register_vars("setperpage_dropdown"$setperpage_dropdown);
$setperpage_dropdown_form $site_template->parse_template("setperpage_dropdown_form");
$site_template->register_vars("setperpage_dropdown_form"$setperpage_dropdown_form);

$site_template->un_register_vars("setperpage_dropdown");
unset(
$setperpage_dropdown);
unset(
$setperpage_dropdown_form);

//-----------------------------------------------------
//--- Add & Delete from Lists -------------------------
//-----------------------------------------------------
if ($action == "addtolightbox" && $id) {

$usergroups = array(); // [MOD] Treat bots as users with less rights

// [MOD] Treat bots as users with less rights
  
if ($user_info['user_level'] >= USER) {

  
$current_time time();
  
$sql "SELECT group_id  
          FROM "
.GROUP_MATCH_TABLE."
          WHERE user_id = "
.$user_info['user_id'].
          AND groupmatch_startdate <= 
$current_time 
          AND (groupmatch_enddate > 
$current_time OR groupmatch_enddate = 0)";
  
$result $site_db->query($sql);

  while (
$row $site_db->fetch_array($result)) {
    
$usergroups[$row['group_id']] = true;
  }
// END [MOD] Treat bots as users with less rights

    
$msg = (add_to_lightbox($id)) ? $lang['lightbox_add_success'] : $lang['lightbox_add_error'];
  }
  else {
    
$msg $lang['lightbox_register'];
  }
}
if (
$action == "removefromlightbox" && $id) {

$usergroups = array(); // [MOD] Treat bots as users with less rights

  
if ($user_info['user_level'] >= USER) {

// [MOD] Treat bots as users with less rights
  
$current_time time();
  
$sql "SELECT group_id  
          FROM "
.GROUP_MATCH_TABLE."
          WHERE user_id = "
.$user_info['user_id'].
          AND groupmatch_startdate <= 
$current_time 
          AND (groupmatch_enddate > 
$current_time OR groupmatch_enddate = 0)";
  
$result $site_db->query($sql);

  while (
$row $site_db->fetch_array($result)) {
    
$usergroups[$row['group_id']] = true;
  }
// END [MOD] Treat bots as users with less rights

    
$msg = (remove_from_lightbox($id)) ? $lang['lightbox_remove_success'] : $lang['lightbox_remove_error'];
  }
  else {
    
$msg $lang['lightbox_register'];
  }
}
if (
$action == "clearlightbox") {

$usergroups = array(); // [MOD] Treat bots as users with less rights

  
if ($user_info['user_level'] >= USER) {

// [MOD] Treat bots as users with less rights
  
$current_time time();
  
$sql "SELECT group_id  
          FROM "
.GROUP_MATCH_TABLE."
          WHERE user_id = "
.$user_info['user_id'].
          AND groupmatch_startdate <= 
$current_time 
          AND (groupmatch_enddate > 
$current_time OR groupmatch_enddate = 0)";
  
$result $site_db->query($sql);

  while (
$row $site_db->fetch_array($result)) {
    
$usergroups[$row['group_id']] = true;
  }
// END [MOD] Treat bots as users with less rights

    
$msg = (clear_lightbox()) ? $lang['lightbox_delete_success'] : $lang['lightbox_delete_error'];
  }
  else {
    
$msg $lang['lightbox_register'];
  }
}

//-----------------------------------------------------
//--- Save Rating -------------------------------------
//-----------------------------------------------------
if ($action == "rateimage" && $id) {
  
$rating intval($HTTP_POST_VARS['rating']);
  
$cookie_name = (defined("COOKIE_NAME")) ? COOKIE_NAME "4images_";
  
$cookie_rated = isset($HTTP_COOKIE_VARS[$cookie_name.'rated']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name.'rated'])) : array();
  if (
$rating && $rating <= MAX_RATING && $id) {
    if (!isset(
$session_info['rated_imgs'])) {
      
$session_info['rated_imgs'] = $site_sess->get_session_var("rated_imgs");
    }
    
$split_list = array();
    if (!empty(
$session_info['rated_imgs'])) {
      
$split_list explode(" "$session_info['rated_imgs']);
    }
    if (!
in_array($id$split_list) && !in_array($id$cookie_rated)) {
      
$session_info['rated_imgs'] .= " ".$id;
      
$session_info['rated_imgs'] = trim($session_info['rated_imgs']);
      
$site_sess->set_session_var("rated_imgs"$session_info['rated_imgs']);
      
$cookie_rated[] = $id;
      
$cookie_expire time() + 60 60 24 4;
      
setcookie($cookie_name.'rated'serialize($cookie_rated), $cookie_expireCOOKIE_PATHCOOKIE_DOMAINCOOKIE_SECURE);
      
update_image_rating($id$rating);
      
$msg $lang['voting_success'];
    }
    else {
      
$msg $lang['already_voted'];
    }
  }
  else {
    
$msg $lang['voting_error'];
  }
}

// [MOD] Treat bots as users with less rights
$site_template->register_vars(array(
"is_bot" => (isset($usergroups[7])) ? 0
));
// END [MOD] Treat bots as users with less rights

//-----------------------------------------------------
//--- User Box ----------------------------------------
//-----------------------------------------------------

$usergroups = array(); // [MOD] Treat bots as users with less rights

if ($user_info['user_level'] >= USER) {

// [MOD] Treat bots as users with less rights
  
$current_time time();
  
$sql "SELECT group_id  
          FROM "
.GROUP_MATCH_TABLE."
          WHERE user_id = "
.$user_info['user_id'].
          AND groupmatch_startdate <= 
$current_time 
          AND (groupmatch_enddate > 
$current_time OR groupmatch_enddate = 0)";
  
$result $site_db->query($sql);

  while (
$row $site_db->fetch_array($result)) {
    
$usergroups[$row['group_id']] = true;
  }
// END [MOD] Treat bots as users with less rights

  
$site_template->register_vars("lang_loggedin_msg"preg_replace("/".$site_template->start."loggedin_user_name".$site_template->end."/siU"format_text($user_info['user_name'], 2), $lang['lang_loggedin_msg']));
  
$user_box $site_template->parse_template("user_logininfo");
  
$site_template->register_vars(array(
    
"user_box" => $user_box,
    
"user_loggedin" => 1,
    
"user_loggedout" => 0,
    
"is_admin" => ($user_info['user_level'] == ADMIN) ? 0
  
));
  
$site_template->un_register_vars("user_logininfo");
  unset(
$user_box);
}
else {
  
$user_box $site_template->parse_template("user_loginform");
  
$site_template->register_vars(array(
    
"user_box" => $user_box,
    
"user_loggedin" => 0,
    
"user_loggedout" => 1,
    
"is_admin" => 0
  
));
  
$site_template->un_register_vars("user_loginform");
  unset(
$user_box);
}

$site_template->register_vars(array(
  
"lang_keyword" => $lang['keywords'], //---[/[MOD] Tag Clouds]
  
"show_tag_clouds" => get_tag_clouds() //---[/[MOD] Tag Clouds]
));


//---------------------------------------------------------------------------------------------
//---- My-Templates left_sidebar.html 
//---------------------------------------------------------------------------------------------
$left_sidebar $site_template->parse_template("left_sidebar");
  
$site_template->register_vars(array(
    
"left_sidebar" => $left_sidebar
  
));
  unset(
$left_sidebar);
?>

in my templates i tried writting like this:
{ifnot is_bot}
This will not appear for the searchbots...
{endifnot is_bot}

and like this too
{ifno is_bot}
This will not appear for the searchbots...
{endifno is_bot}

I would appreciate if some one could help me out here.

Thank you

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Treat bots as users with less rights
« Reply #79 on: January 21, 2010, 07:58:05 PM »
... are you logged in as a bot (with bot-name and bot-password), to see what is hidden ... ?
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline zubair1

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: [MOD] Treat bots as users with less rights
« Reply #80 on: January 21, 2010, 08:01:37 PM »
Yes, i tried logging in as a bot but isn't working.

I also tried that User Agent Switcher, it automatically detects the agent and assigns me the user/pass.

I tried it both ways :(

[EDIT]
i don't know if this will help or not, but earlier i tried this.

{ifnot is_admin}
Show This if not an admin
{endifnot is_admin}

and it work, i think its not getting the usergroup id (is_bot doesn't work for it) for some reason, i dont know what can be wrong here, too confused. :(

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Treat bots as users with less rights
« Reply #81 on: January 22, 2010, 02:00:59 AM »
Yes, i tried logging in as a bot but isn't working.

... the loggin isn't working ... ?
... if so ... do you have created the bot as user incl. password (the same as in sessions.php) via your ACP ... ?
... and if you have ... then the loggin must work ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline zubair1

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: [MOD] Treat bots as users with less rights
« Reply #82 on: January 22, 2010, 03:31:31 AM »
I have created the users with the password.

I can login as the bot, but the conditions don't meet.

I still the see the bot message which i am not suppose to see - thats whats happening wrong on my part.

[Edit]

Not Sure if this will help but i have these MODS installed - SEO Mod, Google Sitemap, Annotation, Multi download, searchstats and Tag Clouds.

I just tried to put this in my template.

Quote
{if is_bot}
This will only appear for the searchbots...
{endif is_bot}

and Nothing shows up either if i'm logged in as a admin or a searchbot.

Any Help would be appreicated.
« Last Edit: January 22, 2010, 09:11:06 PM by zubair1 »

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [MOD] Treat bots as users with less rights
« Reply #83 on: August 07, 2010, 08:33:33 PM »
what does a bot do exactly, is this MOD important???? im very interested to know , but google is not helpful. So what happens if i dont install this MOD who bots hack me>??

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Treat bots as users with less rights
« Reply #84 on: August 07, 2010, 08:37:37 PM »
This is about search engine bots, you know the "crawlers" that index websites. Nothing to do with hacking bots.

By default bots crawl your site as guests, with this mod they will be able crawl as members.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [MOD] Treat bots as users with less rights
« Reply #85 on: August 07, 2010, 09:06:43 PM »
oooooooooo ok i seee, im sorry this might be a stupid question and please tell me if i am being dum but why would a person want to know if a bot is regarding as a member, dont bots just crawl websites for information?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Treat bots as users with less rights
« Reply #86 on: August 08, 2010, 12:35:16 AM »
dont bots just crawl websites for information?
Yes they do, and that is exactly the reason why some galleries allow them crawl as members - because they will see more information then guests (permissions, permissions, permissions) :D
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline alekseyn1

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • My Project
Re: [MOD] Emergency ! Redirect Loop! Please help V@no
« Reply #87 on: February 21, 2011, 11:30:51 AM »
I downloaded the old version of firefox you recommended, and followed the steps provided to check what my site should look like to a robot. I followed your steps in this thread and the thread to not issue a session id. When I set the user agent as one that matched the ones in the bot list I get a redirect error in firefox!!!!

This must be why google can not index my site!

If I disable cookies and change user agent to something not listed in the bot list It will work without cookies....

I have begged google to reconsider my site and recieved confirmation they were going to try to reindex it...

But now I realize that they will only get a redirect loop error!!!!!


ARRRGGGHH?>?> I am so close to being finished that I can actually care about doing the photography and try to make a little money to feed my family and pay for a liscense :)


Can you please help me?"??
to be specific, the error in firefox says
Quote
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

AND [bold] I have disabled all robots in the list except "FAST-WebCrawler" => "searchbot", to keep search bots from being turned around until I can figure this out[/bold]

Well, I finally resolved (kinda) this problem.... Although I am not on this forum bridge, but on the phpBB3 bridge, I had the same problem. The problem was that every search bot that came to site, was properly identified by the forum and a special username was assigned to the bot... and this was confusing 4images.... ohhh man, I spent hour and hours trying to figure out why Google was not able to see my 4images installation.... so finally I have disabled Search Bot identification in my phpBB and it WORKED!! I suggest you dig throgh the settings and disable treating search bots as users within the forum.. I am sure it will fix your issue too...

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: [MOD] Treat bots as users with less rights
« Reply #88 on: June 13, 2011, 12:44:27 AM »
For me tags {ifno is_bot} ... {endifno is_bot} - not worked.

My solution:

In my html i`ve added next:

<?php global $user_info; if ($user_info['user_name'] < searchbot) { ?>TEXT, WHICH I WANT TO HIDE<?php ?>

All bots names is searchbot!

Work fine for me! ;-)

Offline wallward

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: [MOD] Treat bots as users with less rights
« Reply #89 on: December 30, 2013, 07:24:35 PM »
{ifno is_bot} ... {endifno is_bot}
and
{ifnot is_bot} ... {endifnot is_bot}

not work in 1.7.10 and 1.7.11
please help me to solved this