[horde] [goops] No sources in Block

Roel Gloudemans roel at gloudemans.info
Fri Aug 6 10:13:47 PDT 2004


Jan, Thanks for the fix.

Below I have a patch to open all search links in a new window. Additionally I
found also a bug in Goops.php.

The file /graphics/new_window.gif from the goops tree can be moved to the attic

Cheers,
Roel.

Patch for links in new window
--- result-row.inc.orig 2004-08-06 19:00:09.119321684 +0200
+++ result-row.inc      2004-08-06 19:05:40.622887110 +0200
@@ -8,19 +8,17 @@

 <tr class="<?php echo $class ?>" onmouseover="className='<?php echo $class
?>-hi';" onmouseout="className='<?php echo $class ?>';">
   <td align="right" valign="top" width="1%">
-    <?php echo $result['rank']; ?>.<br>
-    <?php echo Horde::link(Horde::externalUrl( $result['url'] ), sprintf(
_("Open '%s' in a new Window"), $result['title']), null, '_new') .
-               Horde::img( 'new_window.gif',  sprintf(_("Open '%s' in a new
Window"), $result['title'] )) ?></a>
+    <?php echo $result['rank']; ?>
   </td>
   <td>
     <table cellspacing=2 cellpadding=0 border=0>
     <tr>
       <td valign="top">
-        <?php echo Horde::link(Horde::externalUrl($result['url']),
sprintf(_("Image for '%s'"), $result['title'])) .
+        <?php echo Horde::link(Horde::externalUrl($result['url']),
sprintf(_("Image for '%s'"), $result['title']), null, '_new') .
               (!empty($result['image']) ? Horde::img($result['image'],
sprintf(_("Image for '%s'"), $result['title']), null, '') : '') ?></a>
       </td>
       <td valign="top">
-        <?php echo Horde::Link(Horde::externalUrl($result['url']),
sprintf(_("Open '%s'"), $result['title'])) ?>
+        <?php echo Horde::Link(Horde::externalUrl($result['url']),
sprintf(_("Open '%s'"), $result['title']), null, '_new') ?>
         <?php
         if ($prefs->getValue('highlight') == true) {
             echo Goops::highlightWords($result['title'], $params['query']);


Patch for Goops.php
--- Goops.php.org       2004-08-06 18:58:29.674787107 +0200
+++ Goops.php   2004-08-06 18:58:40.028968589 +0200
@@ -160,7 +160,7 @@
             return $results;
         }

-        for ($i = 0; $i < code($offensiveWords); $i++) {
+        for ($i = 0; $i < count($offensiveWords); $i++) {
             if ($i == 0) {
                 $words = $filter_regExp['words']['start'] . $offensiveWords[$i]
. $filter_regExp['words']['end'];
             } else {


----- Forwarded message from roel at gloudemans.info -----
    Date: Thu,  5 Aug 2004 19:19:55 +0200
    From: Roel Gloudemans <roel at gloudemans.info>
Reply-To: Roel Gloudemans <roel at gloudemans.info>
 Subject: [goops] No sources in Block
      To: horde at lists.horde.org

Hi List,

I post this here, because I haven't seen a goops mailing list yet.

The problem:
If goops is added as a block to the Horde "Block" page, the pull down list which
should contain the sources is empty. If you try to use the block you receive an
error message regarding a missing index in a foreach statement. Looking through
the code, I imagine it is the foreach from Goops_MetaSearch::doSearch from
MetaSearch.php

Is this a known bug? I tried to find the error, but my knowledge of horde is not
sufficient.

I would also like to drop an item regarding the user interface:
When clicking search results from goops, I initially expected them to open in a
new window, just like the news items from juno. To my suprise the link opens in
the horde window. You have to click the icon to the left to open it in a new
window. Don't know if anyone agrees, but it seems inconsistent to me.

Kind regards,
Roel Gloudemans

----- End forwarded message -----




More information about the horde mailing list