dont copy files to uploads/pics/ in TYPO3

there are some reasons why TYPO3 copies every file into the well known uploads/pics/ folder that you “reference” in the backend in content elements. after copying the file there, it´s (ordinarily) protected from being deleted by the newb user or changes. if the editors changes stuff, the file is copied again after save with the _01 appendix. that leads to a bunch of issues like orphan files. theres some solution for that, but it is best to prevent that for good — if you like.

$TCA['tt_content']['columns']['image']['config']['internal_type'] = 'file';

that put into extTables.php or so sets that the file is used as is. the file is linked to where the user did upload it and no file reference is created.

connect to a webdav with windows 7

if you try to enable the webdav (web based distributed authoring and versioning) service with a linux server and apache2 it´s a piece of cake. the only thing you need to keep in mind is to make it ssl and auth_digest. this is so that windows clients can connect to the thing. theoretically. after all my unsuccessful attempts with the wizard ( i tried it like a hundred times with all different url formats ) a desperate try with net use made it work!

net use z: \\subdomain.domain.tld@SSL:443\webdavfoldername

will ask for a user and a password to gain access and to mount the webdavfoldername (your webdav alias in apache´s virtualhost conf) to drive letter z:

this is a hell of a lack that windows 7 has, but of course webdav seems to be an anathema to microsoft.

useful addendums to the command above are /persistent:yes and /User:user password and i hope it helps you save worthy hours.

replyto with the standard mailform ce in TYPO3

if you want the standard mailform content element in TYPO3 to send emails not from the ugly www-data@server.com sender but the writer´s email adress and name you just need to use explicitly labelled fields as follows:

  • from_name
  • from_email

This will do the trick. But there´s even more. If you need to provide a reply-to attribute you can do this by using these fields (which may be hidden):

  • replyto_name
  • replyto_from

Well, nowadays i´d recommend sophisticated mail form extensions like powermail but if you happen to edit a project that might help :)

tooltips with ext:contagged

for some reason the very good extension contagged does not provide the dropdown to select what type of term the current item is. so all my entries in the sysfolder “terms” have type 0.

the little tweak in the userTS changes all newly created terms to be a tooltip:

TCAdefaults.tx_contagged_terms.term_type = tooltip

a small UPDATE in mysql made the already existing terms to tooltips as well. a post before i saved how to have only contagged items in this sysfolder.

to avoid editor´s overkill when just creating a little tooltip i also remove some fields from the very flexible contagged terms item in PageTS:


TCEFORM.tx_contagged_terms {
 image.disabled = 1
 imagecaption.disabled = 1
 imagetitle.disabled = 1
 imagealt.disabled = 1
 exclude.disabled = 1
 term_type.disabled = 1
 term_replace.disabled = 1
 desc_short.disabled = 1
 starttime.disabled = 1
 endtime.disabled = 1
 fe_group.disabled = 1
 sys_language_uid.disabled = 1
}

i also do hide fe_group access dropdown and the system´s language selector thus making the backend experience more simple.

control leds at the numark mm control

today i got my numark mixmeister control surface and i not even installed the included software since i mix music with my traktor pro. the mm control provides all the encoders i need to completely remove the keyboard and mouse from my mixing hours. input mapping worked okay due to the cool controller editor from ni, but making the controller show stuff like track cueing or fx status… that worked not so well.

as i didnt find them over the net: these are the (channel 1)  notes to trigger the leds of the mm control

C#6    Preview
C6     Jog Wheel
B5     Fader 4
A#5    Fader 3
A5     Fader 2
G#5    Fader 1
G5     Mix top
F#5    Stop top
F5     Play top
E5     Mix bottom
D#5    Play bottom
D5     Stop bottom

C#5    T6
C5     T5
B4     T4
A#4    T3
A4     T2
G#4    T1

G4     S4 orange
F#4    S4 green
F4     S3 orange
E4     S3 green
D#4    S2 orange
D4     S2 green
C#4    S1 orange
C4     S1 green

weird thing is, that you need to substract one octave from every note inside traktor´s controller editor. so, if you read D4 make it D3 and you´re fine.

simple way to access websites that seem to be censored

fortunately, i find myself living in a country that appears to accept freedom of speech, freedom of data. while i´m quite aware that this ideology is not to be supported in future concepts to keep masses controlled i find every citizen should try to gain knowledge in bypassing common web censoring methods. how do you think about that? i find this very interesting and simultaneously hope that the information in the web remains free.

bypass ip locks

if you happen to sit behind an ip barrier that i.e. stops wikileaks you might bypass it in ways (free of charge) like these

  • use translate.google.com and open the page that is censored, if google is not cooperating with the bad guys ;)
  • use compressor services like loband if you can live with the html only version
  • use proxies –> ixquick allows you to use a search result in proxy manner
    • use ixquick search engine and search for the censored page
    • click “proxy” behind the url of interest, then ixquick will serve as proxy

ixquick screenshot

simple thing to do and it does not cost anything. of course you could set up tor to communicate privately (hence making ip resolving useless).

another approach would be to ask a service like web2mail to compress the website you want to see and let them send it to your email box. then you see the requested page after unpacking the file you received. clicking a link would result in asking web2mail for the target and another email.

All these ways were told during a talk at this year´s sigint that you can watch at media.ccc.de

new database with user in mysql console

this will create a new database on the server with the new user having all rights granted on that db.


CREATE USER 'uname'@'localhost' IDENTIFIED  BY 'pass';

GRANT  USAGE ON *.* TO 'uname'@'localhost' IDENTIFIED  BY 'pass' WITH  MAX_QUERIES_PER_HOUR 0  MAX_CONNECTIONS_PER_HOUR  0  MAX_UPDATES_PER_HOUR  0  MAX_USER_CONNECTIONS  0 ;

CREATE  DATABASE  IF  NOT  EXISTS 'uname' ;

GRANT  ALL  PRIVILEGES  ON 'uname'.*  TO 'uname'@'localhost';

if there´s a problem when creating the database,  do not use the ‘ ‘ signs around the db name.

just to avoid phpmyadmin for this little task ;) i didn´t like to look that up everytime.

get user ip from behind reverse proxy setup

small problem, wide reach. if your TYPO3 is set up behind a reverse proxy (like pound) and you need the ip connection information of the visitors, T3´s userfunction method comes in handy.

fileadmin/scripts/fwdip.php


<?php
class user_fwdip {
 var $cObj;
 function main($content,$conf){
  $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
  return $ip;
 }
}
?>

This is the file you´d like to ask for the ip from within TYPO3.

To be able to use this file in a userfunc style you´ll need to include the file in TypoScript, i put it into an own TS template on one special page.


page.includeLibs.fwdip = fileadmin/scripts/fwdip.php

You now could put the stuff on the same TS template but i recommend this neat extension to generate the output to one special page in a content element. The extension wraps the TS in a COA.


20 = USER
20 {
 userFunc =user_fwdip->main
}

Now the page you put the element on should show your real ip address, instead of the proxy ip.

Simple, but fully worth a snippet.