Ad Space
Cloud Computing and Cloud Hosting by Rackspace
Ad Space
Cloud Computing and Cloud Hosting by Rackspace

Hosting Geared For
your CMSMS needs

CMSMS ready Hosting

Hosting Starting at $15

  • • Hosted Mail
  • • Personal Control Panel
  • • CMSMS 1.8.1 tested
  • • Lightly packed servers
  • • Intrusion Detection
  • • URL monitored
  • • Custom solutions available

Order your hosting Now

CP Blogs

Hide the {get_template_vars} from everyone... but you!

Posted by: Jeremy Bass
on May 24, 2009

Category:

Coding, Basics, Smarty, CMS Made Simple

Summary:

Hello, so here is a quick handy trick... I like to hide the {get_template_vars} from the end user, and I can't always just use the test page. So what to do... well here is a two step trick...


Ad Space

Hello, so here is a quick handy trick... I like to hide the {get_template_vars} from the end user, and I can't always just use the test page. So what to do... well here is a two step trick...

1.) add
 {$smarty.server.REMOTE_ADDR} 
to your page and then look at it and to get your ip...

then add this...
2.)
 {if $smarty.server.REMOTE_ADDR eq '125.125.0.0'}{get_template_vars}{/if} 

Tip: put {**} on the side like so and you can just comment it out as needed...
 {if $smarty.server.REMOTE_ADDR eq '24.116.78.229'}{**}{get_template_vars}{/if} 

Now you will want to match the ip up and that's it... Simple as pie.
Cheers
jeremyBass

Ad Space

Get Social With It

[+]

Add A Comment

[+]

Code in the picture:
Title:
Your Name(*):
Email:
Notify me of any further comments to this thread:
Website:
Comment(*):
 
Previous page: Hosting FAQ Next page: Experimental