Added "page hint" on search page; deprecated "www." on EnanoCMS.org links
authorDan
Sun, 01 Jul 2007 15:00:32 -0400
changeset 36 425261984266
parent 35 efae425e9b98
child 37 7267c2a67a93
Added "page hint" on search page; deprecated "www." on EnanoCMS.org links
ajax.php
includes/clientside/jsres.php
includes/search.php
includes/template.php
plugins/SpecialAdmin.php
plugins/SpecialGroups.php
plugins/SpecialPageFuncs.php
plugins/SpecialSearch.php
plugins/SpecialUserPrefs.php
--- a/ajax.php	Sun Jul 01 14:51:33 2007 -0400
+++ b/ajax.php	Sun Jul 01 15:00:32 2007 -0400
@@ -104,8 +104,8 @@
       echo PageUtils::setpass($paths->cpage['urlname_nons'], $paths->namespace, $_POST['password']);
       break;
     case "wikihelp":
-      $html = file_get_contents('http://www.enanocms.org/ajax.php?title=Help:Wiki_formatting&_mode=getpage&nofooters');
-      $html = str_replace('src="/Special', 'src="http://www.enanocms.org/Special', $html);
+      $html = file_get_contents('http://enanocms.org/ajax.php?title=Help:Wiki_formatting&_mode=getpage&nofooters');
+      $html = str_replace('src="/Special', 'src="http://enanocms.org/Special', $html);
       echo '<div class="contentDiv"><h2>Wiki formatting guide</h2>'.$html.'</div>';
       break;
     case "fillusername":
--- a/includes/clientside/jsres.php	Sun Jul 01 14:51:33 2007 -0400
+++ b/includes/clientside/jsres.php	Sun Jul 01 15:00:32 2007 -0400
@@ -43,7 +43,7 @@
  * Version 1.0 (Banshee)
  * [Aggressively compressed] Javascript client code
  * Copyright (C) 2006-2007 Dan Fuhry
- * Enano is Free Software, licensed under the GNU General Public License; see http://www.enanocms.org/ for details.
+ * Enano is Free Software, licensed under the GNU General Public License; see http://enanocms.org/ for details.
  */
 
 ";
--- a/includes/search.php	Sun Jul 01 14:51:33 2007 -0400
+++ b/includes/search.php	Sun Jul 01 15:00:32 2007 -0400
@@ -39,7 +39,7 @@
  *
  * @package Enano
  * @subpackage Page management frontend
- * @license GNU General Public License http://www.enanocms.org/Special:GNU_General_Public_License
+ * @license GNU General Public License http://enanocms.org/Special:GNU_General_Public_License
  */
 
 class Searcher
--- a/includes/template.php	Sun Jul 01 14:51:33 2007 -0400
+++ b/includes/template.php	Sun Jul 01 15:00:32 2007 -0400
@@ -1369,7 +1369,7 @@
     // SourceForge/W3C buttons
     $ob = Array();
     $admintitle = ( $session->user_level >= USER_LEVEL_ADMIN ) ? 'title="You may disable this button in the admin panel under General Configuration."' : '';
