Unique Hit Counter

Started by aldo, January 22, 2008, 11:11:59 PM

Previous topic - Next topic

aldo

Link to Mod

This is sort of an addition to my other modification, It isn't a page view counter, its a Unique Hit counter. The main part of this was made by Karlbenson(Thanks Karl!) and I put it into a mod.

Have a custom theme? No problem, just like my other mod, simply put this where you want the Unique Hit counter to appear:

Unique_Hits();


Once again, Enjoy this simple mod!

Apllicmz




aldo

Thanks, you can thank Karlbenson, he pretty much coded it, I just turned it into a mod ;)

jossanaijr

Should I uninstall the other mod?  Or it just fix it?

ne.miguelito

I wanted to put the same number that in the image, and that it always went equal





what should make?

aldo

You want it to show total uniques on the stats page? Hmm I will look into implementing that. Thanks for the suggestion

ne.miguelito

No, I want the same number that it is on the stats page appear in the Unique Hit Counter...

aldo

You could go into your MySQL DB and edit uniquehits column, But this is a unique hit counter not s page view counter, I made one, You would want to use that then...

ne.miguelito

Yes I already made that in your other mod, but with the time it is different...

2pac

so... does this mod show unique hits for the entire forum or for individual pages? because it would be nice to have something like that for profiles to go along with the ultimate profile... just wondering

gemigene

I'd like to install it (hard code) but when I submit it to the SMF Package Parser, I get the following error:

parseArchive(): No package-info.xml in this mod! Is it corrupted?

Cheers,
Gene
"Religion is metaphysical statism. I will be ruled by no man on earth, nor by any god in heaven"

aldo

Quote from: gemigene on January 28, 2008, 04:47:12 PM
I'd like to install it (hard code) but when I submit it to the SMF Package Parser, I get the following error:

parseArchive(): No package-info.xml in this mod! Is it corrupted?

Cheers,
Gene

Strange... Try to download it again. I just downloaded it from SMF and checked it out. the package-info.xml file is there and so is everything else.

kota069

How can you reset to Zero? (Or can you?)

rberube

Quote from: aldo on January 29, 2008, 08:22:26 PM
Quote from: gemigene on January 28, 2008, 04:47:12 PM
I'd like to install it (hard code) but when I submit it to the SMF Package Parser, I get the following error:

parseArchive(): No package-info.xml in this mod! Is it corrupted?

Cheers,
Gene

Strange... Try to download it again. I just downloaded it from SMF and checked it out. the package-info.xml file is there and so is everything else.

I'm getting the exact same error also.

fredda88

#14
I get this error in my log but not from all users, any ideas whats wrong?


8: Undefined index: uniquecounter
File: /Sources/UniqueCounter.php
Line: 26

My uniquecounter.php (parts of it)
// Increase it by 1 in case we show this variable anywhere on this pageview
$modSettings['uniquecounter']++;
}
echo '<span style="text-align: center;">' . $txt['uniquecounter'] . $modSettings['uniquecounter'] .'</span>';
}
?>

fyndler

I sthis mod even supported these days ? was a whiel since someone posted in it haha

Anyhow i dont get this part


Quoteinsert.php
This file should not be able to execute standalone. You may have to run the following queries manually.

Query: [Select]

INSERT INTO {$db_prefix}settings (`variable`,`value`) VALUES('uniquecounter','0')


Fugitive_Bill

#16
Anyway of making this counter only visible to Mods/Admins?
As this mod is very old, is there another better one I should be aware of?

Yes I'm a kind of a Noob!- Well I've using SMF for at least a year, but rarely play around with doing mods, I just normally run in it vanilla, but thought I'd start playing around and learning.
-B!

Siirist

Hello,

Tried to install with Package Installer, but got failures (see attached pic)

Went to make changes manually yet the:
./Themes/default/index.template.php
      <table cellspacing="0" cellpadding="3" border="0" align="center" width="100%">
was not present (see attached file)

In fact, see all and you will discover that the  "find
is not present.

All help is appreciated and thank you in advance.

Be Well,
Cloud
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Apostman

Once again, Thanks in Advance.

I am perplexed, did I miss some telepathy instructions? ??? I am a newbie to PhP, in the begining post Aldo says.

