Llink:macros: Difference between revisions

From Lundman Wiki
No edit summary
No edit summary
Line 26: Line 26:
# "/movies/file.avi.xml"                 
# "/movies/file.avi.xml"                 
# "/movies/directory/mymovies.xml"
# "/movies/directory/mymovies.xml"
# "/$redirect/file.avi.xml" (Redirect TYPES, see llink.conf)


So it can support both the style where each movie is in a sub-directory, and has a "mymovies.xml" compatible XML file, and the second style, where all movies live in a directory, with .xml files intermixed.
So it can support both the style where each movie is in a sub-directory, and has a "mymovies.xml" compatible XML file, and the second style, where all movies live in a directory, with .xml files intermixed.
Line 60: Line 61:
  ...
  ...
  tail.html
  tail.html
# Start pass 2
  2head.html
  2head.html
  2line_dir.html
  2line_dir.html

Revision as of 00:36, 19 March 2008

 Macro name                         : Example replacement
<!--LLINK_SERVER_NAME-->            : "llink"
<!--LLINK_FILE_NAME-->              : "file.avi"
<!--LLINK_FILE_URL-->               : "http://192.168.1.1:8000/movies/part1/file.avi"
<!--LLINK_FILE_SIZE-->              : "4123414" or "4.1MB" or "". See SIZE_TYPE in llink.conf
<!--LLINK_FILE_DATE-->              : "Thu Dec 27 15:46:56 JST 2007" (man ctime)
<!--LLINK_FILE_TVID-->              : "12"
<!--LLINK_FILE_EXT-->               : ".avi"
<!--LLINK_PARENT_DIRECTORY-->       : "/movies"
<!--LLINK_CURRENT_DIRECTORY-->      : "/movies/part1"  
<!--LLINK_DETAIL_SIZE-->            : "4123414"
<!--LLINK_PAGE_PREV_URL-->          : "/movies/part1&from=1"
<!--LLINK_PAGE_NEXT_URL-->          : "/movies/part1&from=10"  See PAGE_SIZE in llink.conf
<!--LLINK_PARENT_DIRECTORY_URL-->   : "http://192.168.1.1:8000/movies"
<!--LLINK_CURRENT_DIRECTORY_URL-->  : "http://192.168.1.1:8000/movies/part1"
<!--LLINK_ONKEYUP_PREV-->           : "onkeyupset=\"prev\"" if this is the first entry listed.
<!--LLINK_ONKEYDOWN_NEXT-->         : "onkeydownset=\"next\"" if this is the last entry listed.
<!--LLINK_PAGE_FOCUS-->             : "1" or "10" See PAGE_SIZE in llink.conf.
<!--LLINK_ZODIAC-->                 : "taurus", "pisces". As based on the Zodiac calendar.
<!--LLINK_CURRENT_PLAYALL-->        : "/movies/&playall=1". Play all in this directory.
<!--LLINK_FILE_PLAYALL-->           : "/movies/subdir/&playall=1" Play all in sub directory.


Extended directory entry listing. This works by looking for an XML file in the following order:

  1. "/movies/file.avi.xml"
  2. "/movies/directory/mymovies.xml"
  3. "/$redirect/file.avi.xml" (Redirect TYPES, see llink.conf)

So it can support both the style where each movie is in a sub-directory, and has a "mymovies.xml" compatible XML file, and the second style, where all movies live in a directory, with .xml files intermixed.

The following tags are currently parsed from the .XML file:

<!--LLINK_EXTNFO_ICON-->            : "/movies/file.png"
<!--LLINK_EXTNFO_TITLE-->           : "The Ultimate Movie"
<!--LLINK_EXTNFO_LOCAL_TITLE-->     : "Ze Ultimate Film"
<!--LLINK_EXTNFO_COUNTRY-->         : "United States"
<!--LLINK_EXTNFO_LENGTH-->          : "93"
<!--LLINK_EXTNFO_TAGLINE-->         : "This is a recent movie!"
<!--LLINK_EXTNFO_DESCRIPTION-->     : "Once upon a time..."
<!--LLINK_EXTNFO_GENRES-->          : "Action Boredom Thriller"
<!--LLINK_EXTNFO_DATE-->            : "12 Jun 2007"


PASSES=1.

Normally, we do the directory processing in one pass, and it would send the HTML files in the following order:

head.html
line_dir.html           -\
line_movie.html         ------ Based on the TYPE map in llink.conf, and if dir entry is a dir, or .avi etc
...
tail.html

If you define higher PASSES value, in this case 2, it will send (if the files exist):

head.html
line_dir.html
line_movie.html
...
tail.html
# Start pass 2
2head.html
2line_dir.html
2line_movie.html
...
2tail.html

And so on for even higher PASSES values. The entries found are cached internally to llink, so it does only one actual directory listing.