Jump to content

How to show this php code just after <body> in header.tpl?


Recommended Posts

It might be possible without a module just by editing header.tpl in your theme. For example, something like:

{if !empty($smarty.server.HTTP_X_FORWARDED_FOR)}
    {assign var='ip' value=$smarty.server.HTTP_X_FORWARDED_FOR}
{else}
    {assign var='ip' value=$smarty.server.REMOTE_ADDR}
{/if}
<script type="text/javascript">var ip = '{$ip}';</script>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...