|
|
| Line 61: |
Line 61: |
| | | | |
| | '''<nowiki><TR></nowiki>'''<br> | | '''<nowiki><TR></nowiki>'''<br> |
| - | ''' <nowiki><TD width=0 height=40></nowiki>'''<br> | + | ''' |
| - | ''' <nowiki></TD></nowiki>'''<br>
| + | |
| - | ''' <nowiki><TD width=125 height=40></nowiki>'''<br>
| + | |
| - | ''' <nowiki><TABLE cellSpacing=0 cellPadding=0 border=0></nowiki>'''<br>
| + | |
| - | ''' <nowiki><TBODY></nowiki>'''<br>
| + | |
| - | ''' <nowiki><TR></nowiki>'''<br>
| + | |
| - | ''' <nowiki><TD width=15></nowiki>'''<br>
| + | |
| - | ''' <nowiki></TD></nowiki>'''<br>
| + | |
| - | ''' <nowiki><TD></nowiki>'''<br>
| + | |
| - | ''' <nowiki><A href="extras.html" tvid="blue"><B>extras</B></A></nowiki>'''<br>
| + | |
| - | ''' <nowiki></TD></nowiki>'''<br>
| + | |
| - | ''' <nowiki></TR></nowiki>'''<br>
| + | |
| - | ''' <nowiki></TBODY></nowiki>'''<br>
| + | |
| - | ''' <nowiki></TABLE></nowiki>'''<br>
| + | |
| - | ''' <nowiki></TD></nowiki>'''<br>
| + | |
| - | '''<nowiki></TR></nowiki>'''
| + | |
| - | | + | |
| - | I've included the '''''tvid="blue"''''' tag - I made ''blue'' up, given that there was already red, green and yellow. The colours apparently refer to buttons on the remote control of some Syabas devices, but the LinkStation remote doesn't actually have the coloured buttons itself.
| + | |
| - | | + | |
| - | I originally used '''''email.html''''', but have now generalised this to '''''extras.html''''' as the new page provides more services, not just email.
| + | |
| - | | + | |
| - | === Changing the background ===
| + | |
| - | | + | |
| - | Adding a menu entry produces a new navigatable link, but there is a standard background graphic that contains the depiction of 4 buttons, on which the menu option text is overlaid (the main menu plus the three media functions.) To create the new button background image it is a simple task to copy the '''''tv.jpg''''' file across to a shared directory on the LinkStation, edit it using your favourite graphics editing tool and copy it back across again.
| + | |
| - | | + | |
| - | Note that there is also a '''''background.jpg''''' file. This is displayed when you point your web browser to the linkstation, but meta-tags within the html cause the LinkTheatre to use to '''''tv.jpg''''' file.
| + | |
| - | | + | |
| - | [http://linkstation.smithysrise.com/tv.jpg Menu background with additional button]
| + | |
| - | | + | |
| - | {| border="0" cellpadding="5" cellspacing="0" align="center"
| + | |
| - | |-
| + | |
| - | ! style="background-color:#ddf0dd; border-width: 0px; border-style: solid; text-align:center" |'''Hint'''
| + | |
| - | |-
| + | |
| - | ! style="background-color:#FAFAFA; border-width: 1px; border-style: solid; text-align:center" |
| + | |
| - | You can check your progress using the LinkTheatre, but may have to go to the 'Log In' screen (using the 'Home' button on the remote) and re-select the LinkStation to see the updated menus. Alternatively, you can point a browser to '''''h ttp://<your linkstation>:8000''''' and press reload to see changes. Just remember that the LinkTheatre does not understand all HTML, so a final check with a LinkTheatre is in order.
| + | |
| - | |}
| + | |
| - | | + | |
| - | === Other menu changes ===
| + | |
| - | | + | |
| - | In a similar way to the '''''top''''' menu, each of the Photo, Music and Video header html files need to be updated to introduce the new menu entry. i.e. '''''head_image.html''''', '''''head_music.html''''' and '''''head_movie.html'''''. (See the '''Automation''' section for a way to avoid this). They all use the same background graphic, so this is already addressed.
| + | |
| - | | + | |
| - | === Automation ===
| + | |
| - | | + | |
| - | PCast does not provide any facility for dynamic updates to web pages (other than that built into the PCast executable - see the reference section). It is therefore necessary to dynamically recreate the HTML if you wish to inject other live content into the LinkTheatre pages. The OpenLink firmware includes cron which can be used to schedule automated updates. However to retrieve information from other systems it is necessary to install some additional software - such as an ftp client, telnet or netcat.
| + | |
| - | | + | |
| - | == Reference Material ==
| + | |
| - | | + | |
| - | === HTML Template Directives ===
| + | |
| - | | + | |
| - | Inside the template html files a number of PCast specific directives can be used. These directives have the form of HTML comments, so they do not interfere with normal HTML, and e.g. allow to edit a PCast template file with a normal HTML editor.
| + | |
| - | | + | |
| - | The spelling of the directives is rather strange. To simplify the interpretation, the following list provides the principle meaning of the phrases used in the directive names:
| + | |
| - | | + | |
| - | * '''PCASTD_DEL_IS_...''' - Do '''''not''''' show the enclosed HTML, if...
| + | |
| - | * '''PCASTD_DEL_IS_NO...''' - Show the enclosed HTML, if...
| + | |
| - | * '''PCASTD_INS_...''' - Replace the directive with ...
| + | |
| - | * '''PCASTD_INS_LINE...''' - Replace the directive with information/property ... of a media file.
| + | |
| - | * '''PCASTD_..._LINK''' - Replace the directive with value ... formatted to be used in the '''href''' attribute of an HTML <A> anchor link. Often there is a corresponding directive, without the ''..._LINK'' suffix. That one is supposed to be used as the anchor text which follows. For example:
| + | |
| - | | + | |
| - | <nowiki>
| + | |
| - | <a href="<!--PCASTD_...LINK-->" tvid="<!--PCASTD_INS_LINE_TVID-->"><!--PCASTD_...--></a>
| + | |
| - | </nowiki>
| + | |
| - | | + | |
| - | The known directives are as follows:
| + | |
| - | | + | |
| - | * '''<nowiki><!--PCASTD_DEL_IS_HAVE_MP3_TAGS--></nowiki>'''some html'''<nowiki><!--/PCASTD_DEL_IS_HAVE_MP3_TAGS--></nowiki>''' - Show ''some html'' if file does not [sic!] have MP3 ID3 tags. This is the opposite of '''PCASTD_DEL_IS_NO_MP3_TAGS''' and is useful when dealing with MP3 files without ID3 tags. In this case it makes sense to e.g. include HTML and directives to display the file name, instead of the non-existing artist and title tags. Note: The directive name is rather counter intuitive.
| + | |
| - | * '''<nowiki><!--PCASTD_DEL_IS_NO_IMAGE_FILES--></nowiki>'''some html'''<nowiki><!--/PCASTD_DEL_IS_NO_IMAGE_FILES--></nowiki>''' - Show ''some html'' if file is an image file type.
| + | |
| - | * '''<nowiki><!--PCASTD_DEL_IS_NO_MOVIE_FILES--></nowiki>'''some html'''<nowiki><!--/PCASTD_DEL_IS_NO_MOVIE_FILES--></nowiki>''' - Show ''some html'' if file is a movie file type.
| + | |
| - | * '''<nowiki><!--PCASTD_DEL_IS_NO_MP3_TAGS--></nowiki>'''some html'''<nowiki><!--/PCASTD_DEL_IS_NO_MP3_TAGS--></nowiki>''' - Show ''some html'' if file has [sic!] MP3 tags. This is the opposite of '''PCASTD_DEL_IS_HAVE_MP3_TAGS'''. It can be used to trigger the display of ID3 tags from an MP3 file in case this file contains ID3 tags. See the '''PCASTD_INS_LINE_MP3TAG_...''' directives for a list of tags PCast can extract from an MP3 file.
| + | |
| - | * '''<nowiki><!--PCASTD_DEL_IS_NO_MUSIC_FILES--></nowiki>'''some html'''<nowiki><!--/PCASTD_DEL_IS_NO_MUSIC_FILES--></nowiki>''':Show ''some html'' if file is a sound file type.
| + | |
| - | * '''<nowiki><!--PCASTD_DEL_IS_ROOTDIR--></nowiki>'''some html'''<nowiki><!--/PCASTD_DEL_IS_ROOTDIR--></nowiki>''' - Show ''some html'' if file is not the media root directory.
| + | |
| - | * '''<nowiki><!--PCASTD_INS_CURRENT_FILTER--></nowiki>''' - Replaced by current active filer name.
| + | |
| - | * '''<nowiki><!--PCASTD_INS_CURRENT_PAGE--></nowiki>''' - Replaced by current page number. This is useful when assembling a navigation bar, e.g. together with the '''PCASTD_INS_MAX_PAGE''' directive to display ''Page X of Y''.
| + | |
| - | * '''<nowiki><!--PCASTD_INS_CURRENT_PATH--></nowiki>''' - Replaced by the current path name.
| + | |
| - | * '''<nowiki><!--PCASTD_INS_CURRENT_PATH_LINK--></nowiki>''' - Replaced by a link to the current path. The data is supposed to be used in the ''href'' attribute of an HTML <A> anchor link.
| + | |
| - | * '''<nowiki><!--PCASTD_INS_CURRENT_PATH_LINK_NO_SORT--></nowiki>''' - Replaced by the current path, used to specify a particular sort. To be used in the ''href'' attribute of an HTML <A> anchor link.
| + | |
| - | * '''<nowiki><!--PCASTD_INS_END_FILE_NUM--></nowiki>''' - Replaced by last file number (useful in ''file X of Y'' displays).
| + | |
| - | * '''<nowiki><!--PCASTD_INS_FILE_NUM--></nowiki>''' - Replaced by current file number.
| + | |
| - | * '''<nowiki><!--PCASTD_INS_HOST_IP--></nowiki>''' - Replaced by the client's (e.g. a LinkTheatre) IP address (Note: Once again, the seppling of the directive is strange, using the term ''HOST'' to indicate a client). PCast does not try to resolve the client's IP addres to the client's host name. Which is in general a good idea, since it would require a DNS server in the home network, or a correctly configured entry in the LinkStation ''/etc/hosts'' file. None of this is typically done.
| + | |
| - | * '''<nowiki><!--PCASTD_INS_LINE_FILE_EXT--></nowiki>''' - Replaced by the file extension of the file to be displayed in this line.
| + | |
| - | * '''<nowiki><!--PCASTD_INS_LINE_FILE_LINK--></nowiki>''' - Replaced by a link to the PCast specific play information for the particular file. To be used in the ''href'' attribute of an HTML <A> anchor link.
| + | |
| - | * '''<nowiki><!--PCASTD_INS_LINE_FILE_NAME--></nowiki>''' - Replaced by the file name of the file to be displayed in this line (including file name extension).
| + | |
| - | * '''<nowiki><!--PCASTD_INS_LINE_FILE_NAME_NO_EXT--></nowiki>''' - Replaced by the file name of the file to be displayed in this line (without file name extension).
| + | |
| - | * '''<nowiki><!--PCASTD_INS_LINE_FILE_POD--></nowiki>''' - ''Syabas POD information?''
| + | |
| - | * '''<nowiki><!--PCASTD_INS_LINE_FILE_SIZE--></nowiki>''' - Replaced by the size of of the file to be displayed in this line.
| + | |
| - | * '''<nowiki><!--PCASTD_INS_LINE_FILE_VOD--></nowiki>''' - ''Syabas VOD information?''
| + | |
| - | * '''<nowiki><!--PCASTD_INS_LINE_MP3TAG_ALBUM--></nowiki>''' - Replaced by the MP3 Album name taken from the tags of the MP3 file to be displayed in this line (should be wrapped in a '''PCASTD_DEL_IS_NO_MP3_TAGS''').
| + | |
| - | * '''<nowiki><!--PCASTD_INS_LINE_MP3TAG_ARTIST--></nowiki>''' - Replaced by the MP3 artist name taken from the tags of the MP3 file to be displayed in this line (should be wrapped in a '''PCASTD_DEL_IS_NO_MP3_TAGS''').
| + | |
| - | * '''<nowiki><!--PCASTD_INS_LINE_MP3TAG_COMMENT--></nowiki>''' - Replaced by the MP3 comment taken from the tags of the MP3 file to be displayed in this line (should be wrapped in a '''PCASTD_DEL_IS_NO_MP3_TAGS''').
| + | |
| - | * '''<nowiki><!--PCASTD_INS_LINE_MP3TAG_TITLE--></nowiki>''' - Replaced by the MP3 song title taken from the tags of the MP3 file to be displayed in this line (should be wrapped in a '''PCASTD_DEL_IS_NO_MP3_TAGS''').
| + | |
| - | * '''<nowiki><!--PCASTD_INS_LINE_MP3TAG_TITLE_INFO--></nowiki>''' - Replaced by the MP3 title information taken from the tags of the MP3 file to be displayed in this line (should be wrapped in a '''PCASTD_DEL_IS_NO_MP3_TAGS''').
| + | |
| - | * '''<nowiki><!--PCASTD_INS_LINE_MP3TAG_YEAR--></nowiki>''' - Replaced by the MP3 year information taken from the tags of the MP3 file to be displayed in this line (should be wrapped in a '''PCASTD_DEL_IS_NO_MP3_TAGS''').
| + | |
| - | * '''<nowiki><!--PCASTD_INS_LINE_TVID--></nowiki>''' - LinkTheatre/syabas coloured button ID
| + | |
| - | | + | |
| - | === Links ===
| + | |
| - | | + | |
| - | Links have been lost from the original article.
| + | |
| - | | + | |
| - | [[Category:LS2]]
| + | |
| - | [[Category:Howto]]
| + | |
| - | [[Category:Mediaserver]]
| + | |
| - | [[category:OpenLink]]
| + | |
| - | [[Category:Software]]
| + | |
The current set of files held in /etc/pcast/theme/pcast from this project are available here: pcast themes
I had already replaced the original LinkStation firmware on a MIPSel device with an Projects/OpenLink firmware downloaded from LinkStationWiki. This enables command-line access using ssh (I use the PuTTY client). I have made various changes, and installed some additional packages, but these are not relevent to the PCast functionality.
You may also need a graphics editor such as Photoshop, Paint Shop Pro, The Gimp or even Microsoft Paint.
PCast holds it's HTML templates in a directory structure. The skin_root entry in the /etc/pcast/pcast.conf file points to that directory. The default is /etc/pcast/theme/pcast. When experimenting with a theme/skin it makes sense to copy an existing theme to a new diectory, changing the skin_root entry in the /etc/pcast/pcast.conf file to point to thart new directory and restart PCast. Should something go wrong it is easy to revert the settings in /etc/pcast/pcast.conf and continue with the original theme.
The LinkTheatre provides support for standard and HD TV resolution menus. There is a checkbox in the LinkTheatre 'setup' menu to select the higher resolution menus. The effect is to use a different set of html files, suffexed by '_high.html' (and similarly for image files). I have ignored the 'high' files in the article, but changes to standard menus could equally apply to the high def set.
The first step I took in extending the functionality available to the LinkTheatre was to add a fifth entry to the main menu. The standard four are 'home' and buttons to select the video, image and music content. Each of these three buttons invoke the same (unknown, because of the templating system) PCast function with a filter parameter to list the appropriate type of media.