本文整理汇总了PHP中SearchEngine::getQueryChannels方法的典型用法代码示例。如果您正苦于以下问题:PHP SearchEngine::getQueryChannels方法的具体用法?PHP SearchEngine::getQueryChannels怎么用?PHP SearchEngine::getQueryChannels使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SearchEngine
的用法示例。
在下文中一共展示了SearchEngine::getQueryChannels方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: engine_doit
//.........这里部分代码省略.........
$result['followedchanneltopics']=$tlisttopic->getJsonTags();
break;
case 'recenttopics':
require_once('getter/recenttopics.php');
$result['recenttopics']=recenttopics();
break;
case 'datetopics':
require_once('template/TListTopic.php');
if (!isset($_GET['year_datetopics'])) {
$result['datetopics']=array();
break;
}
$tlisttopic = new TListTopic(); $tlisttopic->setListType("cloneByDate"); $tlisttopic->setOnlySubsumed(true);
$tlisttopic->setYear($_GET['year_datetopics']);
if (isset($_GET['month_datetopics'])) $tlisttopic->setMonth($_GET['month_datetopics']);
if (isset($_GET['day_datetopics'])) $tlisttopic->setDay($_GET['day_datetopics']);
$result['datetopics']=$tlisttopic->getJsonTags();
break;
case 'searchtopics':
require_once('template/TListTopic.php');
require_once('tool/SearchTopic.php');
if (isset($_GET['words_searchtopics'])){
$tlisttopic = new TListTopic(); $tlisttopic->setListType("cloneSearch"); $tlisttopic->setOnlySubsumed(true);
$tlisttopic->setSearch(SearchTopic::getQuery($_GET['words_searchtopics']));
if (isset($_GET['orderid_searchtopics'])) $tlisttopic->setOrderId($_GET['orderid_searchtopics']);
$result['searchtopics']=$tlisttopic->getJsonTags();
} else $result['searchtopics']=array("ok"=>false,"error"=>"no words");
break;
case 'searchmain':
require_once('template/TListChannel.php');
require_once('tool/SearchEngine.php');
if (isset($_GET['words_searchmain'])){
$tlisttopic = new TListChannel(); $tlisttopic->setListType("cloneSearch"); $tlisttopic->setOnlySubsumed(true);
$tlisttopic->setSearch(SearchEngine::getQueryChannels(unescape_ampersand($_GET['words_searchmain'])));
//if (isset($_GET['orderid_searchtopics'])) $tlisttopic->setOrderId($_GET['orderid_searchtopics']);
$result['searchmain']['channels']=$tlisttopic->getJsonTags();
} else $result['searchmain']=array("ok"=>false,"error"=>"no words");
break;
case 'usertopics':
require_once('template/TListTopic.php');
require_once('class/User.php');
if (isset($_GET['nickname_usertopics'])){
$tlisttopic = new TListTopic(); $tlisttopic->setListType("cloneByUser"); $tlisttopic->setOnlySubsumed(true);
if (isset($_GET['sorting_usertopics'])) $tlisttopic->setSorting($_GET['sorting_usertopics']);
$u=new RegUser();
$u->setNickname($_GET['nickname_usertopics']); $u->load();
$tlisttopic->setUser($u);
if (isset($_GET['orderid_usertopics'])) $tlisttopic->setOrderId($_GET['orderid_usertopics']);
if (isset($_GET['idchannel_usertopics'])) $tlisttopic->setIdChannel($_GET['idchannel_usertopics']);
$result['usertopics']=$tlisttopic->getJsonTags();
} else $result['usertopics']=array();
break;
case 'userposttopics':
require_once('template/TListTopic.php');
require_once('class/User.php');
if (isset($_GET['nickname_userposttopics'])){
$tlisttopic = new TListTopic(); $tlisttopic->setListType("cloneByUserPost"); $tlisttopic->setOnlySubsumed(true);
if (isset($_GET['sorting_userposttopics'])) $tlisttopic->setSorting($_GET['sorting_userposttopics']);
$u=new RegUser();
$u->setNickname($_GET['nickname_userposttopics']); $u->load();
$tlisttopic->setUser($u);
if (isset($_GET['orderid_userposttopics'])) $tlisttopic->setOrderId($_GET['orderid_userposttopics']);
if (isset($_GET['idchannel_userposttopics'])) $tlisttopic->setIdChannel($_GET['idchannel_userposttopics']);
$result['userposttopics']=$tlisttopic->getJsonTags();
} else $result['userposttopics']=array();
break;