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.

Browser Tutorial Development (en)

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:dirk
Changed:2014-10-07T19:29:21
Classification:browser_tut_development_en
Description:Develop the Browser - the TYPO3-Frontend-Engine. This is a manual, how to use the SVN-Repository.
Keywords:browser, typo3 without php, development, svn
Author:Dirk Wildt, Die Netzmacher
Email:http://wildt.at.die-netzmacher.de
Website:http://die-netzmacher.de
Language:en

img-1 img-2 Browser Tutorial Development (en) (extkey: browser_tut_development_en) img-3

Browser Tutorial Development (en)

Browser - TYPO3 without PHP

Develop the Browser - the TYPO3-Frontend-Engine. This is a manual, how to use the SVN-Repository.

img-4

Version: 6.0.0 - 2014-10-07

Extension Key: browser_tut_development_en

Language: en

Keywords: browser, typo3 without php, development, svn

Copyright 2008-2014, Dirk Wildt, Die Netzmacher, <http://wildt.at.die- netzmacher.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.org

Introduction

What does it do?

This is a tutorial for the extension Browser (extkey: browser).

It is

  • a manual for developing the browser especially
  • how to use the SVN repository on forge.typo3.org

The Browser and SVN

Download / checkout of the Browser

$ cd typo3conf/ext/

$ svn co https://svn.typo3.org/TYPO3v4/Extensions/browser/trunk browser

If you are need an initial checkout, please take a look in the section "The first time – initial check out" on page 4 below.

Update your Browser version

$ svn update

U foo.c

U bar.c

Updated to revision 2.

$

Upload / commit the Browser

First you have to checkout the Browser (see above).

$ cd typo3conf/ext/browser

$ svn add *

$ svn st

$ svn commit -m 'my comment'

Sende ChangeLog

Sende ext_conf_template.txt

Sende ext_emconf.php

Sende lib/class.tx_browser_extmanager.php

Sende lib/locallang.xml

Sende pi1/class.tx_browser_pi1.php

Sende pi1/class.tx_browser_pi1_filter.php

Sende pi1/class.tx_browser_pi1_marker.php

Sende pi1/class.tx_browser_pi1_template.php

Sende pi1/class.tx_browser_pi1_views.php

Sende pi1/class.tx_browser_pi1_wrapper.php

Sende pi1/class.tx_browser_pi1_zz.php

Sende static/setup.txt

Übertrage Daten .............

Revision 43025 übertragen.

Comment

  • svn add *: add all (new and changed) files to your local svn index
  • svn st: display your local svn index
  • svn commit: commit / upload your changings

The first time – initial check out

If you have a local version of the browser but without any SVN folder, you can initiate a local SVN version this way:

$ mv browser browser.bak

$ svn co https://svn.typo3.org/TYPO3v4/Extensions/browser/trunk browser

