Tag Archives: TYPO3

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.

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, ;-).

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.

mm_forum – which captcha

For a project I installed mm_forum. It is nice, it works more or less out of the box. At one point I get stuck. At the registration process I need a captcha function. In the configuration of mm_forum is a checkbox with whom you can activate the use of a captcha extension but it was not written which extension this could be. There are about 10 extension with captcha functionality.

At least I do understand it. There was written, the “captcha” extension, what pointed out, that there is an extension with the extension key “captcha”. And it was …



this one



Title “Captcha Library”, extension key “captcha”, version “1.1.1”, last update “03-12-09”, from “Kasper Skårhøj” and downloaded “20.555” times.

So I installed it, don’t changed anything at the installation process. It works out of the box with mm_forum.

How to upgrade TYPO3

Backup your entire webroot folder and the database. It is eminent to save the file localconf.php in typo3conf.

You can save the database by using phpMyAdmin or using this command in console

mysqldump -a --add-drop-table   -u'database user name' -p'password'
-h'host' databasename > databasename_date.sql

Download here http://typo3.org/download/packages/ the last stable version. If you have a web case with separated core-files, you only need the “Source” package. Otherwise you need the “Source + Dummy” version.  Unzip it on your workstation or use “wget” on Unix based systems on the web server and decompress it there.

If you have a separated instance, copy the source directory to a place outside webroot, delete the old symlink to source and create new one.

unlink typo3_src
ln -s ../typo3_src-4.3.3 typo3_src

If you haven’t separated source and dummy part, copy all the files to the webroot (overwrite the old ones).

Copy the file “localconf.php” from your backup to the directory typo3conf (overwriting).

Call the back end of your installation on www.yourDomain.com/typo3/ and log in as Admin.
Create an install unlock file (named ENABLE_INSTALL_TOOL) in the preferences of the admin user. Log in to the Install-Tool.

Click on “Database Analyser” and then the function “COMPARE”.

If you don’t see any obstacles straightaway, select the check boxes and press the button “Write to database”. Repeat this procedure as often as it is recommended.

Go back to the “DB Check” on the left module area and check the Reference Index. Run first “Check now”. If some changes could made, then “Update now”.
At the end you should see what was updates and that the “Index Integrity is perfect.”

Delete the entire cache and the cache files under typo3conf. These start with “temp_CACHED_ …”.

No Translate to anymore

You do use TYPO3 nice language features. If you copy content to a new language you don’t like the term “Translate to” in the title of content elements and want to disable it.

You can change this in TCA. Find

$TCA['tt_content']['columns']['header']['l10n_mode'] = 'prefixLangTitle';
$TCA['tt_content']['columns']['bodytext']['l10n_mode'] = 'prefixLangTitle';

Change it to

$TCA['tt_content']['columns']['header']['l10n_mode'] = '';
$TCA['tt_content']['columns']['bodytext']['l10n_mode'] = '';

So in the header and bodytext the terms “Translate to” aren’t shown anymore.