mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Search: some fixes (#896)
This commit is contained in:
parent
05bac50057
commit
dd97ded326
8 changed files with 45 additions and 17 deletions
|
@ -58,7 +58,7 @@ class Videos
|
|||
else
|
||||
$paramValue != NULL ? $notNullParams+=["$paramName" => "$paramValue"] : NULL;
|
||||
|
||||
$result = $this->videos->where("name OR description LIKE ?", $query)->where("deleted", 0);
|
||||
$result = $this->videos->where("CONCAT_WS(' ', name, description) LIKE ?", $query)->where("deleted", 0);
|
||||
$nnparamsCount = sizeof($notNullParams);
|
||||
|
||||
if($nnparamsCount > 0) {
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
{if !is_null($_GET['address']) && $_GET['address'] != "" && $x->getPrivacySetting("page.info.read") > 1}
|
||||
<tr>
|
||||
<td><span class="nobold">{_address}:</span></td>
|
||||
<td><a href="{$x->getPhysicalAddress()}">{$x->getPhysicalAddress()}</a></td>
|
||||
<td>{$x->getPhysicalAddress()}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{if $x->getPrivacySetting("page.info.read") > 1}
|
||||
|
@ -114,7 +114,7 @@
|
|||
<span class="nobold">{_description}:</span>
|
||||
</td>
|
||||
{/if}
|
||||
<td>
|
||||
<td {if $type == "apps"}style="width:400px"{/if}>
|
||||
{$x->getDescription() ?? '(' . tr("none") . ')'}
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -204,13 +204,9 @@
|
|||
</div>
|
||||
{elseif $type == "videos"}
|
||||
{foreach $data as $dat}
|
||||
{if $dat->getOwner()->isDeleted()}
|
||||
{php continue;}
|
||||
{else}
|
||||
<div class="content">
|
||||
{include "../components/video.xml", video => $dat}
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{elseif $type == "audios"}
|
||||
хуй
|
||||
|
@ -239,9 +235,7 @@
|
|||
<li {if $type === "comments"}id="used"{/if}><a href="/search?type=comments{if $_GET['query']}&query={urlencode($_GET['query'])}{/if}&sort=id">{_s_comments} {if $type === "comments"}({$count}){/if}</a></li>
|
||||
<li {if $type === "posts"} id="used"{/if}><a href="/search?type=posts{if $_GET['query']}&query={urlencode($_GET['query'])}{/if}&sort=id"> {_s_posts} {if $type === "posts"} ({$count}){/if}</a></li>
|
||||
<li {if $type === "videos"} id="used"{/if}><a href="/search?type=videos{if $_GET['query']}&query={urlencode($_GET['query'])}{/if}&sort=id"> {_s_videos} {if $type === "videos"} ({$count}){/if}</a></li>
|
||||
<!--<li {if $type === "audios"}id="used"{/if}><a href="/search?type=audios{if $_GET['query']}&query={urlencode($_GET['query'])}{/if}&sort=id">{_s_audios} {if $type === "audios"} ({$count}){/if}</a></li>-->
|
||||
<li {if $type === "apps"} id="used"{/if}><a href="/search?type=apps{if $_GET['query']}&query={urlencode($_GET['query'])}{/if}&sort=id"> {_s_apps} {if $type === "apps"} ({$count}){/if}</a></li>
|
||||
<!--<li {if $type === "notes"}id="used"{/if}><a href="/search?type=notes{if $_GET['query']}&query={urlencode($_GET['query'])}{/if}&sort=id">{_s_notes} {if $type === "notes"}({$count}){/if}</a></li>-->
|
||||
</ul>
|
||||
|
||||
<div class="searchOption">
|
||||
|
@ -262,11 +256,15 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{if $type !== "groups" && $type !== "apps"} {* В OpenVK не сохраняется дата создания группы *}
|
||||
{if $type !== "groups" && $type !== "apps"} {* В OpenVK не сохраняется дата создания групп и приложений *}
|
||||
<div class="searchOption">
|
||||
<div class="searchOptionName" id="n_dates" onclick="hideParams('dates')"><img src="/assets/packages/static/openvk/img/hide.png" class="searchHide">{_s_by_date}</div>
|
||||
<div class="searchOptionBlock" id="s_dates">
|
||||
{if $type != "users"}
|
||||
<p id="bydate">{_s_date_before}:<br>
|
||||
{else}
|
||||
<p id="bydate">{_s_registered_before}:<br>
|
||||
{/if}
|
||||
<input type="date" name="datebefore"
|
||||
form="searcher"
|
||||
id="bydate"
|
||||
|
@ -274,7 +272,11 @@
|
|||
value="{if !is_null($_GET['datebefore'])}{$_GET['datebefore']}{/if}"
|
||||
min="2019-11-19"
|
||||
max={date('Y-m-d')}></p>
|
||||
{if $type != "users"}
|
||||
<p id="bydate">{_s_date_after}:<br>
|
||||
{else}
|
||||
<p id="bydate">{_s_registered_after}:<br>
|
||||
{/if}
|
||||
<input type="date" name="dateafter"
|
||||
form="searcher"
|
||||
style="width:100%"
|
||||
|
@ -300,9 +302,9 @@
|
|||
<div class="searchOption">
|
||||
<div class="searchOptionName" id="n_gender" onclick="hideParams('gender')"><img src="/assets/packages/static/openvk/img/hide.png" class="searchHide">{_gender}</div>
|
||||
<div class="searchOptionBlock" id="s_gender">
|
||||
<p><input type="radio" form="searcher" {if $_GET['gender'] == 0}checked{/if} name="gender" value="0">{_male}</p>
|
||||
<p><input type="radio" form="searcher" {if $_GET['gender'] == 1}checked{/if} name="gender" value="1">{_female}</p>
|
||||
<p><input type="radio" form="searcher" {if $_GET['gender'] == 2 || is_null($_GET['gender'])}checked{/if} name="gender" value="2">{_s_any}</p>
|
||||
<p><input type="radio" form="searcher" id="gend" {if $_GET['gender'] == 0}checked{/if} name="gender" value="0">{_male}</p>
|
||||
<p><input type="radio" form="searcher" id="gend1"{if $_GET['gender'] == 1}checked{/if} name="gender" value="1">{_female}</p>
|
||||
<p><input type="radio" form="searcher" id="gend2"{if $_GET['gender'] == 2 || is_null($_GET['gender'])}checked{/if} name="gender" value="2">{_s_any}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -29,7 +29,21 @@
|
|||
</div>
|
||||
</div>
|
||||
<div n:if="isset($thisUser) &&! ($compact ?? false)" class="post-menu">
|
||||
<a {if is_null($linkW)}href="#_comment{$comment->getId()}"{else}href="wall{!is_null($comment->getTarget()) ? $comment->getTarget()->getPrettyId() : $comment->getOwner()->getId()}#_comment{$comment->getId()}"{/if} class="date">{$comment->getPublicationTime()}</a> |
|
||||
{var $target = "wall"}
|
||||
|
||||
{if get_class($comment->getTarget()) == "openvk\Web\Models\Entities\Note"}
|
||||
{php $target = "note"}
|
||||
{elseif get_class($comment->getTarget()) == "openvk\Web\Models\Entities\Post"}
|
||||
{php $target = "wall"}
|
||||
{elseif get_class($comment->getTarget()) == "openvk\Web\Models\Entities\Photo"}
|
||||
{php $target = "photo"}
|
||||
{elseif get_class($comment->getTarget()) == "openvk\Web\Models\Entities\Video"}
|
||||
{php $target = "video"}
|
||||
{elseif get_class($comment->getTarget()) == "openvk\Web\Models\Entities\Topic"}
|
||||
{php $target = "topic"}
|
||||
{/if}
|
||||
|
||||
<a {if is_null($linkW)}href="#_comment{$comment->getId()}"{else}href="{$target}{!is_null($comment->getTarget()) ? $comment->getTarget()->getPrettyId() : $comment->getOwner()->getId()}#_comment{$comment->getId()}"{/if} class="date">{$comment->getPublicationTime()}</a> |
|
||||
{if $comment->canBeDeletedBy($thisUser)}
|
||||
<a href="/comment{$comment->getId()}/delete">{_delete}</a> |
|
||||
{/if}
|
||||
|
|
|
@ -629,7 +629,7 @@ function resetSearch()
|
|||
|
||||
for(const input of inputs)
|
||||
{
|
||||
if(input != dnt) {
|
||||
if(input != dnt && input != gend && input != gend1 && input != gend2) {
|
||||
input.value = ""
|
||||
}
|
||||
}
|
||||
|
|
|
@ -485,6 +485,7 @@
|
|||
"search_for_videos" = "Search for videos";
|
||||
"search_for_apps" = "Search for apps";
|
||||
"search_for_notes" = "Search for notes";
|
||||
"search_for_audios" = "Search for music";
|
||||
"search_button" = "Find";
|
||||
"search_placeholder" = "Start typing any name, title or word";
|
||||
"results_zero" = "No results";
|
||||
|
@ -1487,6 +1488,8 @@
|
|||
"s_order_invert" = "Invert";
|
||||
|
||||
"s_by_date" = "By date";
|
||||
"s_registered_before" = "Registered before";
|
||||
"s_registered_after" = "Registered after";
|
||||
"s_date_before" = "Before";
|
||||
"s_date_after" = "After";
|
||||
|
||||
|
|
|
@ -459,6 +459,7 @@
|
|||
"search_for_videos" = "Поиск видео";
|
||||
"search_for_apps" = "Поиск приложений";
|
||||
"search_for_notes" = "Поиск записок";
|
||||
"search_for_audios" = "Поиск музыки";
|
||||
"search_button" = "Найти";
|
||||
"search_placeholder" = "Начните вводить любое имя, название или слово";
|
||||
"results_zero" = "Ни одного результата";
|
||||
|
@ -1381,6 +1382,8 @@
|
|||
"s_order_invert" = "Инвертировать";
|
||||
|
||||
"s_by_date" = "По дате";
|
||||
"s_registered_before" = "Зарегистрирован до";
|
||||
"s_registered_after" = "Зарегистрирован после";
|
||||
"s_date_before" = "До";
|
||||
"s_date_after" = "После";
|
||||
|
||||
|
|
|
@ -414,6 +414,7 @@
|
|||
"search_for_videos" = "Поискъ синематографовъ";
|
||||
"search_for_apps" = "Поискъ забав";
|
||||
"search_for_notes" = "Поискъ запiсокъ";
|
||||
"search_for_audios" = "Поиск музыкъ";
|
||||
"search_button" = "Найти";
|
||||
"results_zero" = "Ни одного результата";
|
||||
"results_one" = "Одинъ результатъ";
|
||||
|
@ -757,6 +758,8 @@
|
|||
"s_order_invert" = "Отразiть";
|
||||
|
||||
"s_by_date" = "По датѣ";
|
||||
"s_registered_before" = "Зарѣгистрированъ до";
|
||||
"s_registered_after" = "Зарѣгистрированъ после";
|
||||
"s_date_before" = "До";
|
||||
"s_date_after" = "После";
|
||||
|
||||
|
|
|
@ -433,6 +433,7 @@
|
|||
"search_for_videos" = "Розыск кинолент";
|
||||
"search_for_apps" = "Розыск приложений";
|
||||
"search_for_notes" = "Розыск записок";
|
||||
"search_for_audios" = "Розыск аудио";
|
||||
|
||||
"search_button" = "Найти";
|
||||
"search_placeholder" = "Начните вводить любое имя, название или слово";
|
||||
|
@ -962,6 +963,8 @@
|
|||
"s_order_invert" = "Отразить";
|
||||
|
||||
"s_by_date" = "По дате";
|
||||
"s_registered_before" = "Зарегистрирован до";
|
||||
"s_registered_after" = "Зарегистрирован после";
|
||||
"s_date_before" = "До";
|
||||
"s_date_after" = "После";
|
||||
|
||||
|
|
Loading…
Reference in a new issue