⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 search.easygallery.php

📁 这是一个joomla系统的插件, 这是一个joomla系统的插件
💻 PHP
字号:
<?php/*** @package EasyGallery* @copyright (C) 2006 Joomla-addons.org* @author  Adam van Dongen* @version $Id: configuration.php 5 2007-06-21 19:04:22Z websmurf $* * --------------------------------------------------------------------------------* All rights reserved. Easy Gallery Component for Joomla!** This program is free software; you can redistribute it and/or* modify it under the terms of the Joomla-addons Free Software License * See LICENSE.php for more information.** This program is distributed in the hope that it will be useful,* but WITHOUT ANY WARRANTY; without even the implied warranty of* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  * --------------------------------------------------------------------------------**/defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );$_MAMBOTS->registerFunction( 'onSearch', 'botSearchEasyGallery' );function botSearchEasyGallery( $text, $phrase='', $ordering='' ) {  global $database, $my;  $text = trim( $text );	if ($text == '') {		return array();	}	$where = array();	switch ($phrase) {		case 'exact':			$where[] 		= '(g.name LIKE \'%'. $text . '%\' OR g.description LIKE \'%'. $text . '%\')';			break;		case 'all':		case 'any':		default:			$words = explode( ' ', $text );			foreach ($words as $word) {				$where[] 	= 'g.name LIKE \'%'. $text . '%\' OR g.description LIKE \'%'. $text . '%\'';			}			break;	}	$morder = '';	switch ($ordering) {	  case 'category':			$order = 'c.title ASC, n.title ASC';			break;	  		case 'oldest':		case 'alpha':		case 'newest':		default:			$order = 'g.name ASC';			break;	}		$query = 'SELECT id FROM #__menu WHERE link = \'index.php?option=com_easygallery\' LIMIT 0,1';	$database->setQuery($query);	$Itemid = $database->loadResult();	$query = "SELECT g.name AS title, g.description AS text, c.title AS section, '2' AS browsernav,	  '' AS created, CONCAT( 'index.php?option=com_easygallery&act=photos&cid=', g.id, '&Itemid=$Itemid' ) AS href	  FROM #__easygallery g	  LEFT JOIN #__categories c ON g.cid = c.id	  WHERE " . implode(' AND ', $where) . "	  ORDER BY " . $order;	$database->setQuery( $query );	$rows = $database->loadObjectList();	return $rows;}?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -