Class plgSystemMobileOKPythia

Description

The plgSystemMobileOKPythia class contains the logic of the mobileOK Pythia plugin for Joomla!

The class wraps the common AskPythia and TransPythia libraries for use in Joomla!, and registers the events handled by the plugin to generate mobileOK content.

The mobileOK Pythia plugin is designed to help generate a mobileOK version of a Web site.

Located in /plugins/joomla/mobileOKPythia/mobileOKPythia.php (line 58)

JPlugin
   |
   --plgSystemMobileOKPythia
Method Summary
plgSystemMobileOKPythia plgSystemMobileOKPythia ( &$subject, array $config, object $subject)
void addPowderLink ()
string getContentType ()
Transcoder getTranscoder (bool $includePagination)
void onAfterRender ()
void onPrepareContent ($article &$article, $params &$params, $limitstart $limitstart)
void switchTemplate ()
Methods
Constructor plgSystemMobileOKPythia (line 89)

Constructor for the class.

  • since: 1.0
plgSystemMobileOKPythia plgSystemMobileOKPythia ( &$subject, array $config, object $subject)
  • object $subject: The object to observe
  • array $config: An array that holds the plugin configuration
  • &$subject
addPowderLink (line 458)

Serves the page with an HTTP Link header to a POWDER file that asserts that the blog is mobileOK.

void addPowderLink ()
getContentType (line 494)

Determines the Content-Type that should be used based on the Accept HTTP header sent by the requesting device.

  • return: 'application/xhtml+xml' or 'text/html', depending on whether the requesting device supports the XHTML media type
  • access: public
string getContentType ()
getTranscoder (line 339)

Retrieves a transcoder that applies to HTML content.

The transcoding actions are selected based on the options of the plugin.

  • return: a transcoder initialized with transcoding actions.
Transcoder getTranscoder (bool $includePagination)
  • bool $includePagination: True when pagination should be included in the returned transcoder, False when not.
onAfterInitialise (line 165)

Switches template based on the requesting device and forces number of search results to 5 on mobile devices.

void onAfterInitialise ()
onAfterRender (line 252)

Applies content transcoding at the page level after the framework has rendered the application and sets a few HTTP headers as required.

Pagination is not performed at the page level, because this would result in a very poor user experience where navigation menus and sidebards may either be displayed on first page while content is rendered on second page, or be moved to subsequent pages. Sidebards and menus should rather be handled in the design through the administrative page or in the mobile template being used.

void onAfterRender ()
onPrepareContent (line 203)

Applies content transcoding at the article level.

void onPrepareContent ($article &$article, $params &$params, $limitstart $limitstart)
  • $article &$article: A reference to the article that is being rendered by the view.
  • $params &$params: A reference to an associative array of relevant parameters. The view determines what it considers to be relevant and passes that information along.
  • $limitstart $limitstart: An integer that determines the "page" of the content that is to be generated. Note that in the context of views that might not generate HTML output, a page is a reasonably abstract concept that depends on the context.
switchTemplate (line 311)

Switches template based on the requesting device.

A mobile template is used when the requesting device is identified as mobile, the regular desktop template is used otherwise.

This method is a wrapper around the TranscodingActionSwitchTemplate transcoding action.

  • access: public
void switchTemplate ()

Documentation generated on Tue, 17 Nov 2009 19:00:39 +0100 by phpDocumentor 1.4.2