Jump to content
CMSTOOLS.org - форум поддержки и развития CMS

[ХАК] Поиск по участникам сообщества


Recommended Posts

1.В system/modules/search.php

после:

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

добавить:

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

2.В system/modules/search.php

заменить от:

if($type == 1)

{ до }

elseif($type == 2 AND $config['video_mod'] == 'yes' AND $config['video_mod_search'] == 'yes'){

этим:

if($gid){
                $sql_query = "SELECT tb1.user_id, user_search_pref, user_photo, user_birthday, user_country_city_name, user_last_visit, user_logged_mobile FROM `".PREFIX."_users` tb1, `".PREFIX."_friends` tb2  {$where_sql_gen} and tb2.user_id = tb1.user_id and tb2.friend_id = '{$gid}' and tb2.subscriptions = 2 {$sql_sort} ORDER by `user_rating` DESC LIMIT {$limit_page}, {$gcount}";
                $sql_count = "SELECT COUNT(*) AS cnt FROM `".PREFIX."_users` tb1, `".PREFIX."_friends` tb2 {$where_sql_gen} and tb2.user_id = tb1.user_id and tb2.friend_id = '{$gid}' and tb2.subscriptions = 2 {$sql_sort}";
} else {
                $sql_query = "SELECT user_id, user_search_pref, user_photo, user_birthday, user_country_city_name, user_last_visit, user_logged_mobile FROM `".PREFIX."_users` {$where_sql_gen} {$sql_sort} ORDER by `user_rating` DESC LIMIT {$limit_page}, {$gcount}";
                $sql_count = "SELECT COUNT(*) AS cnt FROM `".PREFIX."_users` {$where_sql_gen} {$sql_sort}";
}

3.В templates/Default/js/profile.js

перед;

var gSearch = {
вставить:
function get_url_param(key){
var s = window.location.search;
s = s.match(new RegExp(key + '=([^&=]+)'));
return s ? s[1] : false;
}

после:

if(CheckRequestSearch(location.href) && type == 1){

вставить:

if(get_url_param('gid')) all_queryeis_gid = '&gid='+get_url_param('gid');
else all_queryeis_gid = '';

перед:

all_queryeis_sex+all_queryeis_day

вставить:

all_queryeis_gid+
6.В templates/Default/public/main.tpl

заменить:

<div class="public_vlock cursor_pointer" onClick="groups.all_people('{id}')">Подписчики</div>

на:

<a href="/?go=search&query=&type=1&gid={id}" onClick="Page.Go(this.href); return false;"><div class="public_vlock cursor_pointer">Подписчики</div></a>

автор Mario

Edited by kphp
Link to comment
Share on other sites

  • 7 months later...

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