DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

LumoNet PHP Include

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:Thomas Off
Changed:2008-01-04T12:05:11
Author:Thomas Off, retiolum.de
Info 2:typo3@retiolum.de
Info 3:
Info 4:

LumoNet PHP Include

Extension Key: lumophpinclude

Copyright 2005-2008, Thomas Off, retiolum.de, <typo3@retiolum.de>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Content

Introduction 1

What does it do? 1

Screenshots 2

Usage 3

Requirements 3

Installation 3

Integration of the Plugin 3

Explanation of processing options 3

Known Bugs 4

ToDo 5

Changelog 6

Introduction

What does it do?

This extension lets you include complete external PHP solutions (e.g. message boards or image galleries) into TYPO3. With this extension you are able to select a local PHP script as well as a call a script written in any language on a remote server via a real HTTP request.

LumoNet PHP Include collects all data sent to the page where the plugin is used and transfers it to the called script (this only applies to remote calls as local scripts are just included ans thus have access to all GET, POST and other server data anyway). The user can choose to have GET data transferred to the called remote script (the transfer of POST data, cookies and even the handling of file uploads will be realized in future versions).

LumoNet PHP Include also provides the ability to strip the resulting content of a called remote app so one can use the PHP app stand-alone as well as integrated in a TYPO3 website.

Screenshots

img-1

img-2

Usage

Requirements

This extensions does not rely on other extensions.

Installation

No special installation process is required, just use the normal way via the TYPO3 extension manager.

Integration of the Plugin

Add a new content element of type plugin „PHP Include“ to the desired page.

Choose the type of included script, enter the URL or select/upload a local file and set the desired parameters.If you call a remote script, you might want to check the „Strip non-body parts“ marker to get a valid HTML result page.If you even have markers set in the script, you can use the „Strip content outside markers“ option along with the input field labeled „Marker for stripping“. The marker must be of the form<!-- MARKER --> (Info: This marker is not related in any way to the commonly used markes in extension or page templates!)

To adjust the display of the included code you can use „Wrap output with div“ and have another div tag wrapped around the content to apply additional CSS directives on it. The class of the div tag istx_lumophpinclude_<MD5 hash of included file name>

Call the page in the frontend and check the results.

Explanation of processing options

The following processing options are available for all types of included scripts:

  • Strip non-body parts : Remove everything outside the body tag (including the tag itself) from the fetched script result
  • Strip content outside markers : Strip everything outside the set markers from the fetched script result
  • Marker for stripping : Marker for stripping; must be of the form<!-- MARKER -->
  • Wrap output into div : have another div tag wrapped around the content to apply additional CSS directives on it. The class of the div tag istx_lumophpinclude_<MD5 hash of included file name>

The following options are only available for remote scripts:

  • Rewrite internal links : Change the URL of internal links (i.e. links whose URL does not have a host specified) to point to the same TYPO3 page; the new URL is the added as the URL parametertx_lumophpinclude_url; this way, you can include a whole website.
  • Rewrite local resources (e.g. of images) : Change the URL of all „src“ attriubutes in the fetched script result to point to the original server to have images displayed correctly though the HTML is displayed on your own page

Known Bugs

No bugs known so far.

Please report any other bugs (or suggestions for improvement) to the author of the extension.

ToDo

The following is a list of features to be implemented in future versions:

  • Implement rewriting of external links (i.e. links pointing to another server)
  • Implement transfer of POST data, cookies and uploaded files to forms in the included script
  • Add possibility to use regular expressions for further adjustment of the included content
  • Add possibility to directly enter PHP code to evaluate and include

Changelog

2008-01-04

Replaced the buggy inclusion of remote files via file_get_contents() by a real HTTP request (thereby dropping POST and COOKIE support temporarily)

Added possibility to rewrite the URLs of internal links and local resources

2006-04-24

Fixed erroneus behaviour when including locaL files (thanks to Peter Klein <peter@umloud.dk>

Uses XML instead of PHP files for language string now

Added options to strip non-body parts and wrap script's output with div

Updated documentation

2005-12-23

Initial release.

img-3 LumoNet PHP Include - 6