$ mv -u browser.bak/* browser

$ cd browser

$ svn add *

Resolve a conflict and other problems

Sometimes there is a conflict between the files of your working directory and the files in the repository.

Maybe you can resolve the conflict with the following steps

... is out of date

You try to commit your files, and there is an conflict, you will get a message like:

Item '/org/trunk/res/html/doc' is out of date

Example

[dwildt@localhost org]$ svn commit -m '2.0.9 mv document module to download module'

Anmeldebereich: <https://svn.typo3.org:443> TYPO3 SVN Access

Passwort für »dwildt«:

Sende ChangeLog

...

Ersetze res/html/doc

svn: Übertragen schlug fehl (Details folgen):

svn: Item '/org/trunk/res/html/doc' is out of date

Step 1: Update

Make a update.

Example

[dwildt@localhost org]$ svn update

C static/doc

C res/html/doc

Revision 54475.

Konfliktübersicht:

Baumkonflikte: 2

Step 2: Resolve the conflict

Try to resolve the conflict like in the example below. Take the parameter:

  • base if the repository is the proper version
  • working if your working directory is the proper version

Example

[dwildt@localhost org]$ svn resolve --accept=working org/org/res/html/doc

Konflikt von »org/org/res/html/doc« aufgelöst

Step 3: Commit your files

Now commit your files again.

... version control
Example

$ svn add res/e-payment/

svn: warnung: »res/e-payment« befindet sich bereits unter Versionskontrolle

Solutions

$ svn revert res/e-payment/

Rückgängig gemacht: »res/e-payment«

$ svn revert --depth infinity res/e-payment/

Rückgängig gemacht: »res/e-payment«

Hard Core Resolving
Remove the SVN management

$ mv deal deal.bak

$ cd deal.bak

$ find . -name ".svn" -print | xargs /bin/rm -Rf

Another Initial Checkout

Next step see "The first time – initial check out" on page 4 above.

Branches

Englisch http://svnbook.red- bean.com/nightly/en/svn.branchmerge.maint.html

German http://svnbook.red- bean.com/nightly/de/svn.branchmerge.maint.html

New

If you have a local version of the browser but without any SVN folder, you can initiate a local SVN version this way:

$ mv browser browser.bak

$ svn co https://svn.typo3.org/TYPO3v4/Extensions/browser/branches browser

$ cd browser

...

Update extensions without TYPO3

Upload extension

root@gera:/opt/scripts/typo3#./t3xutils.phar upload username password introductionplus"1.2.0 Feature detachable multi columns menu, bugfix chrome and IE"/var/www/typo3_62.local/typo3conf/ext/introductionplus

Result in case of success

array(3) {

["resultCode"]=>

string(5) "10504"

["resultMessages"]=>

array(1) {

[0]=>

string(118) "Please note that it might take a while (up to an hour) until your extension and the documentation appear on TYPO3.org."

}

["version"]=>

string(5) "1.2.0"

}

Help

root@gera:/opt/scripts/typo3# ./t3xutils.phar

Usage: ./t3xutils.phar help

./t3xutils.phar version

./t3xutils.phar updateinfo

./t3xutils.phar info <extensionKey> [<version>]

./t3xutils.phar fetch <extensionKey> [<version>] [<destinationPath>]

./t3xutils.phar upload <typo3.org-username> <typo3.org- password><extensionKey> "<uploadComment>" <pathToExtension>

./t3xutils.phar extract <t3x-file> <destinationPath>

./t3xutils.phar listfiles <t3x-file> [details]

./t3xutils.phar create <extensionKey> <sourcePath> <t3x-file>

./t3xutils.phar checkforupdate

./t3xutils.phar selfupdate

DRS - Development Reporting System

Develop the DRS and gets support for yourself

...

dev_var_dump

Prompting for my IP only

dev_var_dump enables you to prompt content into the frontend, which will displayed for a visitor with your IP only.

Characteristics

The Browser has an own var_dump method for developing.

It is similar to var_dump:

it prompts the given content into the frontend

but

  • It checks weather the current IP is in the list of the allowed IPs (configurable by the extension manager).
  • If the current IP isn't proper, dev_var_dump will return nothing.
  • dev_var_dump wraps the content with <pre>...</pre>
  • If you prompt an array, you will have a tree view.
  • dev_var_dump reports a security warning to devlog.
Parameters
  • Content for prompting. Type is mixed.
  • Amount of parameters is unlimited.
PHP snippet

$my_prompt = array('Hello world', array( 'green', 'red' ) );

$my_other_prompt = array('Hallo Welt', array( 'gruen', 'rot' ) );

$this->pObj->dev_var_dump( $my_prompt, $my_other_prompt );

Result

<pre>tx_browser_pi1_sql::init (line 119):

type: array

array (

0 => 'Hello world',

1 =>

array (

0 => 'green',

1 => 'red',

),

)

...

</pre>

Minify *.css and *.js

Precondition

Intalled JavaScript/CSS minifieryui-compressor-2.4.7-1

Samples

Sample directory

$ tree -L 1

.

├── jquery

├── map

├── tx_browser_pi1_ajax-0.0.5.js

├── tx_browser_pi1_ajax_languages.js

└── tx_browser_pi1.js

Minify a *.js-file

$ java -jar /usr/share/yui-compressor/yui-compressor.jar --type js -v tx_browser_pi1.js -o 'tx_browser_pi1-min.js'

$ tree -L 1

.

├── all-min.js

├── jquery

├── map

├── tx_browser_pi1_ajax-0.0.5.js

├── tx_browser_pi1_ajax_languages.js

└── tx_browser_pi1.js

Minify all *.js-files

$ java -jar /usr/share/yui-compressor/yui-compressor.jar --type js -v *.js -o '.js$:-min.js'

$ tree -L 1

.

├── all-min.js

├── jquery

├── map

├── tx_browser_pi1_ajax-0.0.5.js

├── tx_browser_pi1_ajax_languages.js

└── tx_browser_pi1.js

Minify and merge all *.js-files

$ java -jar /usr/share/yui-compressor/yui-compressor.jar --type js -v *.js -o 'all-min.js'

$ tree -L 1

.

├── all-min.js

├── jquery

├── map

├── tx_browser_pi1_ajax-0.0.5.js

├── tx_browser_pi1_ajax_languages.js

└── tx_browser_pi1.js

Further Information

Tutorials

This tutorial in PDF format

You find this tutorial as a PDF file at

Forum

img-5 Illustration 1: The TYPO3-Frontend-Engine Browser Forum

The Browser has its own forum (leading language is German).You are welcome to post any question, bug or snippet code at

TYPO3-Frontend-Engine Browser: Forum http://typo3-browser-forum.de/

Helpful suggestions

If you have helpful suggestions, feel free to publish any question, bug or code snippet on

http://typo3-browser-forum.de/

Posts are welcome in English and German.

Change log

3.9.14 Update for Browser 3.9.14

3.6.1 Initial release

Illustration Index

Illustration 1: The TYPO3-Frontend-Engine Browser Forum 12

Alphabetical Index

16