CMS DataLife Engine - Система управления сайтами

Sign in to follow this  
alexpsp

Как можно изменить сортировку поиска по доп полям?

Recommended Posts

for24.ru

 

Как можно изменить сортировку тегов при поиске xfsearch? Стандартно новости выводятся по дате, как их вывести по просмотрам или рейтингу?

Share this post


Link to post
Share on other sites

up

Как изменить сортировку с "по дате" на "по рейтингу" для всех тегов дополнительных полей. Чтобы изначально было именно по рейтингу.

Share this post


Link to post
Share on other sites
<?xml version="1.0" encoding="utf-8"?>
<dleplugin>
	<name>xField sort at site by rating</name>
	<description>lazydev.pro</description>
	<icon></icon>
	<version></version>
	<dleversion>13.0</dleversion>
	<versioncompare>greater</versioncompare>
	<mysqlinstall><![CDATA[]]></mysqlinstall>
	<mysqlupgrade><![CDATA[]]></mysqlupgrade>
	<mysqlenable><![CDATA[]]></mysqlenable>
	<mysqldisable><![CDATA[]]></mysqldisable>
	<mysqldelete><![CDATA[]]></mysqldelete>
	<file name="engine/engine.php">
		<operation action="before">
			<searchcode><![CDATA[if (isset ( $_SESSION['dle_sort_xfsearch'] )) $news_sort_by = $_SESSION['dle_sort_xfsearch'];]]></searchcode>
			<replacecode><![CDATA[$news_sort_by = 'rating';]]></replacecode>
		</operation>
	</file>
</dleplugin>

 

  • Thanks 1

Share this post


Link to post
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.

Sign in to follow this