[ Index ]

PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008]

title

Body

[close]

/lib/ -> filterlib.php (summary)

(no description)

File Size: 359 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

filterobject:: (7 methods):
  filterobject()
  filter_phrases()
  filter_remove_duplicates()
  filter_save_ignore_tags()
  filter_save_tags()
  filter_add_javascript()
  openpopup()


Class: filterobject  - X-Ref

This is just a little object to define a phrase and some instructions
for how to process it.  Filters can create an array of these to pass
to the filter_phrases function below.

filterobject($phrase, $hreftagbegin='<span class="highlight">', $hreftagend='</span>', $casesensitive=false, $fullmatch=false,$replacementphrase=NULL)   X-Ref
No description

filter_phrases($text, &$link_array, $ignoretagsopen=NULL, $ignoretagsclose=NULL)   X-Ref
Process phrases intelligently found within a HTML text (such as adding links)

param  text             the text that we are filtering
param  link_array       an array of filterobjects
param  ignoretagsopen   an array of opening tags that we should ignore while filtering
param  ignoretagsclose  an array of corresponding closing tags

filter_remove_duplicates($linkarray)   X-Ref
No description

filter_save_ignore_tags(&$text,$filterignoretagsopen,$filterignoretagsclose,&$ignoretags)   X-Ref
Extract open/lose tags and their contents to avoid being processed by filters.
Useful to extract pieces of code like <a>...</a> tags. It returns the text
converted with some <#x.x#> codes replacing the extracted text. Such extracted
texts are returned in the ignoretags array (as values), with codes as keys.

param  text                  the text that we are filtering (in/out)
param  filterignoretagsopen  an array of open tags to start searching
param  filterignoretagsclose an array of close tags to end searching
param  ignoretags            an array of saved strings useful to rebuild the original text (in/out)

filter_save_tags(&$text,&$tags)   X-Ref
Extract tags (any text enclosed by < and > to avoid being processed by filters.
It returns the text converted with some <%x.x%> codes replacing the extracted text. Such extracted
texts are returned in the tags array (as values), with codes as keys.

param  text   the text that we are filtering (in/out)
param  tags   an array of saved strings useful to rebuild the original text (in/out)

filter_add_javascript($text)   X-Ref
Add missing openpopup javascript to HTML files.


openpopup(url,name,options,fullscreen)   X-Ref
No description



Generated: Wed Jan 14 11:33:29 2009 Cross-referenced by PHPXref 0.7