Home Contact Us Sitemap News Forums Japanese Lessons Fan Art Fan Fiction Download
Main Menu
  Community
News
Forums (ext.)
Log In
Register Account
Resources
Fan Art
Fan Fiction
Stories
Japanese Lessons
Cutest Anime Girl
Downloads
Links
Sitemap
Documentation
All Anime World FAQ
Site Search
Affiliates
Link Us!
Impressum
 
Catnip Box
  ###DROPBOX###  
Toolbox
   Print View
 Text Only
 Bookmark us!
Call a dog and they come, call
a cat and they take a message
and get back to you later.
Oldwrench, chat 13th Apr

 
Affiliates
 




Firefox 3
- More Cool Sites -
 

 
Warning

After updating from TYPO3 < 4.0 to 4.0 or later versions, the plugin might stop working. In this case, just uninstall and immediately reinstall the plugin.

Please note, the layout of the 4.0 version of TYPO3 is very different to the old login screen so you might want to change the image sizes.


Introduction






Examples of our logon images

The TYPO3 backend login displays a nice image left of the actual username/password login box. Currently an image of a pair of gloves is used. If you happen to install the CVS version of TYPO3 the image will differ from what you're used to see. I remember a yellow flower in older versions (3.6) of TYPO3 an image that is still present in /typo3/gfx/ named loginbox_image_360.jpg. What's happening there?

 

TYPO3 has a very cute feature which changes the login box image on certain circumstances. The code is actually in /typo3/index.php. Browsing this code I found another great feature: TYPO3 is also able to „rotate“ images given in a certain directory! All you have to do is, point TYPO3 to this directory. TYPO3 will load all image files in this directory and display a random image.

 

The way to show TYPO3 this directory is by setting the variable $TBE_STYLES['loginBoxImage_rotationFolder'] = path_to_dir/

 

Unfortunately there is no way to to so without some programming. The TYPO3 init script explicitly deletes the whole array before initializing the backend. The only way to set variables is by creating an extension.

 

This super-short Mini-howto will tell you how to set up this wonderful feature in 5 easy steps. I will assume you have access to your webserver by FTP and can create directories and upload files by FTP.


This is a short overview how it works:

  1. Set up a folder with images
  2. Create an extension
  3. Add 1 line to this extension and point TYPO3 to your image directory
  4. Install extension


Setting Up the Image Folder

First you have to prepare the images. One image is fine but of course the more the better. The original images are 200x133 pixel in size, I suggest you create some cute images of the same size but it's not necessary. Allowed are png, jpg and gif images.

 

Log on to your website using your favorite FTP tool. You can also set up a TYPO3 filemount to do the same.

 

Go to the directory typo3conf/

 

Create a new empty directory 'logonimages'. (Without quotes)

 

Copy the prepared images to this folder.


Create the Extension






Click images to enlarge. Image count from top to bottom.

„What? I never created an extension! I can never do this!“ - if that's what you say you're wrong. You can follow detailed instructions – and all we have to write is one single line of code – which you can as well copy from this document if you used the directory from the last step.

 

Log on to the TYPO3 backend as administrator. Ignore the ugly log on image <(^.^)>

 

In the Tool menu use „Ext Manager.“ Of course you need to have this module installed. Showing you how to install extensions from the TER (TYPO Extension Repository) is not goal of this Mini-HOWTO.

 

Chose the item „Make new extension“ from the dropdown menu as shown in image [1].

 

In the field "Enter Extension key" you type "user_enhancelogin". Then click on the button "Update." See image [2].

 

Click on the plus symbol next to the line saying „General Info.“ Fill the form like shown in image [3]. Don't forget to hit the "Update" button!

 

In the menu to the left click on the plus symbol next to „Extend existing tables.“ You do not need to type something there. It's just done to create the empty framework for our single line of code.

 

At the bottom left of the content frame there is a button now saying „View Result.“ Click it. The result will look like that in image [4]. One really, really important note: Before proceeding you need to make sure in the location dropdown "LOCAL" is chosen! If you fail to do so, your extension might show up for all installations and - if installed -might yield in unexpected results.

 

Now click the "WRITE" button and the raw empty extension is created.

 

That wasn't too complicated, was it?

 


Programming

As a result of the last step, a basic framework of extension has been written to the directory /typo3conf/ext/user_enhancelogin/

 

Now to the programming. Log on to your website using FTP and edit the following file:

 

typo3conf/user_enhancelogin/ext_tables.php

 

There are different ways to do this. Most advanced FTP programs have an "edit" button. Please refer to your FTP program's documentation.

 

Now this is what ext_tables.php should look like. As you can see there is only one line added.


<?php
if (!defined('TYPO3_MODE')) die('Access denied.')
$GLOBALS['TBE_STYLES']['loginBoxImage_rotationFolder'] = 
                                         '../typo3conf/logonimages';
?>

Installing the Extension

After saving the extension there should be a success message and a link to install your new extension. Click it.

In the menu to the left please click the link „Clear temp_CACHED.“ In case you ever wondered what this link is for – this it is.

Log out of the TYPO3 backend and test the setup. If you followed the instructions of this manual you should now see your prepared images instead of the glove. [1]





This work is licensed under a  Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Germany License


All articles by Olray and Sakura

 Fantasy Name Generator
 UTF-8 howto
 TYPO3 scaling images by code
 TYPO3 Power-Linking
 TYPO3 Rotating Images

 
Privacy Policy | Terms & Conditions