Hit Counter module v 0.3
paulney
Joined: 2005-08-25
Posts: 27 |
Posted: Wed, 2005-09-14 17:01 |
Hi! I wrote a simple module for displaying hit counters on your gallery. Basically, it's a block which you can add to your album page or photo page, like ImageBlock for example. You have to have a hit counter from some tracking website though It's not a hit counter in itself. Update: v0.3 is released. Automatic quote escaping has been fixed. Module is available here: http://www.pneyman.com/downloads |
|
Posts: 57
"I may not be a smart man Jeni, but I know what code is..."
Posts: 27
Uhm. Sorry? Didn't get that reference.
Posts: 32509
ah, missed this post...
in what way goes it beyond the G2 built-in view counter?
i guess you'll have more statistics with this counter, right?
can you register on codex.gallery2.org and add your module to the http://codex.gallery2.org/index.php/Gallery2:UserContributions#Modules table? thanks!
Posts: 27
Valiant, this is a container for the web-site counters, not for view counting. It's not even a counter in itself - just a placeholder for one, if you want to place a site counter on your gallery pages as well. For example, the counter from SpyLog.com provides detailed statistics on entry/exit pages, ip's and hosts people came from, etc.
With Gallery 1, I used to add php code to display it into the gallery pages itself, but now with the modular structure, you can just add another block.
You can see how it looks with SpyLog counter on any page in http://www.pneyman.com/gallery - the blue rectangle is the counter.
Thanks.
Posts: 77
Thats the errror I get when I try to add anything into the input field. The module activated fine though.
Any help would be greatly appreciated.
My gallery : http://www.nbhq.net/gallery
Posts: 27
Sorry, the input field just doesn't work yet (although it's not disabled)
I was planning to release the next version where you just copy-paste your web-counter code in the window, but got sidetracked.
There are instructions in INSTALL how to enable your webcounter:
Install comes in easy steps:
1. Copy hitcounter/ directory into your gallery/modules/ directory
2. Create a counter_code.inc file with the source of your hit counter.
3. Log into your gallery as Administrator
4. In 'modules' section gallery will show a new not yet installed module
'hitcounter'
5. Install and activate module
6. There's no configuration yet
7. Change your albums to add a new 'hitcounter' block
8. Enjoy
Please let me know if these didn't work for you.
Posts: 27
Update: v0.2 is released. You can now configure your web-counter using Gallery GUI on SiteAdmin page.
Module is available for download at:
http://www.pneyman.com/downloads
Posts: 39
@paulney:
I wanted to modify your module to use it as an menu.
But there are serveral problems
What I want to add:
but after saving it changes the code automaticly to:
and now the html link in the block is broken
http://www.wallpapergallery.org/%5C%22http://www.rebel2k.net%5C%22
can i make it so that this autoparsing is deactiveted?
Posts: 27
As an immediate workaround you can omit the quotes. Really, you don't need them there in your case. Your html would look like:
<a href=http://www.rebel2k.net target=_blank>visit my site</a><br>
This quote escaping is done automatically, because php will fail on printing out the quoted values otherwise, but I'll think of what I can do, and get back to you
Posts: 39
yes this works till i hav eto use some quotes^^
would be great if you can fix it!
Posts: 39
I have tried to modify the code so that no parsing is done, but ... I am to stupid I think!
Posts: 68
I like the module but I would like to see a option to add it to the bottom middle or with the gallery and theme links in the bottom left.
Posts: 39
@ paulney:
have you time to fix your module to allow quotes?
that would be really great!!
Posts: 27
Uh, I'll try to fix it this weekend
Posts: 39
this would be great paulney!
I am looking forward to test it
Posts: 39
pauley, did you fixed it now?
Posts: 6
something new ?
Posts: 27
Yes, this is fixed now.
I will put up a new version on the website in 30 min.
Sorry, it took me a while to get to this - too much stuff going on.
Anyways, check back in half hour, I should have everything packaged and ready.
Posts: 27
Ok. Version 0.3 is available for download
http://www.pneyman.com/downloads
Thank you!
Posts: 4
will your module work with gallery 2.1 by chance? If not, do you plan on posting one that will?
Posts: 77
Agreed
Posts: 27
I don't see any reason why it shouldn't. It uses the very basic functionality of G2, and doesn't depend on any funky features.
Sorry about the delayed response - for some reason, I didn't get a notification about ph33red's posting.
(I haven't isntalled 2.1 yet, but I'll do it over this weekend)
Posts: 1023
after applying simply the changes required for the new API and adjusting module.inc it runs perfect with Gallery 2.1
(Cool my old Web-traffic counter is back )
Gallery version = 2.1 core 1.1.0
PHP version = 5.1.1 apache2handler
Webserver = Apache/2.2.0 (Win32) DAV/2 PHP/5.1.2 mod_ssl/2.2.0 OpenSSL/0.9.8a
Database = mysql 5.0.18-nt-log,
Theme=PGtheme,
Gallery-URL=http://lf-photodesign.de
Posts: 27
I've just upgraded my gallery to 2.1, and I see that hitcounter needs to be modified
LFrank already did it, so I'll update the hitcounter and post an announcement.
Thanks.
Posts: 1023
it was sufficient to run the convert.pl script in the hitcounter module directory and to adjust the module.inc.
In case you don't have the script, I attach it
CU & Thanks
Lutz
Gallery version = 2.2-cvs core 1.1.1
PHP version = 5.1.1 apache2handler
Webserver = Apache/2.2.0 (Win32) DAV/2 PHP/5.1.2 mod_ssl/2.2.0 OpenSSL/0.9.8a
Database = mysql 5.0.18-nt-log,
Theme=PGtheme,
Gallery-URL=http://lf-photodesign.de
Posts: 25
Have you updated yet and if so where do I find it?
Posts: 25
When trying to install I get this error
Posts: 1
same error too
Posts: 1
In the module.inc file you need to replace the GalleryStatus::succes() occurrences with null and then it will work !
Note: you still need to run the convert.pl script as stated above !
Which works like a dream, thanks for that !
Hope this helps, kind regards,
Nathan
Posts: 27300
Updated the module to work with G2.2.5
Created codex page: http://codex.gallery2.org/Gallery2:Modules:hitcounter
Users: Please update the documentation on the codex so I have time to support others. ( do your part )
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 12
I install it.. everything went well and when i paste the counter code/script and hit Save ... it just take me to blank (main.php) page .. where do i go wrong?
Posts: 27300
got an example of the code you are pasting?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 12
Its for shoutbox..
Posts: 27300
Does not work with G2.3
Any volunteers to fix?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team