Simple text hit counter

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
iftitaj
Registered User
Posts: 638
Joined: Tue Jan 15, 2008 6:21 am
Location: Karachi, Pakistan

Re: Simple text hit counter

Post by iftitaj »

I don't think adding statcounter is difficult in phpBB though I never tried it. All you have to do is add its code in template file & make sure that if its in PHP then do this:
ACP -> General -> Server Configuration -> Security Settings -> Allow php in templates: Yes

Then have a look at how to use PHP & INCLUDEPHP in phpBB.

But as far as I remember, statcounter use (java) script instead of any PHP code. Thats even more simple to implement in phpBB. :idea:
MisterPat
Registered User
Posts: 25
Joined: Fri Jan 09, 2009 7:24 pm
Location: New Jersey
Contact:

Re: Simple text hit counter

Post by MisterPat »

This mod works great on my board.

One question, is there a way to have the hits reset to zero every 24 hours?
iftitaj
Registered User
Posts: 638
Joined: Tue Jan 15, 2008 6:21 am
Location: Karachi, Pakistan

Re: Simple text hit counter

Post by iftitaj »

MisterPat wrote:One question, is there a way to have the hits reset to zero every 24 hours?
That will be a new MOD because this MOD's intention is to show all-time hits. Why not make a request in MOD Request forum.
bookboarder
Registered User
Posts: 71
Joined: Sat Apr 18, 2009 12:25 am

Re: Simple text hit counter

Post by bookboarder »

I have this working perfectly for prosilver. Are there any instructions for subsilver?
User avatar
RMcGirr83
Former Team Member
Posts: 21491
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Simple text hit counter

Post by RMcGirr83 »

OPEN

styles/subsilver2/template/overall_footer.html

FIND

Code: Select all

<!-- IF U_ACP --><span class="gensmall">[ <a href="{U_ACP}">{L_ACP}</a> ]</span><br /><br /><!-- ENDIF -->
AFTER ADD

Code: Select all

<br /><span class="gensmall">{HITS} {L_VIEWS}</span>
Appreciate the extensions/mods/support then buy me a beerImage
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
bookboarder
Registered User
Posts: 71
Joined: Sat Apr 18, 2009 12:25 am

Re: Simple text hit counter

Post by bookboarder »

You rock! Thank you so much! :mrgreen:
User avatar
Dan27
I've Been Banned!
Posts: 352
Joined: Mon Apr 06, 2009 1:07 pm
Location: United Kingdom
Contact:

Re: Simple text hit counter

Post by Dan27 »

Hi, Just wondering, how do you put the hit counter next to the stats on the forum?

So it shows up with the Who is online information.
Dan - Registered user.
Click here to visit my forum.
ADiggler
Registered User
Posts: 15
Joined: Tue Dec 14, 2004 5:11 pm

Re: Simple text hit counter

Post by ADiggler »

Dan27 wrote:Hi, Just wondering, how do you put the hit counter next to the stats on the forum?

So it shows up with the Who is online information.
Go to the proper style templates and choose the index_body.html template.
Then go to this line:

Code: Select all

<p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST}
There you can insert, where you want it, for instance:

Code: Select all

....{RECORD_USERS}<br />Total hits: <strong>{HITS}</strong><br /> <br />....
if you want it to show up on a new line right under the "Most users ever online.." line.

Otherwise, you simply insert

Code: Select all

{HITS}
wherever you want the number to be shown, and wrap it yourself with codes and words.
ADiggler
Registered User
Posts: 15
Joined: Tue Dec 14, 2004 5:11 pm

Re: Simple text hit counter

Post by ADiggler »

btw, thanks for this sweet counter :D
User avatar
Dan27
I've Been Banned!
Posts: 352
Joined: Mon Apr 06, 2009 1:07 pm
Location: United Kingdom
Contact:

Re: Simple text hit counter

Post by Dan27 »

Umm... Hi again, well what I meant was, how do I get it to look like this:

Total posts X • Total topics X • Total members X • Page Views 10 • Our newest member X

How do I get it to show like this?
Dan - Registered user.
Click here to visit my forum.
User avatar
Lisbon
Registered User
Posts: 825
Joined: Wed Jan 30, 2008 12:28 pm
Location: Zermatt

Re: Simple text hit counter

Post by Lisbon »

I dont see the mod :shock:
Image

Tks for help
User avatar
Dan27
I've Been Banned!
Posts: 352
Joined: Mon Apr 06, 2009 1:07 pm
Location: United Kingdom
Contact:

Re: Simple text hit counter

Post by Dan27 »

Have you refreshed your templates and have you done the edits on the right style?
Dan - Registered user.
Click here to visit my forum.
User avatar
Lisbon
Registered User
Posts: 825
Joined: Wed Jan 30, 2008 12:28 pm
Location: Zermatt

Re: Simple text hit counter

Post by Lisbon »

Dan27 wrote:Have you refreshed your templates and have you done the edits on the right style?
Ops, works now
User avatar
Dan27
I've Been Banned!
Posts: 352
Joined: Mon Apr 06, 2009 1:07 pm
Location: United Kingdom
Contact:

Re: Simple text hit counter

Post by Dan27 »

Dan27 wrote:Umm... Hi again, well what I meant was, how do I get it to look like this:

Total posts X • Total topics X • Total members X • Page Views 10 • Our newest member X

How do I get it to show like this?

Any help please?
Dan - Registered user.
Click here to visit my forum.
unknown2
Registered User
Posts: 676
Joined: Sat Mar 07, 2009 1:34 pm

Re: Simple text hit counter

Post by unknown2 »

Nice mod!!
I already have added the statistics in the lower menu of my forum, but i think you should add that tuturial on the first post, for newcomers!!

Another thing, can some tellme how do i make a little table to insert it on a more important spot on the forum, with the number of visits ??

This should be the size of the table:
______________
| |
| |
|_____________|

Best regards
Locked

Return to “[3.0.x] MOD Database Releases”