eAuction
  Not just another Perl script
Google
Welcome, Guest. Please Login or Register


If you use eAuction a lot and like it or if you make money from eAuction or from eAuction-related activities ...
then the project asks you for a donation in favor of the further development.



The forums are protected by
AccessControl
(written by Dieter Werner)
Click here if you want to check your IP against the most important RBLs of the net.
Click here in order to visite the AccessControl forums.


<< Visit the international e Auction Marketplace >>
Buy and sell PC and Consumer Electronic components






  HomeHelpSearchLoginRegister
 



Pages: 1 2 3 4
Another simple solution... (Read 82 times)
Volf
eAuction User
**
Offline

Simple and powerful
Perl

Posts: 16

Gender: male
Another simple solution...
01/05/06 at 22:35:23
 
Another simple solution...

In search box you must enter user name with first Capital leter, CaSe SeNsItIVe
for example: If you tipe john you will get no results, if you type John
you will get results.

This is very confusing for users, and you will have to explain searching in help,
but, as we know users do not read help, they think that your site is not working, and they go away.

Ther is no need for this, here is simple solution: ucfirst

in your eAuction.pl find Code:
$query = {
	 'end'			=> q|$close_time - $the_time < ($config{'soon_time'} * 3600)|,
	 'hot'			=> q|$#bids > $config{'hot_num'}|,
	 'new'			=> q|$the_time - $start_time < ($config{'new_time'} * 3600)|,
	 'min'			=> q|$firstbid[2] == 1|,
	 'reserve'		=> q|$reserve <= $lastbid[2]|,  
	 'keyword'		=> q|$title =~ /$form{'searchstring'}/i or $desc =~ /$form{'searchstring'}/i|,
	 'username'		=> q|$firstbid[0] eq $form{'searchstring'}|,
	 'itemnumber'	    => q|$item =~ /$form{'searchstring'}/o|,
	 'price'		=> q|$lastbid[2] <= $form{'searchstring'}|,
	 'buyitnow'		=> q|$firstbid[3] > 0|,
	 'items'		=> q|$cat eq $form{'searchstring'}|
 }; 



In the row 'username'            => q|$firstbid[0] eq $form{'searchstring'}|
add ucfirst before $form{'searchstring'}

Now it shoud be like this Code:

$query = {
	 'end'			=> q|$close_time - $the_time < ($config{'soon_time'} * 3600)|,
	 'hot'			=> q|$#bids > $config{'hot_num'}|,
	 'new'			=> q|$the_time - $start_time < ($config{'new_time'} * 3600)|,
	 'min'			=> q|$firstbid[2] == 1|,
	 'reserve'		=> q|$reserve <= $lastbid[2]|,  
	 'keyword'		=> q|$title =~ /$form{'searchstring'}/i or $desc =~ /$form{'searchstring'}/i|,
	 'username'      => q|$firstbid[0] eq ucfirst $form{'searchstring'}|,#line with added ucfirst
	 'itemnumber'	    => q|$item =~ /$form{'searchstring'}/o|,
	 'price'		=> q|$lastbid[2] <= $form{'searchstring'}|,
	 'buyitnow'		=> q|$firstbid[3] > 0|,
	 'items'		=> q|$cat eq $form{'searchstring'}|
 }; 



that is it
now try to search by username...
Back to top
 
 

Volf


Advertising
View Profile   IP Logged
Dieter Werner
Administrator
*****
Offline

Dipl. Paranoiac

Posts: 1161
Germany
Gender: male
Re: Another simple solution...
Reply #1 - 01/06/06 at 15:22:57
 
Very good idea!!

What do you think about
Code:
'username'      => q|lc($firstbid[0]) eq lc($form{'searchstring'})| 



I installed a 'Developer's Area' to the forums.
That could be the place to discuss code, functions and methods of eAuction and Perl.
If you are interested in these topics - let me know it.
Back to top
 
 

Multimedia file viewing and clickable links are available for registered members only!!  You need to Login or Register!!


Greetings from Germany
Dieter Werner




Advertising
View Profile | WWW   IP Logged
Volf
eAuction User
**
Offline

Simple and powerful
Perl

Posts: 16

Gender: male
Re: Another simple solution...
Reply #2 - 01/06/06 at 18:23:37
 
Hi Dieter,

Thank You, I am glad that you like it.

About your code,
I think it is Very good idea, and it is a quick & simple solution too.

My intention was not to discuss code functions in public,
I have mentioned it because this is simple solution for most common problem that end users (visitors) could complain about. also, that other members of forum would be interested to implement it in their eAuction.

Also, because I have plans to use your eAuction161 for my online auction, and have no way to contribute money for your project, I wish to contribute somehow, maybe with some ideas and some code?


About 'Developer's Area' , thanks for invitation, of course that I am interested.
Back to top
 
 

Volf


Advertising
View Profile   IP Logged
Pages: 1 2 3 4


If you like eAuction, please Rate it.
If you don't like eAuction, please Rate it too.


1 is being poor and 10 is being excellent


EveryScript

ip-location


AccessControl - Members Only