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 - ~Ally~

Pages: [1]
1
Discussion & Troubleshooting / Re: Subcategory Dropdown Problem
« on: March 10, 2006, 03:34:08 PM »
I have the same problem.

I reuploaded fresh 1.7.2  admin/categories.php file but the problem persisted.
I uploaded 1.7.1 file and the problem went away.


2
thanks, I hope it helps with server strain a little :)

3
I noticed that even with the lightbox disabled (button deleted, lightbox.php deleted) the database is still being updated every single time a member logs in. Can this code be removed without messing up something else? My database is using too much RAM so I'm trying everything I can to cut back.

There is code on the following pages, at least:
details.php
Code: [Select]
//-----------------------------------------------------
//--- Show Image --------------------------------------
//-----------------------------------------------------
$image_allow_comments = (check_permission("auth_readcomment", $cat_id)) ? $image_row['image_allow_comments'] : 0;
$image_name = htmlspecialchars($image_row['image_name']);
show_image($image_row, $mode, 0, 1);

$in_mode = 0;

$sql = "";
if ($mode == "lightbox") {
  if (!empty($user_info['lightbox_image_ids'])) {
    $image_id_sql = str_replace(" ", ", ", trim($user_info['lightbox_image_ids']));
    $sql = "SELECT image_id, cat_id, image_name, image_media_file, image_thumb_file
            FROM ".IMAGES_TABLE."
            WHERE image_active = 1 AND image_id IN ($image_id_sql) AND (cat_id NOT IN (".get_auth_cat_sql("auth_viewimage", "NOTIN").") AND cat_id NOT IN (".get_auth_cat_sql("auth_viewcat", "NOTIN")."))
            ORDER BY ".$config['image_order']." ".$config['image_sort'];
    $in_mode = 1;
  }
}



//-----------------------------------------------------
//---Clickstream---------------------------------------
//-----------------------------------------------------
$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];

if ($mode == "lightbox" && $in_mode) {
  $page_url = "";
  if (preg_match("/".URL_PAGE."=([0-9]+)/", $url, $regs)) {
    if (!empty($regs[1]) && $regs[1] != 1) {
      $page_url = "?".URL_PAGE."=".$regs[1];
    }
  }

index.php
Code: [Select]
$cache_id = create_cache_id(
  'cat.page.index',
  array(
    $user_info[$user_table_fields['user_id']],
    isset($user_info['lightbox_image_ids']) ? substr(md5($user_info['lightbox_image_ids']), 0, 8) : 0,
    $config['template_dir'],
    $config['language_dir']
  )
);


categories.php
Code: [Select]
$cache_id = create_cache_id(
  'cat.page.categories',
  array(
    $user_info[$user_table_fields['user_id']],
    $cat_id,
    $page,
    $perpage,
    isset($user_info['lightbox_image_ids']) ? substr(md5($user_info['lightbox_image_ids']), 0, 8) : 0,
    $config['template_dir'],
    $config['language_dir']
  )
);

4
Thanks. I'm actually using 1.7.1 but I checked my files and categories.php did not have that modifications for some reason. I hope this helps a bit.

5
Does anyone know of ways you can optimize 4images memory/RAM usage and database queries?

I've already turned off random images and installed the bot ban mod.

If there's like, a posted list somewhere of tips that would be much appreciated.

6
Thank you SO much. I am hoping that this mod will help with the HUGE amount of RAM used up by my galley. .htaccess bans do not work anymore for bots so I'm hoping this will. thank you!

Pages: [1]