Register | Sign In  
Wiki Lens/Developers/Utils    avg: 0.0 (0 ratings)

Here are some useful functions in lib/wikilens/Utils.php.

getAllPagesInCategoryOrList

array getAllPagesInCategoryOrList (String page):

Given a page, returns a list of items. There are three types of page that this function can operate on:

  1. category pages. The function returns all of the items in the category.
  2. list pages. The function returns all of the list items if the list is bulleted or a term-definition list.
  3. regular pages. The function scrapes the page looking for bulleted or term-definition items on the page.

For list pages or regular pages, the items must be bulleted and the first part of the item must be a wiki link (either wikiword or bracketedlink). This has to do with the vagaries of phpwiki parsing, and is not negotiable!

ThisAppears:
 Because it is a wikiword.

* [thisappears] because it is a bulleted item with a link

* this does not appear

this does not appear either:
 because it isn't linked