Category Archives: TYPO3

TYPO3 is an Open Source Content Management System (CMS).

disable deprecation log

In TYPO3 Version 4.3 a deprecation log has been introduced. It logs the use of outdated functions of the TYPO3 Core.
This is a hint for Admins or Developers of Extensions to update their
extension.
The output file is written to typo3conf/deprecation_….log.

But in some Webcases this file grows to fast. In this situation you may want to disable this function.

You can search it in the install tool. In “All Configuration” you find “enableDeprecationLog”.

There are different settings. An empty field disables.

Another way is to directly edit typo3conf/localconf.php.

Add there the line:

$TYPO3_CONF_VARS['SYS']['enableDeprecationLog']= '';

Afterwards delete the temp_CACHED_… files.

 

Solving mm_forum problems: cron registration avatar smilie

While working with mm_forum you could face some problems. It seems to me that they are more or less common.

Cronjob

Setting up a cronjob for indexing the search is quite easy. You can do it like this

-*/15 * * * * user Lynx
"http://www.domain.tld/forum/search.html?tx_mmforum_pi4[ind_auto]=1
&tx_mmforum_pi4[indexingPassword]=admin" –accept_all_cookies > /dev/null

But it is recommended, that you change the password before starting the script. In the mm_forum-manual it is written: “It is strongly advised that you change this password to another value of your choice”. Because it is a security-risk.

You may look for a free md5 hash service in the web. There you get a hash code for your password. Afterwords you change the cron-rule: change “admin” to whatever you calculated.

Apres you must change the default-password either with constants-editing or Typoscript-rule:

"plugin.tx_mmforum.indexingPassword = 21232f297a57a5a743894a0e4a801fc3;"

Smilies

The smilies sometime don’t work. You get code like “javascript:editor.insertSmilie(‘:cry:’)” or similar. To change this it is as simple as you could imagine (if you are used to TYPO3): go to the template modus. Change the sorting of the static included templates, bring the template concerning jQuery and mm_forum to the first place.

Adding avatar failed

User could not add an avatar image to their profile. An update to mm_forum 1.9.2 solved this problem.

Self Registration failed

I an user self registrates, the user was added to the system but could not login. An Update to mm_forum 1.9.2 solved this problem to, which was caused by a false entry to the flag “bind to domain”.

 

Give common user (non-admin) admin rights to install extensions or edit users

Sometimes you need to give a common user some admin rights but without to set the flag admin (named admin-flag or admin-only). As there is no extension which could help, you must edit some core files.

Be sure to make a backup before and after the changes – be sure that after an update of the TYPO3 core your changes are gone.

Edit the file /typo3/mod/tools/conf.php. Change

$MCONF['access']='admin';

to

$MCONF['access']='user,group';

Now you can see in the configuration of this user group in the tab “Access Lists” below the part “Modules” the item “Admin tools”.

To see some sub-items you must change their conf files to and later assign the rights to the special user group in the configuration of that group.

To see “log” you should change the file /typo3/sysext/belog/mod/conf.php. Change

$MCONF['access']='admin';

to

$MCONF['access']='user,group';

To see “User Admin” you change in the file /typo3/sysext/beuser/mod/conf.php

$MCONF['access']='admin';

to

$MCONF['access']='user,group';

To see “Templates” edit typo3/ext/tstemplate/ts/conf.php

$MCONF['access']='admin';

to

$MCONF['access']='user,group';

That a common user can save changes to templates you ought to change also in the file typo3/sysext/cms/ext_tables.php in the part $TCA[‘sys_template’]

'adminOnly' => 1,

to

'adminOnly' => 0,

To see “Ext Manager” change /typo3/mod/tools/em/conf.php

$MCONF['access']='admin';

to

$MCONF['access']='user,group';

Later go to the tab “Options” and write in the text area below “TSconfig”

options.clearCache.pages = 1 
options.clearCache.all = 1

so the users of this user group has the ability to clear the cache.

And gave the user groups rights to edit all pages in “Web” and “Access”.

Don’t forget two things: add the wanted rights to this user group and delete the cache.

powermail jquery javascript conflict

If you have installed powermail and you use another tool / extension which uses another javascript framework, you may want to deactivate the powermail use of jquery.

Write in constants:

plugin.powermail.js.validation = 0

If this isn’t enough, like it was for me within powermail 1.6.3, than write in setup:

page.includeJSFooterlibs {
 powermail_jQuery.external = 0
 powermail_jQuery =
 powermail_jQueryTools.external = 
 powermail_jQueryTools =  
 powermail_frontend = 
}

That should to the trick.

Bytheway try the fancy powermail css layout, it is nice and out of the box.

Install RealURL

The TYPO3 extension RealURL changes generated URLs like “index.php?id=5&L=2” to speaking URLs like “spanish/news/article/”. The goal is to deliver URLs which are self explanatory to humans.

To work it needs Apache module mod_rewrite.

Install it in the Extension Manager.

TYPO3 delivers a _.htaccess-file, change it to .htaccess.

In the Root-Setup of your TYPO3 installation put this lines:

config.simulateStaticDocuments = 0
config.baseURL = http://yourdomain.com/
config.tx_realurl_enable = 1

The first line deactivitates SimulateStaticDocuments, which has conflicts with RealURL.
The second line must be changed to your domain. The command renders a base href tag in html: . The slash at the end is required
The third line activates RealURL.

Normaly the extension works out of the box. Only special situations needs deeper treatment.

Use RealURL in sub-directory

Write this in the TYPOSCRIPT-Setup:

config.simulateStaticDocuments = 0
config.baseURL = http://localhost/subdirectory/
config.tx_realurl_enable = 1

And this to your .htaccess-file.

RewriteBase /subdirectory/

While “subdirectory” is the name of the sub-directory. Change this to your purpose.

If it doesn’t work, look if you try hard-coded links, which is a common mistake. I did it last day, ;-).

simplevcard error message after upgrading PHP

If you get this error messages: 

t3lib_error_Exception PHP : Function split() is deprecated

in /.../.../typo3conf/ext/simplevcard/class.tx_simplevcard_markers.php line 44

for simplevcard after upgrading PHP

comment out in class.tx_simplevcard_vcard.php on line 44

// $arrFields = split(",", $conf['linkTitleFields']);

and add this

$arrFields = explode(",", $conf['linkTitleFields']);

[Update: 2011.03.10] There are more deprecated calls further on

PHP : Function split() is deprecated in 
/../../typo3conf/ext/simplevcard/class.tx_simplevcard_vcard.php line 209
PHP : Function split() is deprecated in 
/../../typo3conf/ext/simplevcard/class.tx_simplevcard_vcard.php line 212
PHP : Function split() is deprecated in 
/../../typo3conf/ext/simplevcard/class.tx_simplevcard_vcard.php line 329

You could solve this like written in example above. Thanks to Barmann [/Update]

typoscript browser switch

Sometimes you need to detect an user agent, something like a browser switch. In Typoscript you can do it very simple.

For Opera, providing a Opera specific css file.

[browser = opera]
page.includeCSS {
file5 = fileadmin/css/opera.css
}
[END]

For Internet Explorer and version equal or smaller than version 7

[browser = msie] && [version =< 7.0]
page.includeCSS {
file5 = fileadmin/css/ie7.css
}
[END]

You do find more information in the tsref.