Перейти к публикации

mr.8pa4

местные
  • Публикации

    62
  • Зарегистрирован

  • Посещение

Сообщения, опубликованные пользователем mr.8pa4

  1. если .. да кобы .. щас идёт разговор о том что нужно ..

    зачем при наличии ID вставлять латинский {title} в урл статьи .. смысл ... всёравно все статьи .. если и яндекс аналитик или гугл смотрят по титлу внутренниму и тегам а не по урлу ... ур можит быть и баба_галя а там про помидоры

    и почему все хотят убрать именно id из новостного url

    когда как мне (может я не прав) проще было бы не видеть {title} в url

    • Поддерживаю 1
  2. /index.php?newsid=1683

    это не то ... я о том чтобы было так (к примеру)

    /1743.html или /1743 или /1743/

    чтобы не вставляло ЧПУ URL статьи:

    а статья определялась и имела переход по одному ID , так как в таких URL мало смысла

    пример таких урлов

    http://www.kinopoisk.../1/film/491724/

    всяко лучше смотрится чем

    /1750-sekretnaya-sluzhba-santy-shaluny-protiv-poslushnyh-prep-and-landing-naughty-vs-nice.html

  3. Подскажите а кто нибудь, встречал хак полностью противоположный этому .. чтобы убрать заголовок поста и оставить только ID ?

    Заранее спасибо.

  4. можно было бы. добавить у каждого пользователя такой пункт. (если разрешил сам пользователь) просматривать его закладки

    чем плохо .. ведь просматривать ленту публикаций можно .. коментов тоже ...

    так что (я так думаю) для определённых проектов-сайтов очень хорошая вещь

  5. сайта в сетевой локации

    лицензия http://dle-news.ru/user/mr.8pa4/

    есть модуль вывода популярных новостей из определённой категории ... сам работает отлично ... только вот одно но

    вставляю дополнительное поле (в нём картинка) путь к ней пишется но каряво

    вставляет " как это исправить ? ... заранее спасибо.

    <img src=""http://сайт.b...4581_419633.jpg"" border=""0"" width=""120"" height=""170"" tooltip=""{title}"">

    УСТАНОВКА:

    1.) Открываем файл /engine/cache/.htaccess и заменяем две написанных там строчки на:

    Order Deny,Allow

    #Deny from all

    <Files *.tmp>

    Deny from all

    </Files>

    <Files ".(jpg|gif|png)$">

    Allow from all

    </Files>

    2.) Создаём файл films_top.php записываем в него ниже написанное и загружаем engine/modules на сервер .

    МОДУЛЬ:

    <?php
    if ( ! defined('DATALIFEENGINE') ) {
    die( "Hacking attempt!" );
    }
    ------------------------------------------*/
    /****************** НАСТРОЙКИ МОДУЛЯ *************************/
    //----------------------------------------//
    //!!!!!ОБЯЗАТЕЛЬНАЯ ПЕРЕМЕННАЯ УКАЗЫВАЕМАЯ В СТРОКЕ ПОДКЛЮЧЕНИЯ!!!!(для кеширования каждого блока в отдельности) &block_num=1 - число или текст, особой разницы нет, главное что бы было уникально для каждого блока, из значения этой же переменной будет составляться id блока с новостями.
    //----------------------------------------//
    if(!is_numeric($day)) $day = 7; //Временной период для отбора новостей (дни). Например если нужно вывести новости за неделю - укажите 7.
    if(!is_string($top_cat)) $top_cat = "14"; //Категории, из которых брать новости.(перечислять через чёрточку).
    if(!is_numeric($news_num)) $news_num = 30; //Сколько будем брать новостей для топа.
    if(!is_string($top_field)) $top_field = "mini_poster"; //Указываем тут имя дополнительного поля, из которого будет выводиться ссылка на картинку (или ещё чтонибудь).
    if(!is_string($showcomments)) $showcomments = ""; //Показывать количество комментариев к новости.
    if(!is_numeric($title_length)) $title_length = 300; //Кол-во символов в заголовке
    if(!is_numeric($story_length)) $story_length = 0; //Кол-во символов в описании
    if(!is_string($img_show)) $img_show = ""; //Если поставить yes - будет брать картинку из новости. Если не нужна оставить пустым.
    if(!is_numeric($t_img_w)) $t_img_w = 120; //Ширина картинки
    if(!is_numeric($t_img_h)) $t_img_h = 170; //Высота картинки

    //Строка подключения модуля может выглядить примерно вот так ... где &block_num=1 это уникальное значение для переменной block_num, цифры или буквы, разницы нет. {include file="engine/modules/films_top.php?&block_num=1"}

    /*************Дальше не нужно ничего трогать *****************/
    $config['allow_cache'] = "yes";
    $adv_top = dle_cache("adv_top_".$block_num, $config['skin']);
    if( !$adv_top ) {
    //начало кода модуля
    $tooday = date ('Y-m-d H:i:s', $_TIME); //Определяем сегодняшний день
    $news_day = " AND date <= '$tooday'"; //Запрет вывода новости на не наступившую дату.
    if ($day) $news_day .= "AND date > '$tooday' - INTERVAL {$day} DAY"; //Если задан параметр $day - берём новости за указанный промежуток


    $top_categ = str_replace('-', '|', $top_cat); //заменяем чёрточки на палочки :-)
    $show_cat = ""; //По умолчанию выводим все категории
    if ($top_cat) $show_cat = "AND category regexp '[[:<:]]($top_categ)[[:>:]]'"; //Если задан параметр $top_cat - берём новости только из определённых категорий
    $tb = $db->query("SELECT id, category, title, short_story, xfields, comm_num, date, flag, alt_name FROM ".PREFIX."_post WHERE approve {$show_cat} {$news_day} ORDER BY rating DESC, comm_num DESC, news_read DESC, date DESC LIMIT 0,".$news_num);
    while ($row = $db->get_row($tb)) {
    $t_comm_num =""; //по умолчанию не выводим информацию о количестве комментариев
    if ($showcomments) {$t_comm_num = '('.$row['comm_num'].')';} //Если задан параметр $showcomments - показываем в скобках кол-во комментариев к новости
    //обработка допполей ->

    $xf_t_val = "";
    if ($top_field){
    $xfieldsdata = xfieldsdataload( $row['xfields'] );
    $xf_t_val = $xfieldsdata[''.$top_field.''];
    }
    // <- обработка допполей

    $t_title = stripslashes($row['title']);
    $full_title = $t_title;
    if( strlen( $t_title ) > $title_length ) $t_title = substr( $t_title, 0, $title_length ) . " ..."; //--обрезка заголовка
    $t_story = strip_tags(str_replace(array('<br>','<br />')," ",$row['short_story'])); //-- замена переносов на пробелы
    if( strlen( $t_story ) > $story_length ) $t_story = substr( $t_story, 0, $story_length ) . " ..."; //--обрезка содержания
    //формирование ссылки на новость ->

    $row['category'] = intval( $row['category'] );
    if( $config['allow_alt_url'] == "yes" ) {
    if( $row['flag'] and $config['seo_type'] ) {
    if( $row['category'] and $config['seo_type'] == 2 ) {
    $t_link = $config['http_home_url'] . get_url( $row['category'] ) . "/" . $row['id'] . "-" . $row['alt_name'] . ".html";
    } else {
    $t_link = $config['http_home_url'] . $row['id'] . "-" . $row['alt_name'] . ".html";
    }
    } else {
    $t_link = $config['http_home_url'] . date( 'Y/m/d/', $row['date'] ) . $row['alt_name'] . ".html";
    }
    } else {
    $t_link = $config['http_home_url'] . "index.php?newsid=" . $row['id'];
    }
    // < - формирование ссылки на новость
    $image = ""; //по умолчанию не выводим картинку
    if ($img_show) { //Если задан параметр $img_show - будет браться первая картинка из shortstory и обрезаться через crop до заданных размеров
    preg_match("#<img.+?src=['\"](.+?)[']#is", $row['short_story'], $match);

    if($match[1]){
    $dir = ROOT_DIR . '/engine/cache/';
    $file_name = strtolower ( basename ( $match[1] ));
    $file_name = $t_img_w."x".$t_img_h."_".$file_name;
    if (!file_exists($dir.$file_name)) {
    require_once ENGINE_DIR . '/classes/thumb.class.php';
    $thumb = new thumbnail( $match[1] );
    $thumb->crop( $t_img_w, $t_img_h );
    $thumb->save( $dir . $file_name );
    }
    $image = '<div class="t_image"><img src="'.$config['http_home_url']."engine/cache/".$file_name.'" alt="'.$ttl.'" /></div>';
    }else $image = '<div class="t_image"><img src="{THEME}/images/nothumb.gif" alt="'.$ttl.'" width="'.$t_img_w.'" height="'.$t_img_h.'" /></div>'; //Если в новости нет картинки - будет выводиться "заглушка"
    }

    $top_adv .= $image.'<div class="t_news"><h5><a href="'.$t_link.'" title="'.$full_title.'">'.$t_title.'</a> '.$t_comm_num.'</h5><div class="t_story">'.$t_story.'</div>'.$xf_t_val.'</div>';
    };
    if ($top_adv == "") {
    $adv_top = '<div id="top_block_'.$block_num.'">По указанному критерию материалов нет</div>'; //Если по заданным критериям нет ни одной новости - будет выведено это сообщение.
    }
    else {
    $adv_top = '<div id="top_block_'.$block_num.'">'.$top_adv.'</div>';
    }
    create_cache("adv_top_".$block_num, $adv_top, $config['skin'] );
    }
    echo $adv_top;
    ?>[/php]

  6. спс

    осталось проверить .. .. я просто уже на столько пере ковырял ДЛЕ .. что ..там чёрт ногу сломает )

    вот вопрос всёравно остался .. а какие именно менять . файлы ...

    если кто не верит что я на честных правах .. то вот http://dle-news.ru/user/mr.8pa4/

  7. Всем здравствуйте ... я вот что хочу спросить ... есть ли такой мод или хак, чтобы (к примеру) в админке я ставил слово и к нему ссылка, пример (кино .... http://блаблабла/kino/) и во всех постах где будет встречаться слово кино, оно автоматом генерировала ссылку.

    если есть такое или похожее отпишите, заранее СПАСИБО.

  8. 1312690443_8pa4.nbr.by-screen-capture-2011-8-7-7-12-0.png

    Заливаем файлы киномода в engine/modules

    Делаем запрос...

    ALTER TABLE `dle_post` ADD `year` VARCHAR( 5 ) NOT NULL ,

    ADD `country` VARCHAR( 225 ) NOT NULL ,

    ADD `genre` TEXT NOT NULL ,

    ADD `datex` TEXT NOT NULL ,

    ADD `director` TEXT NOT NULL ,

    ADD `producer` TEXT NOT NULL ,

    ADD `actors` TEXT NOT NULL;

    1. В корне открываем .htacess и находим:

    # Редиректы

    RewriteRule ^page/(.*)$ index.php?cstart=$1 [L]

    Ниже вставляем

    # Киномод

    RewriteRule ^year/([0-9]+)(/?)+$ index.php?do=year&year=$1 [L]

    RewriteRule ^year/([0-9]+)/page/([0-9]+)(/?)+$ index.php?do=year&year=$1&cstart=$2 [L]

    RewriteRule ^country/([^/]*)(/?)+$ index.php?do=country&country=$1 [L]

    RewriteRule ^country/([^/]*)/page/([0-9]+)(/?)+$ index.php?do=country&country=$1&cstart=$2 [L]

    RewriteRule ^genre/([^/]*)(/?)+$ index.php?do=genres&genre=$1 [L]

    RewriteRule ^genre/([^/]*)/page/([0-9]+)(/?)+$ index.php?do=genres&genre=$1&cstart=$2 [L]

    RewriteRule ^datex/([^/]*)(/?)+$ index.php?do=datexs&datex=$1 [L]

    RewriteRule ^datex/([^/]*)/page/([0-9]+)(/?)+$ index.php?do=datexs&datex=$1&cstart=$2 [L]

    RewriteRule ^director/([^/]*)(/?)+$ index.php?do=directors&director=$1 [L]

    RewriteRule ^director/([^/]*)/page/([0-9]+)(/?)+$ index.php?do=directors&director=$1&cstart=$2 [L]

    RewriteRule ^producer/([^/]*)(/?)+$ index.php?do=producers&producer=$1 [L]

    RewriteRule ^producer/([^/]*)/page/([0-9]+)(/?)+$ index.php?do=producers&producer=$1&cstart=$2 [L]

    RewriteRule ^cast/([^/]*)(/?)+$ index.php?do=actors&actor=$1 [L]

    RewriteRule ^cast/([^/]*)/page/([0-9]+)(/?)+$ index.php?do=actors&actor=$1&cstart=$2 [L]

    2.Открываем engine/inc/addnews.php

    После

    <div class="hr_line"></div>

    <table width="100%">

    Добавить

    <tr>

    <td height="29" style="padding-left:5px;">Год:</td>

    <td><input class="edit" type="text" size="55" name="year" id="year"></td>

    </tr>

    <tr>

    <td height="29" style="padding-left:5px;">Страна:</td>

    <td><input class="edit" type="text" size="55" name="country" id="country"></td>

    </tr>

    <tr>

    <td height="29" style="padding-left:5px;">Жанр:</td>

    <td><input class="edit" type="text" size="55" name="genre" id="genre"></td>

    </tr>

    <tr>

    <td height="29" style="padding-left:5px;">Дата выхода:<br> число месяц:</td>

    <td><input class="edit" type="text" size="55" name="datex" id="datex"></td>

    </tr>

    <tr>

    <td height="29" style="padding-left:5px;">Режиссер:</td>

    <td><input class="edit" type="text" size="55" name="director" id="director"></td>

    </tr>

    <tr>

    <td height="29" style="padding-left:5px;">Продюсер:</td>

    <td><input class="edit" type="text" size="55" name="producer" id="producer"></td>

    </tr>

    <tr>

    <td height="29" style="padding-left:5px;">В ролях:</td>

    <td><textarea rows="5" style="width:600px;" name="actors"></textarea></td>

    </tr>

    После

    else $alt_name = totranslit( stripslashes( $alt_name ), true, false );

    Добавить

    $year = $_POST['year'];

    $country = $_POST['country'];

    $genre = $_POST['genre'];

    $genrelist = explode(",", $genre);

    $genre = '';

    $ngenre = count($genrelist);

    foreach($genrelist as $key=>$value)

    {

    $genre .= trim($value);

    if ($key < $ngenre-1)

    $genre .= "|";

    }

    $datex = $_POST['datex'];

    $datexlist = explode(",", $datex);

    $datex = '';

    $ndatex = count($datexlist);

    foreach($datexlist as $key=>$value)

    {

    $datex .= trim($value);

    if ($key < $ndatex-1)

    $datex .= "|";

    }

    $director = $_POST['director'];

    $directorlist = explode(",", $director);

    $director = '';

    $ndirector = count($directorlist);

    foreach($directorlist as $key=>$value)

    {

    $director .= trim($value);

    if ($key < $ndirector-1)

    $director .= "|";

    }

    $producer = $_POST['producer'];

    $producerlist = explode(",", $producer);

    $producer = '';

    $nproducer = count($producerlist);

    foreach($producerlist as $key=>$value)

    {

    $producer .= trim($value);

    if ($key < $nproducer-1)

    $producer .= "|";

    }

    $actors = $_POST['actors'];

    $actorslist = explode(",", $actors);

    $actors = '';

    $nactors = count($actorslist);

    foreach($actorslist as $key=>$value)

    {

    $actors .= trim($value);

    if ($key < $nactors-1)

    $actors .= "|";

    }

    Заменить запрос

    $db->query( "INSERT INTO " . PREFIX . "_post (date, ...

    на

    $db->query( "INSERT INTO " . PREFIX . "_post (date, autor, short_story, full_story, xfields, title, descr, keywords, category, alt_name, allow_comm, approve, allow_main, fixed, allow_rate, allow_br, votes, access, symbol, flag, tags, metatitle, year, country, genre, datex, director, producer, actors) values ('$thistime', '{$member_id['name']}', '$short_story', '$full_story', '$filecontents', '$title', '{$metatags['description']}', '{$metatags['keywords']}', '$category_list', '$alt_name', '$allow_comm', '$approve', '$allow_main', '$news_fixed', '$allow_rating', '$allow_br', '$add_vote', '$group_regel', '$catalog_url', '1', '{$_POST['tags']}', '{$metatags['title']}', '$year', '$country', '$genre', '$datex', '$director', '$producer', '$actors')" );

    3. Открываем engine/inc/editnews.php

    После

    $row['metatitle'] = stripslashes( $row['metatitle'] );

    Добавить

    $country = str_replace("|", ", ", $row['country']);

    $genre = str_replace("|", ", ", $row['genre']);

    $datex = str_replace("|", ", ", $row['datex']);

    $director = str_replace("|", ", ", $row['director']);

    $producer = str_replace("|", ", ", $row['producer']);

    $actors = str_replace("|", ", ", $row['actors']);

    После

    <div class="hr_line"></div>

    <table width="100%">

    Добавить

    <tr>

    <td height="29" style="padding-left:5px;">Год:</td>

    <td><input class="edit" type="text" size="55" name="year" id="year" value="{$row['year']}"></td>

    </tr>

    <tr>

    <td height="29" style="padding-left:5px;">Страна:</td>

    <td><input class="edit" type="text" size="55" name="country" id="country" value="{$row['country']}"></td>

    </tr>

    <tr>

    <td height="29" style="padding-left:5px;">Жанр:</td>

    <td><input class="edit" type="text" size="55" name="genre" id="genre" value="{$genre}"></td>

    </tr>

    <tr>

    <td height="29" style="padding-left:5px;">Дата выхода:<br> число месяц:</td>

    <td><input class="edit" type="text" size="55" name="datex" id="datex" value="{$datex}"></td>

    </tr>

    <tr>

    <td height="29" style="padding-left:5px;">Режиссер:</td>

    <td><input class="edit" type="text" size="55" name="director" id="director" value="{$director}"></td>

    </tr>

    <tr>

    <td height="29" style="padding-left:5px;">Продюсер:</td>

    <td><input class="edit" type="text" size="55" name="producer" id="producer" value="{$producer}"></td>

    </tr>

    <tr>

    <td height="29" style="padding-left:5px;">В ролях:</td>

    <td><textarea rows="5" style="width:600px;" name="actors">{$actors}</textarea></td>

    </tr>

    После

    else {

    $full_story = $db->safesql( $parse->BB_Parse( $full_story, false ) );

    $short_story = $db->safesql( $parse->BB_Parse( $short_story, false ) );

    }

    Добавить

    $year = $_POST['year'];

    $country = $_POST['country'];

    $genre = $_POST['genre'];

    $genrelist = explode(",", $genre);

    $genre = '';

    $ngenre = count($genrelist);

    foreach($genrelist as $key=>$value)

    {

    $genre .= trim($value);

    if ($key < $ngenre-1)

    $genre .= "|";

    }

    $datex = $_POST['datex'];

    $datexlist = explode(",", $datex);

    $datex = '';

    $ndatex = count($datexlist);

    foreach($datexlist as $key=>$value)

    {

    $datex .= trim($value);

    if ($key < $ndatex-1)

    $datex .= "|";

    }

    $director = $_POST['director'];

    $directorlist = explode(",", $director);

    $director = '';

    $ndirector = count($directorlist);

    foreach($directorlist as $key=>$value)

    {

    $director .= trim($value);

    if ($key < $ndirector-1)

    $director .= "|";

    }

    $producer = $_POST['producer'];

    $producerlist = explode(",", $producer);

    $producer = '';

    $nproducer = count($producerlist);

    foreach($producerlist as $key=>$value)

    {

    $producer .= trim($value);

    if ($key < $nproducer-1)

    $producer .= "|";

    }

    $actors = $_POST['actors'];

    $actorslist = explode(",", $actors);

    $actors = '';

    $nactors = count($actorslist);

    foreach($actorslist as $key=>$value)

    {

    $actors .= trim($value);

    if ($key < $nactors-1)

    $actors .= "|";

    }

    Заменить

    $result = $db->query( "UPDATE " . PREFIX . "_post set title='$title', date='$thistime', short_story='$short_story', full_story='$full_story', descr='{$metatags['description']}', keywords='{$metatags['keywords']}', category='$category_list', alt_name='$alt_name', allow_comm='$allow_comm', approve='$approve', allow_main='$allow_main', allow_rate='$allow_rating', fixed='$news_fixed', allow_br='$allow_br', votes='$add_vote', access='$group_regel', symbol='$catalog_url', flag='1', editdate='$added_time', editor='{$member_id['name']}', reason='$editreason', view_edit='$view_edit', tags='{$_POST['tags']}', metatitle='{$metatags['title']}' WHERE id='$item_db[0]'" );

    } else {

    $result = $db->query( "UPDATE " . PREFIX . "_post set title='$title', short_story='$short_story', full_story='$full_story', descr='{$metatags['description']}', keywords='{$metatags['keywords']}', category='$category_list', alt_name='$alt_name', allow_comm='$allow_comm', approve='$approve', allow_main='$allow_main', allow_rate='$allow_rating', fixed='$news_fixed', allow_br='$allow_br', votes='$add_vote', access='$group_regel', symbol='$catalog_url', editdate='$added_time', editor='{$member_id['name']}', reason='$editreason', view_edit='$view_edit', tags='{$_POST['tags']}', metatitle='{$metatags['title']}' WHERE id='$item_db[0]'" );

    }

    На

    $result = $db->query( "UPDATE " . PREFIX . "_post set title='$title', year='$year', country='$country', genre='$genre', datex='$datex', director='$director', producer='$producer', actors='$actors', date='$thistime', short_story='$short_story', full_story='$full_story', xfields='$filecontents', descr='{$metatags['description']}', keywords='{$metatags['keywords']}', category='$category_list', alt_name='$alt_name', allow_comm='$allow_comm', approve='$approve', allow_main='$allow_main', allow_rate='$allow_rating', fixed='$news_fixed', allow_br='$allow_br', votes='$add_vote', access='$group_regel', symbol='$catalog_url', flag='1', editdate='$added_time', editor='{$member_id['name']}', reason='$editreason', view_edit='$view_edit', tags='{$_POST['tags']}', metatitle='{$metatags['title']}' WHERE id='$item_db[0]'" );

    } else {

    $result = $db->query( "UPDATE " . PREFIX . "_post set title='$title', year='$year', country='$country', genre='$genre', datex='$datex', director='$director', producer='$producer', actors='$actors', short_story='$short_story', full_story='$full_story', xfields='$filecontents', descr='{$metatags['description']}', keywords='{$metatags['keywords']}', category='$category_list', alt_name='$alt_name', allow_comm='$allow_comm', approve='$approve', allow_main='$allow_main', allow_rate='$allow_rating', fixed='$news_fixed', allow_br='$allow_br', votes='$add_vote', access='$group_regel', symbol='$catalog_url', editdate='$added_time', editor='{$member_id['name']}', reason='$editreason', view_edit='$view_edit', tags='{$_POST['tags']}', metatitle='{$metatags['title']}' WHERE id='$item_db[0]'" );

    }

    4. Открываем engine/modules/show.short.php

    После

    $tpl->set( '{approve}', "" );

    Добавить

    $genresList = explode('|',$row['genre']);

    $genres = '';

    $cntGenres = count($genresList);

    $ai = 0;

    foreach ($genresList as $genre)

    {

    $ai++;

    $genre = trim($genre);

    $genres .= '<a href="/genre/'.urlencode(str_replace(' ','_',$genre)).'" title="'.$genre.'">'.$genre.'</a>';

    if ($ai<$cntGenres) $genres .= ', ';

    }

    unset($genresList);

    if (!empty($row['genre'])) {

    $genreall= $genres;

    }

    $tpl->set( '{genreall}', $genreall);

    $datexsList = explode('|',$row['datex']);

    $datexs = '';

    $cntDatexs = count($datexsList);

    $ai = 0;

    foreach ($datexsList as $datex)

    {

    $ai++;

    $datex = trim($datex);

    $datexs .= '<a href="/datex/'.urlencode(str_replace(' ','_',$datex)).'" title="'.$datex.'">'.$datex.'</a>';

    if ($ai<$cntDatexs) $datexs .= ', ';

    }

    unset($datexsList);

    if (!empty($row['datex'])) {

    $datexall= $datexs;

    }

    $tpl->set( '{datexall}', $datexall);

    $directorsList = explode('|',$row['director']);

    $directors = '';

    $cntDirectors = count($directorsList);

    $ai = 0;

    foreach ($directorsList as $director)

    {

    $ai++;

    $director = trim($director);

    $directors .= '<a href="/director/'.urlencode(str_replace(' ','_',$director)).'" title="'.$director.'">'.$director.'</a>';

    if ($ai<$cntDirectors) $directors .= ', ';

    }

    unset($directorsList);

    if (!empty($row['director'])) {

    $directorall= $directors;

    }

    $tpl->set( '{directorall}', $directorall);

    $producersList = explode('|',$row['producer']);

    $producers = '';

    $cntProducers = count($producersList);

    $ai = 0;

    foreach ($producersList as $producer)

    {

    $ai++;

    $producer = trim($producer);

    $producers .= '<a href="/producer/'.urlencode(str_replace(' ','_',$producer)).'" title="'.$producer.'">'.$producer.'</a>';

    if ($ai<$cntProducers) $producers .= ', ';

    }

    unset($producersList);

    if (!empty($row['producer'])) {

    $producerall= $producers;

    }

    $tpl->set( '{producerall}', $producerall);

    $actorsList = explode('|',$row['actors']);

    $actors = '';

    $cntActors = count($actorsList);

    $ai = 0;

    foreach ($actorsList as $actor)

    {

    $ai++;

    $actor = trim($actor);

    $actors .= '<a href="/cast/'.urlencode(str_replace(' ','_',$actor)).'" title="'.$actor.'">'.$actor.'</a>';

    if ($ai<$cntActors) $actors .= ', ';

    }

    unset($actorsList);

    if (!empty($row['actors'])) {

    $actorall= $actors;

    }

    $tpl->set( '{actorall}', $actorall);

    $year1 = $row['year'];

    $tpl->set( '{year}', $year1!='' ? '<a href="/year/'.str_replace(' ','_',$year1).'" title="'.$year1.'">'.$year1.'</a>' : '');

    $country = $row['country'];

    $tpl->set( '{country}', $year1!='' ? '<a href="/country/'.urlencode(str_replace(' ','_',$country)).'" title="'.$country.'">'.$country.'</a>' : '');

    5. Открываем engine/modules/show.full.php

    После

    $tpl->set( '{category-icon}', "{THEME}/dleimages/no_icon.gif" );

    }

    Добавить

    $genresList = explode('|',$row['genre']);

    $genres = '';

    $cntGenres = count($genresList);

    $ai = 0;

    foreach ($genresList as $genre)

    {

    $ai++;

    $genre = trim($genre);

    $genres .= '<a href="/genre/'.urlencode(str_replace(' ','_',$genre)).'" title="'.$genre.'">'.$genre.'</a>';

    if ($ai<$cntGenres) $genres .= ', ';

    }

    unset($genresList);

    if (!empty($row['genre'])) {

    $genreall= $genres;

    }

    $tpl->set( '{genreall}', $genreall);

    $datexsList = explode('|',$row['datex']);

    $datexs = '';

    $cntDatexs = count($datexsList);

    $ai = 0;

    foreach ($datexsList as $datex)

    {

    $ai++;

    $datex = trim($datex);

    $datexs .= '<a href="/datex/'.urlencode(str_replace(' ','_',$datex)).'" title="'.$datex.'">'.$datex.'</a>';

    if ($ai<$cntDatexs) $datexs .= ', ';

    }

    unset($datexsList);

    if (!empty($row['datex'])) {

    $datexall= $datexs;

    }

    $tpl->set( '{datexall}', $datexall);

    $directorsList = explode('|',$row['director']);

    $directors = '';

    $cntDirectors = count($directorsList);

    $ai = 0;

    foreach ($directorsList as $director)

    {

    $ai++;

    $director = trim($director);

    $directors .= '<a href="/director/'.urlencode(str_replace(' ','_',$director)).'" title="'.$director.'">'.$director.'</a>';

    if ($ai<$cntDirectors) $directors .= ', ';

    }

    unset($directorsList);

    if (!empty($row['director'])) {

    $directorall= $directors;

    }

    $tpl->set( '{directorall}', $directorall);

    $producersList = explode('|',$row['producer']);

    $producers = '';

    $cntProducers = count($producersList);

    $ai = 0;

    foreach ($producersList as $producer)

    {

    $ai++;

    $producer = trim($producer);

    $producers .= '<a href="/producer/'.urlencode(str_replace(' ','_',$producer)).'" title="'.$producer.'">'.$producer.'</a>';

    if ($ai<$cntProducers) $producers .= ', ';

    }

    unset($producersList);

    if (!empty($row['producer'])) {

    $producerall= $producers;

    }

    $tpl->set( '{producerall}', $producerall);

    $actorsList = explode('|',$row['actors']);

    $actors = '';

    $cntActors = count($actorsList);

    $ai = 0;

    foreach ($actorsList as $actor)

    {

    $ai++;

    $actor = trim($actor);

    $actors .= '<a href="/cast/'.urlencode(str_replace(' ','_',$actor)).'" title="'.$actor.'">'.$actor.'</a>';

    if ($ai<$cntActors) $actors .= ', ';

    }

    unset($actorsList);

    if (!empty($row['actors'])) {

    $actorall= $actors;

    }

    $tpl->set( '{actorall}', $actorall);

    $year1 = $row['year'];

    $tpl->set( '{year}', $year1!='' ? '<a href="/year/'.str_replace(' ','_',$year1).'" title="'.$year1.'">'.$year1.'</a>' : '');

    $country = $row['country'];

    $tpl->set( '{country}', $year1!='' ? '<a href="/country/'.urlencode(str_replace(' ','_',$country)).'" title="'.$country.'">'.$country.'</a>' : '');

    6. Открываем engine/engine.php

    Находим, их там много:(17-ть замен)

    id, autor, date,

    Заменяем на:

    id, autor, year, country, genre, datex, director, producer, actors, date,

    После

    case "alltags" :

    include_once ENGINE_DIR . '/modules/tagscloud.php';

    break;

    Добавить

    case "genres" :

    include_once ENGINE_DIR . '/modules/genres.php';

    break;

    case "datexs" :

    include_once ENGINE_DIR . '/modules/datexs.php';

    break;

    case "directors" :

    include_once ENGINE_DIR . '/modules/directors.php';

    break;

    case "producers" :

    include_once ENGINE_DIR . '/modules/producers.php';

    break;

    case "actors" :

    include_once ENGINE_DIR . '/modules/actors.php';

    break;

    case "year" :

    include_once ENGINE_DIR . '/modules/year.php';

    break;

    case "country" :

    include_once ENGINE_DIR . '/modules/country.php';

    break;

    7. В шаблон shortstory.tpl и fullstory.tpl в нужное место вставить:

    {year}

    {country}

    {genreall}

    {datexall}

    {directorall}

    {producerall}

    {actorall}

    и к этим фигням нужны файлы

    если когото интересует .. я могу помочь

    напоминаю .. инфо не полное .. и не имя опыта и знаний не лезти в дебри

  9. Оптимально:

    Почему нельзя запретить iFrame только для комментов? Ведь опасность представляют именно они.

    Каждый, кто получил право публикации новостей, зарегистрирован и известен (в 99,99% случаев).

    И каждый из них, между прочим, может нагадить другими способами.

    И если что, всегда можно узнать откуда у проблемы ноги растут. Реально опасны только Гости и Пользователи.

    Проголосовал ДА и выше сказанное ... очень даже логично

  10. zlobusz,

    а накой чёрт тогда эта функция прописана

    и вот идея ... а можно ... ли ... сделать так чтобы при нажатие на аватар он открывался в оригинальном размере (в том в котором был загружен на сайт) ... это будет что то вроде того как работает система с картинками в новостях .(маленькая - нажал - раскрылась)... вот будет полезно и не занимает много места когда в мини а при раскрытие хоть виден фейс.

  11. Помогите разобраться.... есть сворачивающееся окно. но при загрузке страницы оно открыто ... как его переделать чтобы при загрузки страниц оно было закрыто и открывалка лишь при нажатие

    файл .js


    function status_change(x,id)
    {
    var img=document.getElementById('contentminimiser_image_'+id);

    var src=img.src;
    var arr=src.split('/');
    if(arr[arr.length-1]=='open.png')
    {
    // display the content
    arr[arr.length-1]='close.png';
    document.getElementById('contentminimiser_'+id).style.display='';

    }
    else
    {
    arr[arr.length-1]='open.png';
    document.getElementById('contentminimiser_'+id).style.display='none';
    }
    img.src=arr.join('/');
    }
    [/html]

    код в страницу

    [html]
    <head>
    <script type="text/javascript" src="{THEME}/js/fun.js"></script>
    </head>

    <body>

    <table>
    <tr><td>

    Заголовок

    <table onclick="status_change(this,'684');" onmouseover="this.style.cursor='pointer'">

    <tr><td>

    <img id='contentminimiser_image_684' src="{THEME}/images/close.png" />

    </td></tr>
    </table>

    </td></tr>
    <tr><td>

    <div id='contentminimiser_684'>
    текст скрываемый
    </div>

    </td></tr>
    </table>

  12. Помогите разобраться.... есть сворачивающееся окно. но при загрузке страницы оно открыто ... как его переделать чтобы при загрузки страниц оно было закрыто и открывалка лишь при нажатие

    афйл .js

    Optional={option} and content=

    function status_change(x,id)

    {

    var img=document.getElementById('contentminimiser_image_'+id);

    var src=img.src;

    var arr=src.split('/');

    if(arr[arr.length-1]=='open.png')

    {

    // display the content

    arr[arr.length-1]='close.png';

    document.getElementById('contentminimiser_'+id).style.display='';

    }

    else

    {

    arr[arr.length-1]='open.png';

    document.getElementById('contentminimiser_'+id).style.display='none';

    }

    img.src=arr.join('/');

    }

    код в страницу


    <head>
    <script type="text/javascript" src="{THEME}/js/fun.js"></script>
    </head>

    <body>

    <table width='100%' cellpadding="0" cellspacing="0" align="center" border="0">
    <tr bgcolor="#dfe3e6" ><td align='center' valign="top">
    <h3 class="btl">Меню</h3>
    <table width='100%' cellpadding="0" cellspacing="0" onclick="status_change(this,'684');" onmouseover="this.style.cursor='pointer'" align="center">
    <tr width='100%' ><td align='center' widht='100%' bgcolor="#f0f2f4">
    <img id='contentminimiser_image_684' src="{THEME}/images/close.png" />
    </td></tr>
    </table>
    </td></tr>
    <tr bgcolor="#f0f2f4"><td valign="top">
    <div id='contentminimiser_684'>
    <table width='90%' cellpadding="0" cellspacing="0" align="center">
    <tr width='100%' ><td align='left' widht='100%'>
    <br />ПИШЕТСЯ
    </td></tr>
    <tr width='100%' ><td align='left' widht='100%'>
    <br />
    </td></tr>
    </table>
    </div>
    </td></tr>
    <tr>
    <td height="21" bgcolor="#dfe3e6"></td>
    </tr>
    </table>
    [/html]

×
×
  • Создать...