new search-fields

The forum for designers and developers.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
User avatar
Pelikan
Posts: 499
Joined: 15. Jan 07, 00:03
Location: Warngau in Bayern
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

new search-fields

Postby Pelikan » 6. Mar 09, 22:53

Hello all,
hello SliverEagle,

i works on a new skin. I would built 4 new search-fields like this:
1 for "all"
1 for "artist"
1 for "tracks"
an finaly for "genre".

When i search in the "artist-field", than the selction is only on artist.

My question: is this possible? Can i use some extracts from the script, it is in the skin "shiruba" from silverEagle?

best regards
Pelikan

SilverEagle
Posts: 713
Joined: 30. Sep 08, 14:00
Location: Netherlands
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: new search-fields

Postby SilverEagle » 7. Mar 09, 00:14

Hi Pelikan,

Some first thoughts:

The searching itself can be done with some SQL. It is also possible to select between searches, for instance by having 4 buttons switching between the searchmodes.

The unexpected big problem is having an input field for your searchtext. Currently SJ has only a single dedicated input field in skins, and it is tightly coupled to the internal search mechanism.

For the genre you would not need such a field, you could easily just create a picklist like in Shiruba. On the other hand it would be nice if you could just type 'rock' and you would get all the genre-variant containing the word 'rock.

Out of my head I can think of a few ways to work around the inputfield limitation:

1) The way my touchskins work: do not have a real field but use 26+ buttons to create your own onscreen keyboard. Obviously this does not work with your physical keyboard, but only by clicking on (or touching) buttons. You could theoretically create shortcuts for each individual keystroke to a dedicated menu function, but that would be a hack usable for yourself but probably not for a published skin.

2) Create a DLL plugin which handles an input field and keystrokes. You'd have to know you way around C/C++ and the Windows API for this route to work. Ony drawback here is that I suspect there is technically no way you could trigger the default transparent SJ touch-keyboards if you would want to.

3) Put a request on the wishlist for free textinput items in skins with callbacks to script when changed ;-).

To be honest - although the smiley might suggest otherwise - the third is in fact the best solution.

(By the way: usually in jukebox programs you can also search for 'album' besides 'artist' and 'track'.)

SilverEagle

SilverEagle
Posts: 713
Joined: 30. Sep 08, 14:00
Location: Netherlands
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: new search-fields

Postby SilverEagle » 7. Mar 09, 11:49

PS:

I forgot another way to have an input field:

4) Use prompt(). This pops up a windows box asking user input. This might be a solution for you, depending on your tastes. (The reason I forgot about it earlier is simple: I myself have a strong dislike for it - I don't want anything resembling a windows interface in a skin.)

SilverEagle

User avatar
Pelikan
Posts: 499
Joined: 15. Jan 07, 00:03
Location: Warngau in Bayern
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: new search-fields

Postby Pelikan » 7. Mar 09, 16:50

Hello SilverEagle,

many thanks for your answer. The samples from you says to me: it's nothing to do.
I'ts to difficult for me. At the same time i will learn english. And the new skin named
"TWIX" is only with one searchfield.

Best regards
Pelikan


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “Developer Network”