-    if(getConfig('powered_btn') =='1') $ob[] = '<a style="text-align: center;" href="http://www.enanocms.org/" onclick="window.open(this.href);return false;"><img '.$admintitle.'  alt="Powered by Enano" src="'.scriptPath.'/images/about-powered-enano.png" onmouseover="this.src=\''.scriptPath.'/images/about-powered-enano-hover.png\';" onmouseout="this.src=\''.scriptPath.'/images/about-powered-enano.png\';" style="border-width: 0px;" width="88" height="31" /></a>';
+    if(getConfig('powered_btn') =='1') $ob[] = '<a style="text-align: center;" href="http://enanocms.org/" onclick="window.open(this.href);return false;"><img '.$admintitle.'  alt="Powered by Enano" src="'.scriptPath.'/images/about-powered-enano.png" onmouseover="this.src=\''.scriptPath.'/images/about-powered-enano-hover.png\';" onmouseout="this.src=\''.scriptPath.'/images/about-powered-enano.png\';" style="border-width: 0px;" width="88" height="31" /></a>';
     if(getConfig('sflogo_enabled')=='1')
     {
       $ob[] = '<a style="text-align: center;" href="http://sourceforge.net/" onclick="window.open(this.href);return false;"><img style="border-width: 0px;" alt="SourceForge.net Logo" src="http://sflogo.sourceforge.net/sflogo.php?group_id='.getConfig('sflogo_groupid').'&amp;type='.getConfig('sflogo_type').'" /></a>';
--- a/plugins/SpecialAdmin.php	Sun Jul 01 14:51:33 2007 -0400
+++ b/plugins/SpecialAdmin.php	Sun Jul 01 15:00:32 2007 -0400
@@ -333,7 +333,7 @@
       </td>
       <td class="row1">
         <label>
-          <input name="enano_powered_link" type="checkbox" <?php if(getConfig('powered_btn') == '1') echo 'checked="checked"'; ?> />&nbsp;&nbsp;Place a link to www.enanocms.org on the sidebar
+          <input name="enano_powered_link" type="checkbox" <?php if(getConfig('powered_btn') == '1') echo 'checked="checked"'; ?> />&nbsp;&nbsp;Place a link to enanocms.org on the sidebar
         </label>
       </td>
     </tr>
--- a/plugins/SpecialGroups.php	Sun Jul 01 14:51:33 2007 -0400
+++ b/plugins/SpecialGroups.php	Sun Jul 01 15:00:32 2007 -0400
@@ -1,11 +1,11 @@
 <?php
 /*
 Plugin Name: Group control panel
-Plugin URI: http://www.enanocms.org/
+Plugin URI: http://enanocms.org/
 Description: Provides group moderators and site administrators with the ability to control who is part of their groups. 
 Author: Dan Fuhry
 Version: 1.0RC1
-Author URI: http://www.enanocms.org/
+Author URI: http://enanocms.org/
 */
 
 /*
--- a/plugins/SpecialPageFuncs.php	Sun Jul 01 14:51:33 2007 -0400
+++ b/plugins/SpecialPageFuncs.php	Sun Jul 01 15:00:32 2007 -0400
@@ -317,7 +317,7 @@
         <table border="0" style="margin: 0 auto; background: none; width: 100%;" cellpadding="5">
             <tr>
             <td style="text-align: center;">
-                <a href="http://www.enanocms.org/" onclick="window.open(this.href); return false;" style="background: none; padding: 0;">
+                <a href="http://enanocms.org/" onclick="window.open(this.href); return false;" style="background: none; padding: 0;">
                   <img alt="Powered by Enano"
                        src="<?php echo scriptPath; ?>/images/about-powered-enano.png"
                        onmouseover="this.src='<?php echo scriptPath; ?>/images/about-powered-enano-hover.png';"
@@ -339,7 +339,7 @@
           </table>
         </td>
       </tr>
-      <tr><td style="width: 100px;" class="row1"><a href="http://www.enanocms.org">Enano</a> version:</td><td class="row1"><?php echo enano_version(true); ?></td></tr>
+      <tr><td style="width: 100px;" class="row1"><a href="http://enanocms.org">Enano</a> version:</td><td class="row1"><?php echo enano_version(true); ?></td></tr>
       <tr><td style="width: 100px;" class="row2">Web server:</td><td class="row2"><?php if(isset($_SERVER['SERVER_SOFTWARE'])) echo $_SERVER['SERVER_SOFTWARE']; else echo 'Unable to determine web server software.'; ?></td></tr>
       <tr><td style="width: 100px;" class="row1">Server platform:</td><td class="row1"><?php echo $platform; ?></td></tr>
       <tr><td style="width: 100px;" class="row2"><a href="http://www.php.net/">PHP</a> version:</td><td class="row2"><?php echo PHP_VERSION; ?></td></tr>
@@ -361,7 +361,7 @@
   }
   else
   {
-    echo '<p>It appears that the file "GPL" is missing from your Enano installation. You may find a wiki-formatted copy of the GPL at: <a href="http://www.enanocms.org/GPL">http://www.enanocms.org/GPL</a>.</p>';
+    echo '<p>It appears that the file "GPL" is missing from your Enano installation. You may find a wiki-formatted copy of the GPL at: <a href="http://enanocms.org/GPL">http://enanocms.org/GPL</a>.</p>';
   }
   $template->footer();
 }
--- a/plugins/SpecialSearch.php	Sun Jul 01 14:51:33 2007 -0400
+++ b/plugins/SpecialSearch.php	Sun Jul 01 15:00:32 2007 -0400
@@ -1,11 +1,11 @@
 <?php
 /*
 Plugin Name: Search UI/frontend
-Plugin URI: http://www.enanocms.org/
+Plugin URI: http://enanocms.org/
 Description: Provides the page Special:Search, which is a frontend to the Enano search engine.
 Author: Dan Fuhry
 Version: 1.0
-Author URI: http://www.enanocms.org/
+Author URI: http://enanocms.org/
 */
 
 /*
@@ -86,6 +86,22 @@
   $template->header();
   if(!empty($q))
   {
+    // See if any pages directly match the title
+          
+    for ( $i = 0; $i < count ( $paths->pages ) / 2; $i++ )
+    {
+      $pg =& $paths->pages[$i];
+      $q_lc = strtolower( str_replace(' ', '_', $q) );
+      $q_tl = strtolower( str_replace('_', ' ', $q) );
+      $p_lc = strtolower($pg['urlname']);
+      $p_tl = strtolower($pg['name']);
+      if ( strstr($p_tl, $q_tl) || strstr($p_lc, $q_lc) )
+      {
+        echo '<div class="usermessage">Perhaps you were looking for <b><a href="' . makeUrl($pg['urlname'], false, true) . '">' . htmlspecialchars($pg['name']) . '</a></b>?</div>';
+        break;
+      }
+    }
+          
     switch(SEARCH_MODE)
     {
       
@@ -499,7 +515,7 @@
   
   if ( $num_results < 1 )
   {
-    echo '<div class="warning-box">No pages that matched your search criteria could be found.</div>';
+    echo '<div class="warning-box" style="margin-left: 0;">No page text that matched your search criteria could be found.</div>';
     return null;
   }
   
--- a/plugins/SpecialUserPrefs.php	Sun Jul 01 14:51:33 2007 -0400
+++ b/plugins/SpecialUserPrefs.php	Sun Jul 01 15:00:32 2007 -0400
@@ -1,11 +1,11 @@
 <?php
 /*
 Plugin Name: User control panel
-Plugin URI: http://www.enanocms.org/
+Plugin URI: http://enanocms.org/
 Description: Provides the page Special:Preferences.
 Author: Dan Fuhry
 Version: 1.0
-Author URI: http://www.enanocms.org/
+Author URI: http://enanocms.org/
 */
 
 /*