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

Pages: [1] 2
1
Mods & Plugins (Releases & Support) / Re: [MOD] Votes saved in DB
« on: April 22, 2011, 03:35:45 PM »
Vano, hi.
Explain me pls, only votes of registred users save in DB? what about guests?
After cookie delete, every guest can vote again!

Теперь по-русски. Проблема такова, что действительно, после удаления кукисов возможность голосования остается у гостей (-1), и их голос не сохраняется в БД.
Что можно сделать с этим?

2
Hi all!
I have a trouble - when i upload thumb and media file, the script change automatic thumb file name as media file name.
but i need leave original thumb file name.
Can somebody help me fix this?
Thanx!

3
желательно общение на русском, если есть специалисты, пишите. Подробности будут.

4
Discussion & Troubleshooting / Rss in 1.7.7 has not thumbnails
« on: May 20, 2009, 02:12:17 PM »
In new version in Rss-feed thumbnails are not show if clicked on icon Rss on home page. All new images are show whithout thumbnails. But in detail page of image, it works. whats the problem?

5
thanks, everythink is OK! :D

6
to V@no -

how can paste two {news} ? - In this example, the conclusion is repeated 3 times. How best to make the templates that are not permanently embed the same code, and paste {name_of_template}

Code: [Select]
ob_start();

include(ROOT_PATH.'templates/test.html');
$test = ob_get_contents();


include(ROOT_PATH.'templates/test1.html');
$test1 = ob_get_contents();


ob_end_clean();
$site_template->register_vars("test", $test);
$site_template->register_vars("test1", $test1);

7
Code: [Select]
//Begin configuration:

$perpage = 6; //how many categories per page
$cat_text = "Found {total_cat_images} categories on {total_pages} page(s). Displayed category {first_page} to {last_page}";
$total_cat_images = 1;
//u can use those tags:
//{total_cat_images} - total categories
//{total_pages} - total pages
//{first_page} - displayed from (number first category displayed)
//{last_page} - displayed to (number last category displayed)
//End configuration

   
where to insert these tags?

8
Why can not I make the tags to the names? Help please!

Code: [Select]
function get_tag_clouds() {

  global $site_db, $site_sess, $lang;
 
  $output = "";
 
  $max_to_show = 100; // max items to display
  $max_size = 300; // max font size in %
  $min_size = 70; // min font size in %
  $max_qty = 0;
  $min_qty = 0;
 
  $sql = "SELECT image_id, image_name
          FROM ".IMAGES_TABLE."
          ORDER BY RAND()";
 
  $result = $site_db->query($sql);
 
  while ($row = $site_db->fetch_array($result)) {
  $tags_hits[$row['image_id']] = $row['image_name'];
$tags[$row['image_id']] = $row['image_name'];
  }
 
  $max_qty = max(array_values($tags_hits));
  $min_qty = min(array_values($tags_hits));
 
  // find the range of values
  $spread = $max_qty - $min_qty;
  if ($spread == 0) { // we don't want to divide by zero
  $spread = 1;
  }
       
  // set the font-size increment
  $step = ($max_size - $min_size) / ($spread);
  $i = 0;
  foreach ($tags as $key => $value) {
  if ((check_permission("auth_viewcat", $key)) && $i < $max_to_show)  {
  // calculate font-size
  // find the $value in excess of $min_qty
  // multiply by the font-size increment ($size)
  // and add the $min_size set above
  $size = round($min_size + (($tags_hits[$key] - $min_qty) * $step));
$css_color =  'rgb('.mt_rand(64,128).', '.mt_rand(64,128).', '.mt_rand(0,255).')';
  $output .= '&nbsp;<a href="'.$site_sess->url(ROOT_PATH."details.php?image_id=".$key).'" >'.$value.'</a>&nbsp;';

$i++;
}
}

  return $output;
}

9
Как поставить фильтр на категории? Если доступ к категории закрыт, то кликнув по тэгу из облака, все равно туда попадешь?

10
Plugins / Re: [PLUGIN] Batch Import From ZIP Files
« on: February 26, 2009, 11:01:04 AM »
Привет, спасибо за хороший и полезный модуль. Только вот проблема снова с кодировкой имен - вместо кириллицы крякозябры, можно это исправить?

11
Цифры убрал, от мода по поиска по цветам, только кирилицу выводить совсем не хочет флеш облако. Пустые ссылки крутятся... Что подправить, подскажите...

12
Как сделать страницы из вида article?id=1 в вид article1.htm? ТАк не получается?  :roll:

Code: [Select]
RewriteRule ^article\.htm$ article.php?%{QUERY_STRING}
RewriteRule ^article([0-9]*)$ article.php?id=$1&%{QUERY_STRING}

Code: [Select]
elseif (strstr($url, 'article.php'))
      {
        preg_match('#id=([0-9]+)&?#', $url, $matches);
        $url_id = "";
        if (isset($matches[1]))
        {
          $url_id = $matches[1];
        }
        $split = explode('?', $url);
        $url = $split[0];
        $query = @$split[1];
        $url   = str_replace('article.php', 'article'.$matches[1].'.htm', $url);
        $query = str_replace('id='.$url_id.'&', '', $query);
        $query = str_replace('&id='.$url_id, '', $query);
        $query = str_replace('id='.$url_id, '', $query);
       
        if (!empty($query)) {
            $url .= '?' . $query;
        }
        else {
          $url = str_replace('article.php', 'article.htm', $url);
         
        }
      }

13
Ясно, понял. Как поступить с категориями? Также?

Code: [Select]
$categories = mysql_query('SELECT cat_id, cat_name FROM ' . $table_prefix . 'categories' WHERE cat_id NOT IN (0,1,2,3)');
Еще возвращаясь к карте сайта, возможно ли там добавить к выводу не только категории, но и все картинки?

PS. У меня категория 0 есть, это мод, который делали на заказ отдельно. Он выводит к основной картинке дополнительные, которые появляются рядом, и дают увеличенный вид вместо основной без перезагрузки страницы. Так вот все эти картинки привязаны к 0 категории и к имени основной картинки. Из за этого яша дал кучу ошибок на на не существующие страницы, и выкинул из поиска....

если вам понадобится этот мод могу вам выслать  :wink:

14
что значит NOT IN (0,1,2,3)');?

Мне нужно не брать из категорий 0 и 7, а брать из 1,2,3,4,5,6.

ps V@no, СПАСИБО! Thanx, +1  :)

15
Кто нибудь может помочь мне?? Как исправить google.php, чтоб картинки не брались из категории 0?

PLEASE!!! :cry:

Pages: [1] 2