|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Adam44 Smarty n00b
Joined: 26 Jan 2015 Posts: 2
|
Posted: Mon Jan 26, 2015 8:48 pm Post subject: PHP Code Smarty, Plugin Function |
|
|
Hi there...
I am new here, referred by someone who tried to help me but wasn't able to make this work for me with Smarty.
I use Clicky stats to to monitor site stats, and they have an option to insert a user's username instead of their IP address in the stats. However, since I use Smarty in my members area, the code he made does not work. He said I need a plugin function, or something like that...
Is this something easy to do? Will I need to hire a programmer, or is it a quick fix?
Forgive my ignorance... I have no idea how to accomplish this.
Here is the code he gave me:
Code: |
<?php if (isset($_SERVER['PHP_AUTH_USER'])){ ?>
<script type="text/javascript">
var clicky_custom = clicky_custom || {};
clicky_custom.visitor = clicky_custom.visitor || {};
clicky_custom.visitor ["username"] = '" . $_SERVER['PHP_AUTH_USER'] . "';
</script>
<?php } ?>
|
Thanks in advance for any help you can give me. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
|
Back to top |
|
Adam44 Smarty n00b
Joined: 26 Jan 2015 Posts: 2
|
Posted: Mon Feb 02, 2015 8:17 pm Post subject: |
|
|
Just wanted to say thank you! This worked perfectly! |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|