Created
February 25, 2011 07:33
Revisions
-
Romain created this gist
Feb 25, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ <?php // Gets the analytics if the person is not logged in // Must call un-cached. // [[!Get_Analytics]] $return = ''; $viewer_logged_in = false; $viewer = $modx->user; if( $viewer->get('id') != null ) $viewer_logged_in = true; if($viewer_logged_in == false) { $return = 'Put your analytics here, but you will have to escape the apostrophes \' .'; } else { $return = 'You Are Logged In'; } return $return;