Have a custom theme? No problem, just like my other mod, simply put this where you want the Unique Hit counter to appear:

Code: [Select]
Unique_Hits();


I put it on my refrigerator and nothin happened. :o

Seriously, I want it on the index.php displayed but no clue in which file or how to do it? ?  ?

TheMortician4

Quote from: aldo on January 22, 2008, 11:11:59 PM
Link to Mod

This is sort of an addition to my other modification, It isn't a page view counter, its a Unique Hit counter. The main part of this was made by Karlbenson(Thanks Karl!) and I put it into a mod.

Have a custom theme? No problem, just like my other mod, simply put this where you want the Unique Hit counter to appear:

Unique_Hits();


Once again, Enjoy this simple mod!

Where do I put that code?

Siirist

emjan101,

I think Apostman has a point. How do I know, well I have looked through my index.php and didn't see "anywhere" that wouldn't "mess" with the code that is already in place.
It looks quite intimidating and I have edited it, let's see, um, 3 times in the last year.  O:)

I perceive the instructions the same as someone from the city driving to a horse ranch and the foreman hands the the reins of a horse to them and says "Okay, climb up and take a ride, I'll be here at the house if you need me".
"Huh? What? I've never ridden before". ???
"That's okay, you'll get the hang of it. Just point the horse the way you want to go. See ya."
"But, I haven't ever..." :o

Where is "wherever you want it" in the index.php
An example or a line number would be good.

Take Care of us *newbies*,
Cloud 8)
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Apostman

Took some doing but I finally got it on the footer and it looks good and works good.

I think it was index.template.php but dont trust my memory.

Siirist

Quote from: Apostman on October 26, 2010, 01:40:44 AM
Took some doing but I finally got it on the footer and it looks good and works good.

I think it was index.template.php but dont trust my memory.

It would be great if you could post a link to your forum. :)

You could put it here, or just add it in your signature by going here. ;)

Glad you go it working though. :D

Take Care,
Cloud 8)
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

TheMortician4

Ummm,  okay...Well I have no coding experience, so the where ever I want it in the index.php only leaves me with more questions then.

What in the index.php file designates the different areas of the page? Like top right, bottom left, et? Or do you use a block to put it there? If a block is used, what type, a php, html, etc....

I guess I should have used the term clarify this so other non-experienced users could understand....

Siirist

Quote from: emjan101 on October 27, 2010, 12:51:41 PM
Ummm,  okay...Well I have no coding experience, so the where ever I want it in the index.php only leaves me with more questions then.

What in the index.php file designates the different areas of the page? Like top right, bottom left, et? Or do you use a block to put it there? If a block is used, what type, a php, html, etc....

I guess I should have used the term clarify this so other non-experienced users could understand....

Don't know lots, just have lots of posts. :P  I would NOT mess with the index.php.
If you want to change the appearance or layout, I think that a portal (there are about 3 or 4 that you can use)  would probably be better. ;)
They basically "act" like a webpage (you can place things in the area that you choose). Here's a link for you to learn more :)
What is a portal and why do we need one?

If you want to add a link to something (like your forum to your signature), it would be like this:

{url=http://www.(put your domain name here)/(directory with your forum. this is usually "forum")index.php} name-of-your-forum-here {/url}
Don't put anything in ( ) and instead of { } use [ ]
{ } were only used so that you could see the code
also make sure it has http://www as it shows in the example.

Hope that helps. :D

Take Care,
Cloud 8)
PS-If there is something that will work better than this, please correct me
Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

TheMortician4

SurvivorOfAbuse,

I am currently running SMF 1.1.11 and Simple Portal 2.3.2, I just upgraded the entire system from 1.1.10 and 2.2.2.

My inquiry was in regards to the:

Unique_Hits();

To get the Unique hit counter to work.....

I have seen one on elitebattlezone.com, that was rather nice, but this one sounded better.

Where does one enter that: --> Unique_Hits(); and whicj .php?

I am assuming the index.template.php, but again it is better to ask and be wrong, than assume and be stupid...!

Siirist

Needed information:
- What's your SMF version?, What MODs are installed? What Theme(s) are you using? Have you backed up your database?

--> At least 50% of the questions asked are answered in the Online Manual <--
Mods for ver 1.x will NOT run on ver 2.x

Advertisement: