Тестовик

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » Тестовик » Инструменты для АМС » Хештеги


Хештеги

Сообщений 1 страница 2 из 2

1

Хештеги и поиск по ним

HTML верх

Код:
<!-- Хэштеги --><script type="text/javascript">
    $().pun_mainReady(function(){$('.post-content:contains("#")').map(function(){
        var a = '#',b = '_&HASH&_',c = '.code-box',cl = [];$(this).find(c).map(function(i){cl[i] = $(this).clone(true,true)});
        $(this).find('a').attr('href',function(){return this.href.replace(a,b)});
        var lnkTAG = '<a href="/search.php?action=search&keywords=%23$1&sort_dir=DESC" title="$1">#$1</a>';
        var cnt = $(this).html().replace(/#([^\s"'<>\(\);]+)/ig,lnkTAG); $(this).html(cnt);
        $(this).find(c).map(function(i){$(this).replaceWith(cl[i])}); $(this).find('a').attr('href',function(){return this.href.replace(b,a)});
      });});
    </script>
Код:
<!--// Обёртывание Хештегов в Поисковую ссылку //-->
<script type="text/javascript" src="https://forumstatic.ru/files/0012/d8/04/74792.js"></script>
<!--// Хештеги с поиском по убыванию времени от текущего //-->
<script type="text/javascript" src="https://forumstatic.ru/files/001a/09/15/35110.js"></script>

Установить вместе.

0

2

HTML в форме ответа

Код:
<!--// Вставка Хештегов //-->
<style>
.search-insert {
   line-height: 0;
   overflow: visible!important;
   margin-top:-2px!important;
   position:relative;
   padding: 4px 7px 0!important;
   display:inline-block;
   border: #0F4879 3px solid;
   box-sizing:border-box;
   border-radius:12px;
   min-height:42px;
}
.search-insert .Search{
   color:#0F4879;
   border-radius:4px;
   background:#fff;
   font: italic normal 400 14px/normal Garamond!important;
   width:130px!important;
   position:absolute;
   text-align:center;
   display:inline-block!important;/**/
   margin:-15px auto auto;
   left:0;right:0;
}
hr.insert {
   margin-top: 1px!important;
   margin-bottom: 3px!important;
   border-width: 0 0 1px 0!important;
   border-bottom:1px solid #0F4879!important;
}
.insert+ .Search{
   background:#FAFBFC;
   margin-top:-13px;
}
.search-insert .Search span{
   font-size:16px;
   font-weight:bold;
}
.punbb .search-insert p{
   line-height: 14px;
   position: relative;
   z-index:1;
}
.search-insert .last{
   margin-bottom:-5px!important;
}
#Хештеги{
   cursor:pointer;
   float:right;
   margin-right:12px;
}
</style>
<div class="post-content search-insert" style="display:none">
<div class="Search"><span>Хештеги</span> (поиск)</div>
<p>
#audio
#gif
#gif_
#photo
#video
#искусство
#логика
#наука
#притчи
#психология
#религия
#факты
#философия
#юмор

</p>
<hr class="insert">
<div class="Search"><span>Хештеги</span> (вставка)</div>
<p class="last sea">
#audio
#gif
#gif_
#photo
#video
#искусство
#логика
#наука
#притчи
#психология
#религия
#факты
#философия
#юмор

</p>
</div>
<button type="button" id="Хештеги" style="">Хештеги</button>
<!--//End//-->
<script>
if(localStorage.HashShow)$('.search-insert').show();
$('.punbb:not(#pun-messages) .search-insert.post-content').insertAfter($('#main-reply'));
$(function(){
$('.search-insert>p.sea>a').click(function( event ) {
  event.preventDefault();
  smile($(this).text());});
$('button#Хештеги').appendTo($('#post p.formsubmit'))
$('#Хештеги').click(function() {$('.search-insert').fadeToggle("slow",function(){
if($('.search-insert:visible').length)localStorage.HashShow=1;else delete localStorage.HashShow;
});});});
</script><!--//End// Вставка Хештегов //-->
Код:
<!-- Исключаем  Хештеги #xxxx, Подпись, Отредактировано при цитировании-->
<style>#pun:not(.gid1) .punbb .post-content p.lastedit{display:none;}</style>
<script>
$(function() {
quoteOld = window.quote;
window.quote = function(x,y){
var pst = $('#p'+y);pst.find('p.lastedit').remove();
var a = pst.find('.post-sig').remove(); quoteOld(x,y);
a.addClass('Deff').appendTo(pst.find('.post-content'));
$('#main-reply').val($('#main-reply').val().replace(/(\]|[\s])#[^\s\[]+/gim,'$1'));
}});
</script>

Установить вместе.


ИТОГО по хештегам - 4 скрипта.

0


Вы здесь » Тестовик » Инструменты для АМС » Хештеги


создать форум