O'Reilly logo

CMS Made Simple Development Cookbook by Samuel Goldstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying the User's IP address from a User-Defined Tag

This recipe demonstrates creating a very simple User-Defined Tag, and using it to display information, that it gets from PHP globally-defined variables.

Getting ready

For this recipe, you will need to have CMS Made Simple installed and working. You will need login access to the site's Administration area as a member of the "Admin" group, or as a member of a group with permissions to "Modify User-Defined Tags" and "Manage All Content".

How to do it...

  1. Log in to your CMS Administration area.
  2. Using the top menu, go to "Extensions" and click on "User Defined Tags".
  3. Click on the "Add User Defined Tag" button.
  4. In the"Name" field type "user_ip".
  5. In the "Code" text area, type the following code:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required