DAM: Bigger Thumbnails in Element Browser

The thumbnail size in the Element Browser can be adjusted with the following method (Be aware that the changes will be lost if you update the extension "dam" since we are going to change things directly in the extension's php code):

File = typo3conf/ext/dam/class.tx_dam_browse_media.php
Class = tx_dam_browse_media
Function = renderFileList
Variable = $clickThumb

Change

$clickThumb = tx_dam_image::previewImgTag($fI, '', $addAttrib);

to

$clickThumb = tx_dam_image::previewImgTag($fI, '150', $addAttrib);

for a maximum thumbnail size of 150 pixels.

I did NOT test what impact these changes have on other parts of "dam" or the cms in genereal - I can not guarantee that everything else will be fine!

Working links in multi domain installation

Links pointing to a page outside of a specific domain but inside the same Typo3 installation only get processed correctly if you set the following option:

config.typolinkEnableLinksAcrossDomains = 1

I had been searching for quite a long time when I finally found the solution at the bottom of a bugtracker entry page...

Prerequisite to get it to work naturally is a correctly configured RealURL-Extension with the appropriate rootpage_id settings.

SEO URLs for "cal" extension

Dealing with "cal" initially was no fun for me - I really struggled with some parts of the configuration, it for example was quite complicated to get it to produce square thumbnails. But let's get to the point...

The problem

Configuring realurl with cal isn't that complicated, but the result looks something like this (with fixedPostVars):

page-with-plugin/tx_cal_phpicalendar/event/2011/may/23/your-event/

Ok, that's not too bad, but when I had the location and organizer displayed on the same page I for the life of me didn't get it to convert the uid to the associated name. The location looked like this:

page-with-plugin/tx_cal_location/location/1/

The crux is the fact that cal uses the GETvar "tx_cal_controller[uid]" for event, organizer and location ids - Pretty stupid in my opinion, but I guess there's a good reason that I don't get...

So because that's not very nice, I configured different sub-pages (invisible in menus) for location and organizer. The URL looked like that now:

page-with-list-and-event-plugin/page-with-location-plugin/tx_cal_location/location/name-of-location/

Much better, but the first two arguments are kind of redundant. If someone has a solution to get that resolved with the standard realurl configuration I'd like to hear it, but I didn't find any solution at all.

The solution

Then I found this website: t3node

First you have to insert two functions above the initial realurl configuration statements:

function user_encodeSpURL_postProc(&$params, &$ref) {
  $params['URL'] = str_replace('calendar/location/tx_cal_location/location/', 'calendar/location/', $params['URL']);
  $params['URL'] = str_replace('calendar/organizer/tx_cal_organizer/organizer/', 'calendar/organizer/', $params['URL']);
  $params['URL'] = str_replace('calendar/tx_cal_phpicalendar/event/2011/', 'calendar/2011/', $params['URL']);
  $params['URL'] = str_replace('calendar/tx_cal_phpicalendar/event/2012/', 'calendar/2012/', $params['URL']);
  $params['URL'] = str_replace('calendar/tx_cal_phpicalendar/event/2013/', 'calendar/2013/', $params['URL']);
}
function user_decodeSpURL_preProc(&$params, &$ref) {
  $params['URL'] = str_replace('calendar/location/', 'calendar/location/tx_cal_location/location/', $params['URL']);
  $params['URL'] = str_replace('calendar/organizer/', 'calendar/organizer/tx_cal_organizer/organizer/', $params['URL']);
  $params['URL'] = str_replace('calendar/2011/', 'calendar/tx_cal_phpicalendar/event/2011/', $params['URL']);
  $params['URL'] = str_replace('calendar/2012/', 'calendar/tx_cal_phpicalendar/event/2012/', $params['URL']);
  $params['URL'] = str_replace('calendar/2013/', 'calendar/tx_cal_phpicalendar/event/2013/', $params['URL']);
}

Then you have to have realurl call them:

$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
  'encodeSpURL_postProc' => array('user_encodeSpURL_postProc'),
  'decodeSpURL_preProc' => array('user_decodeSpURL_preProc'),
  [ ... the rest of your configuration ... ],
);

Apart from those two things you need to have a working realurl configuration for the event/list, organizer and location page, of course.

The result are URLs that lool like this:

page-with-plugin/2011/may/23/your-event/

page-with-list-and-event-plugin/page-with-location-plugin/name-of-location/

If you have any questions, feel free to contact me!