Main Page   File List   File Members   Related Pages  

htmlparse.inc.php File Reference

Contains functions for parsing HTML. More...

Go to the source code of this file.

Functions

 textToXHTML (&$text,$allowIMG,$NoTags=FALSE)
 Converts properly formatted text to XHTML.

 RemoveHTML (&$text)
 Removes HTML from the text.

 Iparse_markup (&$text,$allowIMG,$NoTags=FALSE)
 Parses square-bracket tags.


Detailed Description

Contains functions for parsing HTML.

This file contains several helper functions for handling articles.

Definition in file htmlparse.inc.php.


Function Documentation

Iparse_markup &$    text,
  allowIMG,
  NoTags = FALSE
 

Parses square-bracket tags.

This will replace all the square-bracket tags with their XHTML equivalents. This is currently the only place where changes need to be made if you want to create a new tag.

This function is for internal use only - you are probably interested in textToXHTML. The paramaters are not documented, because they may change frequently, and are not part of the API.

Definition at line 62 of file htmlparse.inc.php.

References get_entry(), set_entry(), and text.

Referenced by textToXHTML().

RemoveHTML &$    text
 

Removes HTML from the text.

This should be used when submitting an article - all formatting should be done with square brackets, therefore it's safe to assume that angle brackets are meant to be mathematical "less than" and "greater than" signs.

Parameters:
&  $text The text to be stripped, by reference.
Returns:
Nothing.

Definition at line 45 of file htmlparse.inc.php.

References text.

Referenced by basic_page_content(), and basic_page_DoSummary().

textToXHTML &$    text,
  allowIMG,
  NoTags = FALSE
 

Converts properly formatted text to XHTML.

The text should be formatted with tags like "[b]some bold text[/b]". It will not check for valid XHTML, that should be done elsewhere.

Todo:
Define where XHTML checking should happen - probably on submitting a page.
Parameters:
&  $text This is a string, passed by reference, to convert to XHTML
allowIMG  This is a boolean, telling modphpcms if it should replace replace images with a textual placeholder
NoTags  This tells modphpmcs if it should strip all tags from the text.
Returns:
Nothing.

Definition at line 24 of file htmlparse.inc.php.

References Iparse_markup(), and text.

Referenced by basic_page_content(), and basic_page_DoSummary().


Generated on Wed Jun 9 03:38:16 2004 for modphpcms by doxygen1.2.18