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

boyuna

новички
  • Публикации

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

  • Посещение

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

  1. пожалуйста, помогите мне. Как добавить фото в поиск? Я пробовал в search.php, но [xfvalue_poster] не добавляется

    		if( dle_strlen( $row['short_story'], $config['charset'] ) > 150 ) $description = dle_substr( $row['short_story'], 0, 150, $config['charset'] ) . " ...";
    		else $description = $row['short_story'];
    
    		$description = str_replace('&', '&', $description);
    
    		$description = preg_replace( "'\[attachment=(.*?)\]'si", "", $description );
    		$description = preg_replace( "'\[xfvalue(.*?)\]'si", "", $description );
    
    	    $buffer .= "<a href=\"" . $full_link . "\"><span class=\"searchheading\">" . "<img src=\"[xfvalue_poster\]">" . "</span>";
    
    		$buffer .= "<span>".$description."</span></a>";
    
    }

    Я также пробовал в dle_js.js, но ничего не меняется

    function FastSearch() {
        $("#story").attr("autocomplete", "off"), $("#story").blur(function() {
            $("#searchsuggestions").fadeOut()
        }), $("#story").keyup(function() {
            var e = $(this).val();
            0 == e.length ? $("#searchsuggestions").fadeOut() : dle_search_value != e && e.length >= dle_min_search && (clearInterval(dle_search_delay), dle_search_delay = setInterval(function() {
                dle_do_search(e)
            }, 600))
        })
    }
    
    function dle_do_search(e) {
        clearInterval(dle_search_delay), $("#searchsuggestions").remove(), $("body").append("<div id='searchsuggestions' style='display:none'><img src=\"[xfvalue_poster]\"></div>"), $.post(dle_root + "engine/ajax/controller.php?mod=search", {
            query: "" + e,
            user_hash: dle_login_hash
        }, function(e) {
            $("#searchsuggestions").html(e).fadeIn().css({
                position: "absolute",
                top: 0,
                left: 0
            }).position({
                my: "left top",
                at: "left bottom",
                of: "#story",
                collision: "fit flip"
            })
        }), dle_search_value = e
    }

    Помогите, пожалуйста, как добавить фото новости в поиск . Извините, если мой русский не ясен 🙂

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