Mod_page

This module contains all the methods that used to be available only in the Ppage class. This allows you to use full html in editable fields in object types that do not inherit from Ppage.

Methods

(string) clean This method cleans the html, according to either the settings argument or if not passed, according to the editor.ini settings. It returns the cleaned html.
(string) compile This will take a html page, as edited by the WYSIWYG editor, and translate all URL's to Ariadne's internal representation.
(string) getBody This will return only the inner html of the body of the html page.
(array) getReferences This will return an array with references to other pages in Ariadne, based on the compiled HTML.
(bool) isEmpty Returns true if there is no visible content in the page. It will return false if there is non-white space text, or any <img>,<object>,<embed> or <iframe> tags.
(string) parse This does the reverse of compile, it will create a html page with fully qualified URL's instead of Ariadne's internal representation.
(string) stripARNameSpace This will clean any extra information Ariadne has added in the HTML. This information is used in the WYSIWYG editor, but isn't needed outside of it.
 

clean

(string) page::clean($page, $settings=false)

(string) $page The html page to clean.
(string) $settings

The cleaning settings. If not set it will use the defaults from the editor.ini settings. The only settings it will check are 'htmlcleaner', 'htmltidy' and 'allow_tags'.

This method cleans the html, according to either the settings argument or if not passed, according to the editor.ini settings. It returns the cleaned html.

compile

(string) page::compile($page, $language='')

(string) $page The html page to compile
(string) $language

The two-letter language code. If not set, it will assume the default language of the current page.

This will take a html page, as edited by the WYSIWYG editor, and translate all URL's to Ariadne's internal representation.

getBody

(string) page::getBody($page)

(string) $page The html page to get the body part from

This will return only the inner html of the body of the html page. 

getReferences

(array) page::getReferences($page)

(string) $page The html page to parse for references

This will return an array with references to other pages in Ariadne, based on the compiled HTML.

isEmpty

(bool) page::isEmpty($page)

(string) $page The html page to check

Returns true if there is no visible content in the page. It will return false if there is non-white space text, or any <img>,<object>,<embed> or <iframe> tags.

parse

(string) page::parse($page, $full=false)

(string) $page The html page to compile
(bool) $full

If not true, parse will only return the inner html of the body of the page.

This does the reverse of compile, it will create a html page with fully qualified URL's instead of Ariadne's internal representation.

stripARNameSpace

(string) page::stripARNameSpace($page)

(string) $page The html page to strip of Ariadne's ar:: namespaced information.

This will clean any extra information Ariadne has added in the HTML. This information is used in the WYSIWYG editor, but isn't needed outside of it.