PhJuke - Music Jukebox for Photon |
||||||||||||||||||||
Home Page
|
Customize the Browser with PHJ FilesYou can certainly use PhJuke perfectly well with only the directory browsing interface. But if you're like me, you want to view your collection in several different ways, only one of which corresponds to the layout of the files on the hard disk. And you may want more descriptive labels on the browse buttons. PhJuke supports a simple index file format. A file with a .phj extension is recognized as an index file. For the most part, the UI treats a PHJ file as a special kind of subdirectory; when you select one from a menu page, it opens up a new menu page. If a file index.phj exists in a directory, it is used when you navigate to the directory (this overrides the normal directory browse behavior). PHJ files look just like Windows INI files: a list of sections, each starting with a title in square brackets, with each section containing a list of name=value pairs. Keyword ReferenceFirst a word about section headers. The text inside the square brackets will be used as the label of the menu button or text item. You can suppress the display of the text by specifying a font name of none. Lines starting with semicolons are ignored.
ColorsColors may be specified as three comma-separated values from 0-255 representing red, green, and blue levels, for example 255,255,0 for yellow. Or you can use the English aliases for common colors. The following aliases are recognized: black blue brown celidon cyan gray green grey magenta purple red white yellow ExampleThis example isn't the prettiest menu around, but serves to demonstrate all the keywords.
; Here's a button that adds an MP3 to the playlist. It uses ; the default font and colors. [My Favorite Song] target=mp3/Barney/Greatest Hits/I Love You, You Love Me.mp3 ; This button navigates to a directory where I have one ; subdirectory per artist. Its label uses a larger than ; normal font, a blue background, and a yellow text color. [Browse By Artist] target=mp3 bg=blue fg=yellow font=TextFont16 ; A text label on a new line. Note the lack of "target" ; keyword. [Music Styles] new-line=1 font=TextFont16b ; A button on a new line, which launches an M3U playlist. [Jazz] new-line=1 target=jazz.m3u ; A button, probably on the same line as the previous one, ; which launches another M3U playlist. This one has a yellow ; background, a blue text label, and turns grey when pressed. [Classical] target=classical.m3u font=TextFont16 bg=255,255,0 fg=0,0,255 arm=127,127,127 ; This button uses an image rather than a text label. [Latin] image=images/latin.gif font=none target=latin.m3u ; This button also has an image, but with a text label ; underneath. We set it to a fixed size. [Rock / Pop] image=images/rock-pop.jpg width=300 height=60 target=rockpop.m3u Future DirectionsMost likely a future release will set the default button styles depending on the target, just like the directory browser does. So if you want to make sure your buttons look a certain way, be sure to specify their colors and fonts. Steven Grimm |