From: <du...@us...> - 2012-11-23 22:33:15
|
Revision: 10268 http://sourceforge.net/p/xoops/svn/10268 Author: dugris Date: 2012-11-23 22:33:12 +0000 (Fri, 23 Nov 2012) Log Message: ----------- Add template for search result Fix admin theme Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php XoopsCore/branches/2.6.x/2.6.0/htdocs/search.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops.css Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_search.html Property Changed: ---------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/search.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.php 2012-11-22 19:38:36 UTC (rev 10267) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.php 2012-11-23 22:33:12 UTC (rev 10268) @@ -17,6 +17,65 @@ * @version $Id$ */ -if (! defined('XOOPS_INSTALL')) { - header('Location: install/index.php'); +if (!defined("XOOPS_MAINFILE_INCLUDED")) { + define("XOOPS_MAINFILE_INCLUDED", 1); + + // XOOPS Physical Paths + + // Physical path to the XOOPS documents (served) directory WITHOUT trailing slash + define('XOOPS_ROOT_PATH', 'C:/Internet/Xoops/Xoops_2.6.0/htdocs'); + + // For forward compatibility + // Physical path to the XOOPS library directory WITHOUT trailing slash + define('XOOPS_PATH', 'C:/Internet/Xoops/Xoops_2.6.0/htdocs/xoops_lib'); + // Physical path to the XOOPS datafiles (writable) directory WITHOUT trailing slash + define('XOOPS_VAR_PATH', 'C:/Internet/Xoops/Xoops_2.6.0/htdocs/xoops_data'); + // Alias of XOOPS_PATH, for compatibility, temporary solution + define("XOOPS_TRUST_PATH", XOOPS_PATH); + + // URL Association for SSL and Protocol Compatibility + $http = 'http://'; + if (!empty($_SERVER['HTTPS'])) { + $http = ($_SERVER['HTTPS']=='on') ? 'https://' : 'http://'; + } + define('XOOPS_PROT', $http); + + // XOOPS Virtual Path (URL) + // Virtual path to your main XOOPS directory WITHOUT trailing slash + // Example: define('XOOPS_URL', 'http://dugris.no-ip.org/Xoops/Xoops_2.6.0/htdocs'); + define('XOOPS_URL', 'http://dugris.no-ip.org:8090'); + + // Shall be handled later, don't forget! + define("XOOPS_CHECK_PATH", 0); + // Protect against external scripts execution if safe mode is not enabled + if (XOOPS_CHECK_PATH && !@ini_get("safe_mode")) { + if (function_exists("debug_backtrace")) { + $xoopsScriptPath = debug_backtrace(); + if (!count($xoopsScriptPath)) { + die("XOOPS path check: this file cannot be requested directly"); + } + $xoopsScriptPath = $xoopsScriptPath[0]["file"]; + } else { + $xoopsScriptPath = isset($_SERVER["PATH_TRANSLATED"]) ? $_SERVER["PATH_TRANSLATED"] : $_SERVER["SCRIPT_FILENAME"]; + } + if (DIRECTORY_SEPARATOR != "/") { + // IIS6 may double the \ chars + $xoopsScriptPath = str_replace(strpos($xoopsScriptPath, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, "/", $xoopsScriptPath); + } + if (strcasecmp(substr($xoopsScriptPath, 0, strlen(XOOPS_ROOT_PATH)), str_replace(DIRECTORY_SEPARATOR, "/", XOOPS_ROOT_PATH))) { + exit("XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run."); + } + } + + // Secure file + require XOOPS_VAR_PATH . '/data/secure.php'; + + define('XOOPS_GROUP_ADMIN', '1'); + define('XOOPS_GROUP_USERS', '2'); + define('XOOPS_GROUP_ANONYMOUS', '3'); + + if (!isset($xoopsOption["nocommon"]) && XOOPS_ROOT_PATH != "") { + include XOOPS_ROOT_PATH."/include/common.php"; + } + } \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_search.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_search.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_search.html 2012-11-23 22:33:12 UTC (rev 10268) @@ -0,0 +1,82 @@ +<fieldset> + <{if $search}> + <legend><{$smarty.const._SR_SEARCHRESULTS}></legend> + <div> + <{$smarty.const._SR_KEYWORDS}> : + <span class="bold"> + <{foreachq from=$queries item=query name=foo}> + <{$query}><{if !$smarty.foreach.foo.last}>,<{/if}> + <{/foreach}> + </span> + <{if $sr_showing}> + <br /> + <{$sr_showing}> + <{/if}> + </div> + <{if count($ignored_queries) != 0}> + <div> + <{$ignored_words}> : + <span class="bold"> + <{foreachq from=$ignored_queries item=query name=foo}> + <{$query}><{if !$smarty.foreach.foo.last}>,<{/if}> + <{/foreach}> + </span> + </div> + <{/if}> + <{/if}> + + <{if count($modules) > 0}> + <{foreachq from=$modules item=module name=foo}> + <div class="searchModule"> + <div class="searchIcon floatleft"> + <img src="<{$module.image}>" alt="<{$module.name}>"> + </div> + <div class="searchTitle floatleft"> + <{$module.name}> + </div> + <{if $module.search_url}> + <div class="floatright"> + <a href="<{$module.search_url}>" title="<{$smarty.const._SR_SHOWALLR}>"><{$smarty.const._SR_SHOWALLR}></a> + </div> + <{/if}> + <div class="clear"></div> + + <{foreach from=$module.result item=result}> + <div class="searchItem"> + <div class="bold"><a href="<{$result.link}>" title="<{$result.title}>"><{$result.title}></a></div> + <div><{$result.content}></div> + <span class='x-small'> + <{if $result.uid}> + <a href="<{$xoops_url}>/userinfo.php?uid=<{$result.uid}>" title="<{$result.uname}>"><{$result.uname}></a> + <{/if}> + ( <{$result.time}> ) + </span> + </div> + <{/foreach}> + </div> + + <!-- prev / next --> + <{if $module.prev || $module.next}> + <div> + <{if $module.prev}> + <div class="floatleft"> + <a href="<{$module.prev}>" title="<{$smarty.const._SR_PREVIOUS}>"><{$smarty.const._SR_PREVIOUS}></a> + </div> + <{/if}> + <{if $module.next}> + <div class="floatright"> + <a href="<{$module.next}>" title="<{$smarty.const._SR_NEXT}>"><{$smarty.const._SR_NEXT}></a> + </div> + <{/if}> + </div> + <{/if}> + <{/foreach}> + <{else}> + <div class="searchModule bold"> + <{$smarty.const._SR_NOMATCH}> + </div> + <{/if}> +</fieldset> + +<!-- Display form --> +<{includeq file="module:system|system_form.html"}> Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_search.html ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php 2012-11-22 19:38:36 UTC (rev 10267) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php 2012-11-23 22:33:12 UTC (rev 10268) @@ -88,8 +88,11 @@ foreach (array_keys($mod_options) as $item) { $mod_options[$item]['link'] = empty($mod_options[$item]['absolute']) ? XOOPS_URL . "/modules/{$moddir}/" . $mod_options[$item]['link'] : $mod_options[$item]['link']; - $mod_options[$item]['icon'] = empty($mod_options[$item]['icon']) ? '' - : XOOPS_URL . "/media/xoops/images/icons/32/" . $mod_options[$item]['icon']; + if ( file_exists($xoops->path("/media/xoops/images/icons/32/" . $mod_options[$item]['icon']) ) ) { + $mod_options[$item]['icon'] = $xoops->url("/media/xoops/images/ico |