.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt =============== EXT: SO\_JPSPAN =============== :Author: Kasper Skårhøj :Created: 2002-11-01T00:32:00 :Changed by: Onno Schuit :Changed: 2005-06-09T21:35:49 :Classification: JPSpan library as a Typo3 extension :Keywords: jpspan, ajax :Author: Onno Schuit :Email: o.schuit@solin.nl :Info 3: :Info 4: .. _EXT-SO-JPSPAN: EXT: SO\_JPSPAN =============== Extension Key: **so\_jpspan** Copyright 2000-2002, Onno Schuit, 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 .. _Table-of-Contents: Table of Contents ----------------- **EXT: SO\_JPSPAN 1** **Introduction 1** What does it do? 1 Differences with the original JPSpan library 1 Licence 1 **Users manual 1** **Configuration 2** Usage 2 **To-Do list 3** .. _Introduction: Introduction ------------ .. _What-does-it-do: What does it do? ^^^^^^^^^^^^^^^^ This extension mainly acts as a container for the slightly modified “JPSpan Library”, a framework consisting of php and javascript classes and files for implementing *AJAX: Asynchronous Javascript And XML.* Ajax is a technology to reduce page refreshes, thereby enhancing the usability of a website *.* The Google Suggest autocompletion feature is a famous example of ajax. With the JPSpan library you can improve the usability of your own extensions. In order to avoid redundant code for TYPO3 extensions, we recommend using the JPSpan library of this extension instead of including it in your own extension. .. _Differences-with-the-original-JPSpan-library: Differences with the original JPSpan library ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The so\_jpspan extension uses a slightly modified version of JPSpan to allow the use of query string parameters. This is necessary to pass on the value of the Typo3 parameter *id* with each call of *index.php* . Please find the original source base here: http://prdownloads.sourceforge.net/jpspan/ .. _Licence: Licence ^^^^^^^ The JPSpan Library is released under the PHP License, by Harry Fuecks and Jason E. Sweat. Please read the readme and license files in the EXT:so\_jpspan/jpspan/ directory for more information. .. _Users-manual: Users manual ------------ “Do not open. No user serviceable parts inside”. This extension provides a code base for other extensions but does not offer any functionality to end users. .. _Configuration: Configuration ------------- No configuration is necessary at this point. After installing the *so\_jpspan* extension, just include the jpspan library in your own extension with this codeline: :: require_once (t3lib_extMgm::extPath('so_jpspan').'JPSpan/JPSpan.php'); .. _Usage: Usage ^^^^^ All JPSpan examples are based on file names to control the flow of the application. This is different in Typo3, where we have one file (index.php) which controls the entire cms using the *id* parameter to load specific pages. I have therefore modified JPSpan to allow the use of query string parameters. In the so\_jpspan version of JPSpan, a query string is passed on with each call (except for the “client” parameter, which is omitted from second and subsequent calls). The following is the reworked “autocomplete2” example (which itself is distributed with the JPSpan source code). :: require_once(PATH_tslib."class.tslib_pibase.php"); require_once (t3lib_extMgm::extPath('so_jpspan').'JPSpan/JPSpan.php'); // Load the PostOffice server require_once JPSPAN . 'Server/PostOffice.php'; class tx_sojpspantest_pi1 extends tslib_pibase { var $prefixId = "tx_sojpspantest_pi1"; // Same as class name var $scriptRelPath = "pi1/class.tx_sojpspantest_pi1.php"; // Path to this script relative to the extension dir. var $extKey = "so_jpspantest"; // The extension key. var $view; /** * [Put your description here] */ function main($content,$conf) { $this->conf=$conf; $this->pi_setPiVarDefaults(); $this->pi_loadLL(); /* Application flow is determined by a GET or POST variable "view". * Is there is no value for view, the default view is presented. * Otherwise, the view ultimately dictates which view is presented next. */ if (isset($this->piVars['view'])) { //exit('piVars = '.$this->piVars['view']); $this->view = $this->piVars['view']; } /* Control structure */ //t3lib_div::debug($this->piVars); switch ($this->view) { case "autocomplete2": include_once($ext_path.'autocomplete2_server.php'); break; default: $GLOBALS['TSFE']->additionalHeaderData[$this->extKey]='