[TYPO3-english] IP-Filter for Content Elements

contact at intermediaware.com contact at intermediaware.com
Wed Feb 25 16:53:59 CET 2009

Hi folks,

I have a problem since a few days now, and I really hope someone of you typo3-experts can help me.

I want to add a small feature to the Typo3-Backend. The Backend-Users should be able to enter a IP-Address into each content element. 

If this field is entered with data the content should only be rendered if the frontend-user's ip is equal to the one saved in the content element.

I have extended the tt_content table using kickstarter and now have a input area in each content element where I can enter an IP-Address.

I now tried to add the functionality using Typoscript in my template, but it doesn't work: Here ist my TypoScript-Code:

subparts.CONTENT {		
	table = tt_content
	select.orderBy = sorting
	select.where = tx_ipadress_ipadress = getenv:REMOTE_ADDR

It works fine if I replace "getevn:REMOT_ADDR" with a "static" IP - but of course, this is not what I want to achieve.

Do you have any idea how this can be solved?

It would also be nice if it allows the user to use wildcards (something like "123.123.*.*") if this is possible.

Thanks... Joe

More information about the TYPO3-english mailing list