Xuups
Get an account!     Login

Utilities

Main menu

Who's Online

4 user(s) are online (1 user(s) are browsing News)

Members: 0
Guests: 4

more...

Get Xoops

Support Xuups Project

News > Modules > My Search > My Search 1.1

My Search 1.1

Published by trabis on 2008/11/1 (20860 reads)
The module can :
. log searches
. search with ajax autocomplete feature

Files linked to this article
File name Published on Hits
Download this file XOOPS2_mod_mysearch_1.1_trabis.zip
2009/3/7 1528

Rating 0.00/5
Rating: 0.0/5 (0 votes)
Votes are disable!
The comments are owned by the poster. We aren't responsible for their content.
Poster Thread
trabis
Posted: 2009/3/13 1:12  Updated: 2009/3/13 1:15
Moderator
Joined: 2008/4/7
From: Portugal
Posts: 303
 Re: My Search 1.1
This version is vulnerable to SQL injection!
Please open file class/searches.php and replace around line 131:
$format "INSERT INTO %s (mysearchid, keyword, datesearch, uid, ip) VALUES (%u, %s, %s, %u, %s)";
            
$sql sprintf($format ,
                            
$this->db->prefix('mysearch_searches'),
                            
$this->db->genId($this->db->prefix("mysearch_searches")."_mysearchid_seq"),
                            
$this->db->quoteString($keyword),$this->db->quoteString($datesearch),
                            
$uid,
                            
$this->db->quoteString($ip));
            
$force true;
        } else {
            
$format "UPDATE %s SET keyword=%d, datesearch=%s, uid=%u, ip=%s WHERE mysearchid = %u";
            
$sql sprintf($format,
                            
$this->db->prefix('mysearch_searches'),
                            
$this->db->quoteString($keyword),
                            
$this->db->quoteString($datesearch),
                            
$uid,
                            
$this->db->quoteString($ip),
                            
$mysearchid);
        }
vietnam
Posted: 2009/7/13 7:50  Updated: 2009/7/13 7:50
Just popping in
Joined: 2009/7/12
From:
Posts: 4
 Re: My Search 1.1
Sorry! My English is very poor, mostly by google translation
I like my search module and isearch module
Obviously my search module is more excellent, great
But my search module searches, there have been mistakes, I'm looking forward to it even more perfect
Therefore to this report

isearch
Click to see original Image in a new window


my search
Click to see original Image in a new window

Click to see original Image in a new window
trabis
Posted: 2009/7/19 8:16  Updated: 2009/7/19 8:16
Moderator
Joined: 2008/4/7
From: Portugal
Posts: 303
 Re: My Search 1.1
It seems like there is an error in your gallery module (missing files) on your localhost.
It does not seems related with mysearch.
vietnam
Posted: 2009/8/2 15:05  Updated: 2009/8/2 15:07
Just popping in
Joined: 2009/7/12
From:
Posts: 4
 Re: My Search 1.1
trabis
Posted: 2009/8/2 15:38  Updated: 2009/8/2 15:38
Moderator
Joined: 2008/4/7
From: Portugal
Posts: 303
 Re: My Search 1.1
Yughh! Seems like pagination is not working. I'm not sure if this is a module bug or a xoops bug. I'm testing xoops 2.4 here.
trabis
Posted: 2009/8/2 16:19  Updated: 2009/8/2 16:19
Moderator
Joined: 2008/4/7
From: Portugal
Posts: 303
 Re: My Search 1.1
OK, there is no way, we need to use 2 queries, one for getting the count and other to get the results.
Please open search.php line 260 and replace with:
case 'showallbyuser':
        
$max_results_per_page $xoopsModuleConfig['num_module_search'];
        
$module_handler =& xoops_gethandler('module');
        
$module =& $module_handler->get($mid);
        
//log it
        
mysearch_search($queries$andor$max_results_per_page$start$uid);
        
//end log
        
$results =& $module->search($queries$andor$max_results_per_page$start$uid);
        
$resultsforcount =& $module->search($queries$andor00$uid);

        
//$xoopsTpl->assign("showing", sprintf(_MA_MYSEARCH_SHOWING, $start + 1, $start + 20));
        
$count count($resultsforcount);
vietnam
Posted: 2009/8/2 17:06  Updated: 2009/8/2 17:06
Just popping in
Joined: 2009/7/12
From:
Posts: 4
 Re: My Search 1.1
I am a user XOOPS 2.3.3
HACK as you said
Have normal
very grateful for your help!!
btesec
Posted: 2010/11/2 22:28  Updated: 2010/11/2 22:28
Just popping in
Joined: 2009/5/22
From:
Posts: 9
 Re: My Search 1.1
hope to see a release soon. thanks
 

Ajax Search


Advanced Search

Recent articles

News
My Tabs
My Comments
My Search
Dummy
Publisher
Defacer
Membership
My Points
My Inviter
Others Modules
Tools
My Pics
My Menus
Smarty plugins