Jump to content

[хак]Сортировка по верификации в поиске


Recommended Posts

.Откройте \templates\Default\search\head.tpl

Ищем:

myhtml.checked(['{checked-online}', '{checked-user-photo}']);

Заменяем:

myhtml.checked(['{checked-online}', '{checked-user-photo}', '{checked-verify}']);

Найти:

<div class="html_checkbox" id="online" onClick="myhtml.checkbox(this.id); gSearch.go();">сейчас на сайте</div>

Добавить ниже:

<div class="html_checkbox" id="verify" onClick="myhtml.checkbox(this.id); gSearch.go();" style="margin-top:9px">верифицированные</div>

Далее открыть \system\modules\search.php

Найти:

$sp = intval($_GET['sp']);

Ниже добавить:
 

$verify = intval($_GET['verify']);

Найти:

if($online) $sql_sort .= "AND user_last_visit >= '{$online_time}'";

Ниже добавить:

if($verify) $sql_sort .= "AND user_real = '1'";

Найти:

if($online) $tpl->set('{checked-online}', 'online');
    else $tpl->set('{checked-online}', '0');


    
Ниже добавить:    

if($verify) $tpl->set('{checked-verify}', 'verify');
    else $tpl->set('{checked-verify}', '0');


    
Открываем \templates\Default\js\profile.js

Найти:

user_photo = $('#user_photo').val();

Ниже добавить:

verify = $('#verify').val();

Найти:

if(user_photo != 0) all_queryeis_user_photo = '&user_photo='+user_photo;
        else all_queryeis_user_photo = '';


        
Ниже добавить:

if(verify != 0) all_queryeis_verify = '&verify='+verify;
        else all_queryeis_verify = '';

Найти:

+all_queryeis_user_photo;

Заменяем:

+all_queryeis_user_photo+all_queryeis_verify;       

 
    
Установка завершена...    

 

2.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...