How to Transfer TYPO3 Site to a New Host ?

1. Using an FTP Client, such as WinSCP, Connect to your current hosting account.
2. Download to your local computer all the directories and files in the following directories:

/fileadmin
/t3lib
/typo3
/typo3conf
/typo3temp
/uploads
.htaccess
index.php

3. When the download is complete, open the /typo3conf on your local computer and delete all the files that begin with temp_
4. Next, log in to the current hosting account and access your phpMyAdmin.
5. Select your TYPO3 database and then click on the Export tab.
6. Save the file to your local computer.
7. Log in to your new host’s server with your FTP Client and upload all the TYPO3 directories and files.
8. When the files are all uploaded, you will need to change the permissions recursively for /fileadmin, /typo3conf, /typo3temp, /uploads, and index.php to chmod 777.
9. Create new database on new server using phpMyAdmin.
10. Once a new database has been created, import the database you haveve saved on your local computer.
11. Import the database.
12. Open your browswer and type the following in the address bar:
www.yournewsiteURL/typo3/install.

13. When the Install Tool login appears, type in your Install Tool Password and press the Log in Button.(Install tool password will be same as your old site install tool password).
14. Next, click the Basic Configuration link.
15. Scroll down the page to the Directories List to ensure all the TYPO3 directories are writable.
16. In FTP edit your localconf.php
$typo_db_username = ‘user_name’;        // Username of the newly created database.
$typo_db_password = ‘password’;           // Password for newly created database.
$typo_db_host = ‘new.host’;                     // New host.
$typo_db = ‘database_name’;                  // Newly created Database name.
17. Login to your site’s typo3 backend by typing www.yournewsiteURL/typo3
18. Login username and password are same as with the old site.
19. Now you should see all the pages are transferred.
20. Click on “Templavoila” and then “Update mapping”.
21. Type www.yournewsiteURL . Now you should see the content in front end.

How to enable click enlarge image in Typo3 RTE ?

1) Go to the extension manager and click on the extension “htmlArea RTE” and there check “Enable images in the RTE[enableImages]”.  After that click on “Update” on the bottom.

2) Include the static template “Clickenlarge Rendering (rtehtmlarea) “.

include static template

3) Insert the image in RTE and set on “Click-enlarge” option.

Felogin logout redirect does not work

When we try to logout from an access restricted page, we will see either a 404 (Page not found) or a 401 (Authorization required) error.
This issue seems quite old, but unfortunately there are still some bugs when we use the Logout template of the felogin.

The issue is reproduceable even on Typo3 4.2.8, I am not sure if this is fixed on 4.3 onwards.

There is a patch that we can use to patch felogin as given on the following URL:
http://bugs.typo3.org/view.php?id=8677

Due to various reasons it may not always be possible to patch.
In such circumstances it is wiser to use an alternate technique, such as creating the Logout link manually.
One such example is:

[loginUser = *]  

lib.logoutbox = COA
lib.logoutbox {
    20 = TEXT
    20 {
       data = TSFE:fe_user|user|username
       # link to account edit page
       stdWrap.typolink.parameter = 60
    }
    30 = IMAGE
    30 {
        file = fileadmin/templates/images/logout.gif
        stdWrap {
             
             # Let us link to home page for logging out
             typolink.parameter = 1
             typolink.additionalParams = &logintype=logout
             wrap =  |
         }
    }
}

[end]

In this example I am displaying the logged in username (which links to user account page) followed by a working logout button.

Note:
– Here we are not using the felogin plugin.
– Do not link the logout button to any access restricted page.

The following page from Typo3wizard might be useful for displaying more user-details if needed:
http://www.typo3wizard.com/en/snippets/cool-stuff-typoscript/userinfo-for-currently-logged-in-user.html

Dividers to Tabs in Extensions

This article explains how easily we can get Tabs in the content elements of type “insert records”.

Generally we will need to edit tca.php and ext_tables.php.

To be more specific it involves adding two parameters.

1. Specify that you are using dividers to tabs “dividersstabs”
2. Mark all tabs using –div–

Let us see how.

1. Specify that you are using dividers to tabs “dividersstabs”

In the TCA array first look at the start of table definition. Generally this is located

EX:

$TCA['tx_myext_table] = array ( 
        'ctrl' => array ( 
                'title' => 'LLL:EXT:myext/locallang_db.xml:tx_myext_table, 
                'label' => 'title', 
                'tstamp' => 'tstamp', 
                'crdate' => 'crdate', 
                'cruser_id' => 'cruser_id', 
                'languageField' => 'sys_language_uid', 
                'transOrigPointerField' => 'l10n_parent', 
                'transOrigDiffSourceField' => 'l10n_diffsource', 
                'sortby' => 'sorting', 
                'delete' => 'deleted', 
                'dividers2tabs' => TRUE, 
                'enablecolumns' => array ( 
                        'disabled' => 'hidden', 
                ), 
                'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php', 
                'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY).'icon_tx_myext_table.gif', 
        ), 
);

                

In the above config you can see that ‘dividers2tabs’ is set to TRUE

2. Mark all tabs using --div--

This is the step in which you would group all fields into different Tabs. This generally involves editing the TCA config usually locatd in tca.php.

In tca.php, look the section showitem, and add --div--;Tab Name,
EX: 
'types' => array ( 
        '0' => array(
                'showitem' => '--div--;General,
                                sys_language_uid;;;;1-1-1, l10n_parent, 
                                l10n_diffsource, hidden;;1,
                                --div--;Content,title;;;;3-3-3, parentid,top_page,content,
                                --div--;Header and Footer,footer,
                                background_image,background_align'
                ) 
),

As you can see I have added 3 tabs, General, Content, Header and Footer.

The idea is to add --div--; (two hypen followed by div and two hyphen and semicolon)

After semicolon add the “Title of your tab” and followed by a comma.

This section --div--;Tab Name, must be added just before a field, or after a field ends.

That should be it.

Happy coding.