[Typo3] Display User IP Address

Alexander Heidl aheidl at fulcio.co.uk
Fri Nov 11 13:31:19 CET 2005


Floyd,

Yes and no. Wll, the TS (TypoScript) defines a TS object containing the
textual information of the IP address (getenv). This object can be placed
anywhere with either TemplaVoila, the template autoparser or manually. It
really depends on your Typo3 configuration. Explaining how to do that in
particular would be too much at this point. Please check out the tutorials
for that.

However your configuration is set up, this TS object may be place within
your described DIV tags. As I said, it may be and its all down to your
template construction. It wont be simply placed within such a DIV tag if you
don't tell Typo3 to do so...

BR,

Alex
http://www.fulcio.co.uk

-----Original Message-----
From: typo3-english-bounces at lists.netfielders.de
[mailto:typo3-english-bounces at lists.netfielders.de] On Behalf Of Floyd
Arguello
Sent: 11 November 2005 00:30
To: typo3-english at lists.netfielders.de
Subject: Re: [Typo3] Display User IP Address

Alexander Heidl wrote:
> Floyd,
> 
> For several of my domain names I have got a holding page where I display
the
> domain the user has requested: http://www.startstep.com for example. This
is
> done by the little TS:
> 
> lib.domainname = TEXT
> lib.domainname.data = getenv:HTTP_HOST
>  
> Now if you adopt this to something like:
> 
> lib.ipaddress = TEXT
> lib.ipaddress.data = getenv:REMOTE_ADDR
> 
> Then lib.ipaddress will contain the IP address of the user. As this is a
TS
> object you can place this anywhere for FE rendering. I am using TV for
> rendering; hence this objects starts with lib and is placed in within a
DIV
> tag.
> 
> BR,
> 
> Alex Heidl
> http://www.fulcio.co.uk
>  
> 
> 
> -----Original Message-----
> From: typo3-english-bounces at lists.netfielders.de
> [mailto:typo3-english-bounces at lists.netfielders.de] On Behalf Of Floyd
> Arguello
> Sent: 10 November 2005 06:19
> To: typo3-english at lists.netfielders.de
> Subject: [Typo3] Display User IP Address
> 
> Hi all,
> 
> I'd like to display the user's IP address on a form page, and was 
> wondering if anyone had any experience and could point me in the right 
> direction?
> 
> Thanks,
> Floyd
> _______________________________________________
> Typo3-english mailing list
> Typo3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
> 
> 

Hi Alex,

Forgive me if I sound a little daft... this is the first site I've built 
with Typo3. This is what I understand:

Place these 2 lines into the template setup:
  lib.ipaddress = TEXT
  lib.ipaddress.data = getenv:REMOTE_ADDR

Place this on my page:
<div id="ipaddress"> </div>

This solution seems much simpler than the PHP code I had found... thanks 
for that.

Floyd Arguello
_______________________________________________
Typo3-english mailing list
Typo3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english





More information about the TYPO3-english mailing list