SCounter
From MODx Wiki
MODx Snippet
SCounter v1.3
- Author
- SimonSimCity
- MODx Versions
- >= 0.9.5
- Last Updated
- 1/4/2008
[edit]
Downloads
Download the latest version of SCounter from MODx repository.
[edit]
Description
De:SCounter Description in German
[edit]
Features
- Count your Users
- today
- yesterday
- total
- now online
[edit]
Installation
- Download and extract the archive.
- Create a directory called "scounter" in your [MODx Directory]/assets/snippets directory
- The files to create are all under this text in the code-boxes
- FTP or copy the files into [MODx Directory]/assets/snippets/scounter
- Create a new snippet in the manager called "scounter" and copy/paste the contents of sc.snippet.txt into the code field.
- If you want to set the value "Total", just edit the file "includes/sc.install.db.sql" and replace the null (CURDATE( )-2, 0)to the number you want. Example: for 50 Visitors: (CURDATE( )-2, 50)
- It´s the same with the value "Yesterday": (CURDATE( )-1, 0) Example: for 10 Visitors: (CURDATE( )-1, 10)
[edit]
Parameters
| name | description |
|---|---|
| [+SCounter.total+] | counts how many users have been on your site |
| [+SCounter.today+] | counts how many users have been on your site today |
| [+SCounter.yesterday+] | counts how many users have been on your site yesterday |
| [+SCounter.useronline+] | counts how many users are on your site now |
[edit]
Example
<div>[[scounter]]
<div>User total: [+SCounter.total+]</div>
<div>User today: [+SCounter.today+]</div>
<div>User yesterday: [+SCounter.yesterday+]</div>
<div>User online: [+SCounter.useronline+]</div>
</div>
[edit]
Output
| User total: 120 |
|---|
| User today: 12 |
| User yesterday: 13 |
| User online: 2 |
