The eAuction Support Forums
https://www.everyscript.de/cgi-bin/yabb/YaBB.pl
eAuction 1.6.1.x >> Functions, improvements, tutorials >> Another simple solution...
https://www.everyscript.de/cgi-bin/yabb/YaBB.pl?num=1136496924

Message started by Volf on 01/05/06 at 22:35:23

Title: Another simple solution...
Post by Volf on 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...

Title: Re: Another simple solution...
Post by Dieter Werner on 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.

Title: Re: Another simple solution...
Post by Volf on 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.

Title: Re: Another simple solution...
Post by annetappe on 02/02/06 at 04:50:01

Developer Area
==========
If you have a 'Developer Area' would you allow people like me (learner-newbie) to be able to just VIEW (not post) without an invitation.

And Thank You Volf for your contribution.  I am trying to learn and this is very helpful to me.


Title: Re: Another simple solution...
Post by Dieter Werner on 02/03/06 at 16:36:27


annetappe wrote:
If you have a 'Developer Area' would you allow people like me (learner-newbie) to be able to just VIEW (not post) without an invitation.

Sorry, but I can't do that because I would have to give you 'Developer' status - and that wouldn't be the truth  ;)

And ...
Volf is no longer a member of the forums because I don't like to see that my Copyright notice is changed by a seller of my script.

Title: Re: Another simple solution...
Post by annetappe on 02/03/06 at 16:52:31

I understand and I know I am not qualified for that status - Thanks

Title: Re: Another simple solution...
Post by Dieter Werner on 02/03/06 at 16:57:31

No hard feelings please ...
if I would give you the status I would have to give it to everybody else too.

Title: Re: Another simple solution...
Post by annetappe on 02/03/06 at 17:21:01

That is no problem - I am not at Developer level yet! - long way to go.

Shame about Volfe - seemed like he could of been a good contributor.

Have a good day/evening?

Title: Re: Another simple solution...
Post by afcbob on 02/03/06 at 23:45:47


Volf wrote:
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:
i tried this code and it did not work for me i just get a page error when i tyr it. my is this
$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...


I tried this but all i get is a page error why is this

Title: Re: Another simple solution...
Post by annetappe on 02/04/06 at 00:02:01

Use this one suggested by D.Werner above.  It works for me.

'username'            => q|lc($firstbid[0]) eq lc($form{'searchstring'})|,




Title: Re: Another simple solution...
Post by workpage707 on 03/14/06 at 16:31:28

i also tried both scripts. I dont get an error page, but it is not finding my username

Title: Re: Another simple solution...
Post by Dieter Werner on 03/14/06 at 16:38:17

That means: you did something wrong.
Doublecheck you changes.

The eAuction Support Forums » Powered by YaBB 2.2!
YaBB © 2000-2007. All Rights Reserved.