1
wcrwcr
Wordbook v1.15 beta - Search results
  • 2005/5/29 4:03

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Hi all

First of all i?d like to thanks hsalazar and mondarse for continuing the development of such great module

I?ve found a typo when trying to seach for terms and definitions using the XOOPS search feature.

I can?t get any results besides the term.
It seems that it can?t search on the definitions field.

Searching with the own wordbooks? search engine I can find the results that are expected with a nice yellow highlight(great feature ) but, I can?t see an image I?m using on the definition?s field. Even with html tags and XOOPS codes unabled.

Another point I got a kind of wierd html tag, like that:

some definition?s text

in the place where is supposed to be a < b > tag.

i guess the problem/solution is in the "include/cleantags.php" file but on line 6 I found:
$allowedTags '


  • ';



Also tried to put the < img > tag on that line But I only got a lot of and a really messed layout.

I?m pretty lost

Any tip or quick fix?

Thanks

2
wcrwcr
Re: Wordbook v1.15 beta - Search results
  • 2005/5/29 19:17

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Hi

A little bump

Thanks

3
wcrwcr
Re: Wordbook v1.15 beta - Search results
  • 2005/5/30 16:42

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


To the admins
I moved this thread to:
https://xoops.org/modules/news/article.php?storyid=2208&com_mode=flat&com_order=0&start=20

Please, if you like erase the above posts, since I can?t do It.
PLease, don?t consider It as a cross posting, I just got the feeling of posting in a wrong place.

Thanks & maybe sorry

4
hsalazar
Re: Wordbook v1.15 beta - Search results
  • 2005/6/4 4:05

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


wcrwcr:

Here's a quick fix for the search problem.

Open file include/search.inc.php. Look for line 27; it includes a query string, but it has a bug. Wher it says:
OR definition LIKE OR ref LIKE

it should really say
OR definition LIKE '%$queryarray[0]%' OR ref LIKE


Then go for line 31. Likewise, it says
OR definition OR ref LIKE

and it should say
OR definition LIKE '%$queryarray[$i]%' OR ref LIKE


I'll be back with the other matter...

Cheers.

5
wcrwcr
Re: Wordbook v1.15 beta - Search results
  • 2005/6/4 17:03

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Hey hsalazar

Thank you to point me that
However after the modifications sugested I still can?t obtain the results expected.

After looking the code I guess that a '%$queryarray[0]%' right after the OR ref LIKE was missing. And of course at the line 31, too.

So I did it and now we can search through XOOPS search function too

From line 22 to line 33 now we have:

// because count() returns 1 even if a supplied variable
    // is not an array, we must check if $querryarray is really an array
    
$count count$queryarray );
    if ( 
$count && is_array$queryarray ) )
        {
        
$sql .= "AND ((term LIKE '%$queryarray[0]%' OR definition LIKE '%$queryarray[0]%' OR ref LIKE '%$queryarray[0]%')";
        for ( 
$i 1$i $count$i++ )
            {
            
$sql .= $andor ";
            
$sql .= "(term LIKE '%$queryarray[$i]%' OR definition LIKE '%$queryarray[$i]%' OR ref LIKE '%$queryarray[$i]%')";
            } 
        
$sql .= ") ";


BTW >As my avatar sugests I?m a curious monkey and not a coder so in order to get the results I did a look in other module that uses the same kind of function and used the same logic

Thanks a lot to point me that. Without your tip I guess I?ll search for a whole year

Now lets find the image and tag troubles.

Saludos de Brasil

6
wcrwcr
Re: Wordbook v1.15 beta - Search results
  • 2005/6/8 18:22

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Hola Salazar

Quote:


I'll be back with the other matter...

Cheers.


Still waiting for you

Thanks

7
wcrwcr
Re: Wordbook v1.15 beta - Search results
  • 2005/6/13 14:40

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Just A little bump

8
wcrwcr
Re: Wordbook v1.15 beta - Search results
  • 2005/6/15 20:37

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Horacio

Where have you been?
Don?t let us like orphans

Thank you

9
wcrwcr
Re: Wordbook v1.15 beta - Search results
  • 2005/6/19 18:20

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


HI
Another really little bump

10
hsalazar
Re: Wordbook v1.15 beta - Search results
  • 2005/6/19 18:31

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


wcrwcr:

Sorry for the absence. I've taken a look to the whole mess about that cleantags matter. This was supposed to filter the output so that only selected HTML tags would be used. What for? I decided when building the index interface that images wouldn't be allowed, because having no control over their size, they'd break the carefully arranged blocks by altering the width of the random term block.

What I mean with this is at first I didn't remember all this, so I thought it would be easy to get rid of the problem. It's not. I think I'll use a different filtering scheme, so I'll have to delve deeper into the code. It'll take some more time.

Cheers.

Login

Who's Online

320 user(s) are online (216 user(s) are browsing Support Forums)


Members: 0


Guests: 320


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits