iFAQMaker
SUMMARY:  FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Api
Class faq

Direct Known Subclasses:
htmlfaq

class faq

FAQ Generator

Authors:
Izzy (izzysoft AT qumran DOT org)
Copyright:
(c) 2001-2008 by Itzchak Rehberg and IzzySoft

Field Summary
private array$block
Content of the parsed input file, splitted into blocks
private integer$blocks
Number of blocks created
private array$input
Content of the parsed input file (one line per cell)
private string$toc
Type of the TOC: "ol", "ul" or "" (no TOC)
private string$toclist
Content of the TOC (to be parsed into {toc})

Constructor Summary
void faq(string $tpl_dir, string $tpl_file, string $toc)
Constructor: Setting up the templates

Method Summary
void acronyms(string $filename)
Read in acronym definitions
private void fileRead(string $filename)
Read the input file
void parseInput(string $filename)
Parse input text into blocks.
void parseOutput()
Output the text
string regexp_pattern_file(string $name)
Read list of keywords from a given file and set them up as regexp pattern All keywords will be matched as "strings" only (i.
string regexp_pattern_word_file(string $name)
Read list of keywords from a given file and set them up as regexp pattern All keywords will be matched as "whole words" only (i.
void register_filefunc(string $function_name)
Register a function whose (only) parameter references a file relative to the script (mainly used for the HiLite PlugIns)
void set_nav(string $name, string $content)
Set template variables.
private void textReplace()
Replace variables and translations
void wiki(boolean $enable)
Enable/Disable Wiki replacement
void wikidef(string $filename)
Read in Wiki definitions


Field Detail

block

private array $block

Content of the parsed input file, splitted into blocks


blocks

private integer $blocks

Number of blocks created


input

private array $input

Content of the parsed input file (one line per cell)


toc

private string $toc

Type of the TOC: "ol", "ul" or "" (no TOC)


toclist

private string $toclist

Content of the TOC (to be parsed into {toc})


Constructor Detail

faq()

void faq(string $tpl_dir, string $tpl_file, string $toc)

Constructor: Setting up the templates

Parameters:
tpl_dir - Directory containing the HTML template files
tpl_file - Filename of the template file to use
toc - style of the "table of contents" (ul|ol), empty for no toc

Method Detail

acronyms()

void acronyms(string $filename)

Read in acronym definitions

Parameters:
filename -

fileRead()

private void fileRead(string $filename)

Read the input file

Parameters:
filename -

parseInput()

void parseInput(string $filename)

Parse input text into blocks. Blocks start with a line containing only the "block header", which looks like "

[<blockname>|level|hname]
", where: everything after the
  • &tl;blockname> is optional.

    Parameters:
    filename - input file name

  • parseOutput()

    void parseOutput()

    Output the text


    regexp_pattern_file()

    string regexp_pattern_file(string $name)

    Read list of keywords from a given file and set them up as regexp pattern All keywords will be matched as "strings" only (i.e. also as part of other words) Used for the hilite plugins

    Parameters:
    name - of the file holding the keywords, one by line
    Returns:
    regexp pattern

    regexp_pattern_word_file()

    string regexp_pattern_word_file(string $name)

    Read list of keywords from a given file and set them up as regexp pattern All keywords will be matched as "whole words" only (i.e. not as part of other words) Used for the hilite plugins

    Parameters:
    name - of the file holding the keywords, one by line
    Returns:
    regexp pattern

    register_filefunc()

    void register_filefunc(string $function_name)

    Register a function whose (only) parameter references a file relative to the script (mainly used for the HiLite PlugIns)

    Parameters:
    function_name -

    set_nav()

    void set_nav(string $name, string $content)

    Set template variables. Wrapper around pagemaker::t::set_var

    Parameters:
    name - name of template variable
    content - value of template variable

    textReplace()

    private void textReplace()

    Replace variables and translations


    wiki()

    void wiki(boolean $enable)

    Enable/Disable Wiki replacement

    Parameters:
    enable -

    wikidef()

    void wikidef(string $filename)

    Read in Wiki definitions

    Parameters:
    filename -

      iFAQMaker
    SUMMARY:  FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

    Submit a bug

    This document was generated by phpdocgen 0.16.
    Copyright © 2002-03 Stéphane GALLAND (under the GNU General Public License)