Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HitCount Plugin
#76
Hitcount version 2.0.4:
  • includes a french translation (thanks @calmos)
  • fixes some errors, if no data is available
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#77
@mvlcek
Issue: Hitcount is truing to load languages as xx_YY.php instead of xx.php
Reply
#78
Carlos Wrote:@mvlcek
Issue: Hitcount is truing to load languages as xx_YY.php instead of xx.php

Corrected in Hitcount version 2.0.5.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#79
What's wrong with xx_YY.php language files ?

mvlcek Wrote:
Carlos Wrote:@mvlcek
Issue: Hitcount is truing to load languages as xx_YY.php instead of xx.php

Corrected in Hitcount version 2.0.5.
Reply
#80
Spanish language file for HitCount attached to this post.
Reply
#81
calmos Wrote:What's wrong with xx_YY.php language files ?

mvlcek Wrote:
Carlos Wrote:@mvlcek
Issue: Hitcount is truing to load languages as xx_YY.php instead of xx.php

Corrected in Hitcount version 2.0.5.

Nothing really, but as you can't select the plugin's language and it is dependent on the language set for GetSimple, it doesn't seem fair to force those people using e.g. pt_BR (brasilian portuguese) to use english, because pt_PT (portuguese portuguese) does not match their language.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#82
Yep, seems pretty obvious now Smile

mvlcek Wrote:
calmos Wrote:What's wrong with xx_YY.php language files ?

mvlcek Wrote:Corrected in Hitcount version 2.0.5.

Nothing really, but as you can't select the plugin's language and it is dependent on the language set for GetSimple, it doesn't seem fair to force those people using e.g. pt_BR (brasilian portuguese) to use english, because pt_PT (portuguese portuguese) does not match their language.
Reply
#83
mvlcek Wrote:
Oleg06 Wrote:how to show the number of downloads a particular file?

Just pass the name of the file including directories within uploads to return_hitcount_hits(). E.g. if the file is .../data/uploads/zips/x.zip, use echo return_hitcount_hits("zips/x.zip");
Hallo Martin
Code:
<?php echo return_hitcount_hits("zips/x.zip"); ?>
do not show in page.If I save code
ckeditor code changes
Quote:<!--?php echo return_hitcount_hits("zips/x.zip") ?-->

Hitcount and Download Interceptor plugin installed.
root .htaccess file changed.
Code:
RewriteRule ^data/uploads/(.*)$ plugins/download_interceptor/intercept.php?file=$1 [L]

what is wrong?

Thanks.
Reply
#84
mintika Wrote:
Code:
<?php echo return_hitcount_hits("zips/x.zip"); ?>
do not show in page.If I save code
ckeditor code changes
Quote:<!--?php echo return_hitcount_hits("zips/x.zip") ?-->

You can't put PHP code into the page content. You have to put the code into the template (e.g. display the hitcount in the footer) or install the DynPages plugin, put the code in a component (e.g. named 'hitcountx') and include this component in the page content with {% hitcountx %}.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#85
mvlcek Wrote:
mintika Wrote:
Code:
<?php echo return_hitcount_hits("zips/x.zip"); ?>
do not show in page.If I save code
ckeditor code changes
Quote:<!--?php echo return_hitcount_hits("zips/x.zip") ?-->

You can't put PHP code into the page content. You have to put the code into the template (e.g. display the hitcount in the footer) or install the DynPages plugin, put the code in a component (e.g. named 'hitcountx') and include this component in the page content with {% hitcountx %}.

ok ,with DynPages plugin displayed code in the sidebar ,more than once downloaded still (0)
Code:
<?php get_component('hitcountx'); ?>

I want displayed in the page with news manager
Code:
{% hitcountx %}
not displayed.
with blank page displayed (0)

this is possible as code displayed here?--->>[Image: 34528.png]
thanks.
Reply
#86
Error found.

I'd recommend updating line 83 of hitcount.php to

Code:
$hits = @file(GSDATAOTHERPATH . HITCOUNT_DIR . 'hits_' . preg_replace('/[^A-Za-z0-9.-]+/','_',$slugOrFile) . '.txt');

The original line is

Code:
$hits = @file(GSDATAOTHERPATH . HITCOUNT_DIR . 'hits_' . preg_replace('/[^A-Za-z0-9-]+/','_',$slugOrFile) . '.txt');

Note that without the period in the regex, it can't correctly return hits on files.
Reply
#87
I'm not sure where or who should I ask, but since hitcount plugin shows also hits on 404 page, maybe someone could shred some light why there are so many hits on 404 ?
Does it have something in common with language redirects using i18n along with custom slug url (%language%/) ? Is there a simple way to find out what is causing 404 ?

I'd also like to ask what is the meaning of "stacked" checkbox below the chart ?
What exactly does this option ?


ps. polish translation in attachment
Addons: getsimple theme, Online Visitors, Notepad
Reply
#88
yojoe Wrote:I'm not sure where or who should I ask, but since hitcount plugin shows also hits on 404 page, maybe someone could shred some light why there are so many hits on 404 ?
Does it have something in common with language redirects using i18n along with custom slug url (%language%/) ? Is there a simple way to find out what is causing 404 ?

I think that if the user calls a non-existing page and gets a 404 response, GetSimple sets the URL to 404 and thus a hit of the page 404 is logged. There is no way to find out, which non-existent page caused the 404, but you can search the hitcount logs to see the referers.

yojoe Wrote:I'd also like to ask what is the meaning of "stacked" checkbox below the chart ?
What exactly does this option ?

The lines in the diagram are stacked, e.g. 3 requests for page1, 2 requests for page2, then the line for page2 goes through y=2+3=5.
It's especially useful with "relativ", e.g. if you view the 3 most popular pages, you will then see the total percentage of those 3 pages.

yojoe Wrote:ps. polish translation in attachment

Thanks, I will add it to the next release.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#89
mvlcek Wrote:I think that if the user calls a non-existing page and gets a 404 response, GetSimple sets the URL to 404 and thus a hit of the page 404 is logged. There is no way to find out, which non-existent page caused the 404, but you can search the hitcount logs to see the referers.
I checked log from 2 days ago, and it would only make sens if GS would guess the right uri and redirect to it instead of serving 404.
Example fragment
Code:
1333458427    72    404    http://getsimple.wujitsu.pl/bluebusiness/en/news    Mozilla/5.0    (Windows    NT    6.1)    AppleWebKit/535.11    (KHTML,    like    Gecko)        Iron/17.0.1000.0    Chrome/17.0.1000.0    Safari/535.11    (en-US,en;q=0.8)
1333458427    72    404    http://getsimple.wujitsu.pl/bluebusiness/en/news    Mozilla/5.0    (Windows    NT    6.1)    AppleWebKit/535.11    (KHTML,    like    Gecko)        Iron/17.0.1000.0    Chrome/17.0.1000.0    Safari/535.11    (en-US,en;q=0.8)
1333433678    65    404    http://getsimple.wujitsu.pl/bluebusiness/theme/Bluebusiness/css/style.css    Mozilla/5.0    (X11;    Ubuntu;    Linux    x86_64;    rv:11.0)    Gecko/20100101    Firefox/11.0    (de)
1333432980    64    404    http://getsimple.wujitsu.pl/bluebusiness/en/bluebusiness-installation    Mozilla/5.0    (Macintosh;    Intel    Mac    OS    X    10_7_3)    AppleWebKit/535.19    (KHTML,    like    Gecko)    Chrome/18.0.1025.142    Safari/535.19    (en-US,en;q=0.8)
1333405812    56    404    http://getsimple.wujitsu.pl/bluebusiness/theme/Bluebusiness/css/style.css    Mozilla/5.0    (Windows    NT    6.1;    rv:11.0)    Gecko/20100101    Firefox/11.0    (pl,en-us;q=0.7,en;q=0.3)
All links are fine, files and pages are on their places (especially .css).
Those 404 in hitcount logs are odd.

yojoe Wrote:The lines in the diagram are stacked, e.g. 3 requests for page1, 2 requests for page2, then the line for page2 goes through y=2+3=5.
It's especially useful with "relativ", e.g. if you view the 3 most popular pages, you will then see the total percentage of those 3 pages.
That clearly explains and makes sense. Thanks for precious informations.



I wanted to ask also about blacklisting. If you are familiar with piwik analytics then you know that there's an option which sets a cookie in users browser, to prevent counting visits when using this particular browser.
Blacklist functionality in hitcount is great, but it just can't prevent counting visits of website's owner with a dynamic IP address. What do you think about such feature ? GS sets its own cookie after successful login, but using it wouldn't cover the matter in 100%.
Addons: getsimple theme, Online Visitors, Notepad
Reply
#90
yojoe Wrote:I checked log from 2 days ago, and it would only make sens if GS would guess the right uri and redirect to it instead of serving 404.
Example fragment
Code:
1333458427    72    404    http://getsimple.wujitsu.pl/bluebusiness/en/news    Mozilla/5.0    (Windows    NT    6.1)    AppleWebKit/535.11    (KHTML,    like    Gecko)        Iron/17.0.1000.0    Chrome/17.0.1000.0    Safari/535.11    (en-US,en;q=0.8)
1333458427    72    404    http://getsimple.wujitsu.pl/bluebusiness/en/news    Mozilla/5.0    (Windows    NT    6.1)    AppleWebKit/535.11    (KHTML,    like    Gecko)        Iron/17.0.1000.0    Chrome/17.0.1000.0    Safari/535.11    (en-US,en;q=0.8)
1333433678    65    404    http://getsimple.wujitsu.pl/bluebusiness/theme/Bluebusiness/css/style.css    Mozilla/5.0    (X11;    Ubuntu;    Linux    x86_64;    rv:11.0)    Gecko/20100101    Firefox/11.0    (de)
1333432980    64    404    http://getsimple.wujitsu.pl/bluebusiness/en/bluebusiness-installation    Mozilla/5.0    (Macintosh;    Intel    Mac    OS    X    10_7_3)    AppleWebKit/535.19    (KHTML,    like    Gecko)    Chrome/18.0.1025.142    Safari/535.19    (en-US,en;q=0.8)
1333405812    56    404    http://getsimple.wujitsu.pl/bluebusiness/theme/Bluebusiness/css/style.css    Mozilla/5.0    (Windows    NT    6.1;    rv:11.0)    Gecko/20100101    Firefox/11.0    (pl,en-us;q=0.7,en;q=0.3)
All links are fine, files and pages are on their places (especially .css).
Those 404 in hitcount logs are odd.

The CSS are easy: there is e.g. a reference to a non-existing url(../gfx/html-backg.jpg)

yojoe Wrote:I wanted to ask also about blacklisting. If you are familiar with piwik analytics then you know that there's an option which sets a cookie in users browser, to prevent counting visits when using this particular browser.
Blacklist functionality in hitcount is great, but it just can't prevent counting visits of website's owner with a dynamic IP address. What do you think about such feature ? GS sets its own cookie after successful login, but using it wouldn't cover the matter in 100%.

Is being implemented...
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#91
mvlcek Wrote:The CSS are easy: there is e.g. a reference to a non-existing url(../gfx/html-backg.jpg)
That would make sense. The question is: how the heck get rid of it. with a dedicated template for a website, there are no problems with defining absolute URLs in *.css. I'll have to think about embedding background declarations inside template file. That's not elegant, but isn't as complicated and resource eating as parsing whole .css file with php only to get location of website, and template file.

yojoe Wrote:Is being implemented...
just...WOW!
Addons: getsimple theme, Online Visitors, Notepad
Reply
#92
Hitcount version 2.1:
  • allows blacklisting with cookie (see bottom of Hitcount administration page) (@yojoe)
  • fixes some bugs when using Hitcount with the Download Interceptor (@vendan, @mintika)
  • determines visitor countries and shows world map showing origin of visitors (see below)

To determine visitor countries, you have to download the IP-to-Country database (see bottom of Hitcount administration page). From then on visitor countries will be logged.

To view the world map with visitor country information, your browser needs to support SVG.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#93
Great update!

Couple things I've noticed:
- after "countries" tab arrived, the tabs line may break, as the tab name with float:left is sometimes too long.
H3 with text-align:center looks nicely both above, and under the tab bar
- I assume that "This script uses the IP-to-Country Database provided by WebHosting.Info, available from ip-to-country.webhosting.info" text is hardcoded, and there's no chance to translate it using language file (?)

Is there a way to delete 404 statistics or/and block them permanently ?
I've cleaned or zeroed (0/0) them in all files I found, but they still show up.
Are they being count from log_YYYYMM.txt files ?
Addons: getsimple theme, Online Visitors, Notepad
Reply
#94
yojoe Wrote:Great update!

Couple things I've noticed:
- after "countries" tab arrived, the tabs line may break, as the tab name with float:left is sometimes too long.
H3 with text-align:center looks nicely both above, and under the tab bar
- I assume that "This script uses the IP-to-Country Database provided by WebHosting.Info, available from ip-to-country.webhosting.info" text is hardcoded, and there's no chance to translate it using language file (?)

The license at http://ip-to-country.webhosting.info/node/view/62 states that this text has to be used.

yojoe Wrote:Is there a way to delete 404 statistics or/and block them permanently ?
I've cleaned or zeroed (0/0) them in all files I found, but they still show up.
Are they being count from log_YYYYMM.txt files ?

They are counted from the log_* files and then indexed to hitcount_index/ files.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#95
Any way to avoid this PHP warning for hitcount.php when debug is enabled?

Code:
Cannot modify header information - headers already sent by (output started at
/var/www/.../admin/inc/basic.php:257) in /var/www/.../plugins/hitcount.php on line 145.
(paths shortened for brevity)
Modern UI Admin for GetSimple
Watch the demo. Install this plugin. Use this CSS. Enjoy.
Reply
#96
sal Wrote:Any way to avoid this PHP warning for hitcount.php when debug is enabled?

Code:
Cannot modify header information - headers already sent by (output started at
/var/www/.../admin/inc/basic.php:257) in /var/www/.../plugins/hitcount.php on line 145.
(paths shortened for brevity)

When does it happen? With which GS version? Which plugins do you have?
This should only happen, if a plugin outputs text (debug info?) during the index-pretemplate hook.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#97
mvlcek Wrote:
sal Wrote:Any way to avoid this PHP warning for hitcount.php when debug is enabled?

Code:
Cannot modify header information - headers already sent by (output started at
/var/www/.../admin/inc/basic.php:257) in /var/www/.../plugins/hitcount.php on line 145.
(paths shortened for brevity)

When does it happen? With which GS version? Which plugins do you have?
This should only happen, if a plugin outputs text (debug info?) during the index-pretemplate hook.
Sorry mvlcek, it was a bug with p01-contact.
Modern UI Admin for GetSimple
Watch the demo. Install this plugin. Use this CSS. Enjoy.
Reply
#98
Thanks for the plugin i hope it will help me cos google analytic didn't give me nothing,my server told me how many people came to my site.thanks
Reply
#99
I can not get downloads to work the counter (download interceptor)
Code:
AddDefaultCharset UTF-8
Options -Indexes

# blocks direct access to the XML files - they hold all the data!
<Files ~ "\.xml$">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>
<Files sitemap.xml>
        Order allow,deny
    Allow from all
    Satisfy All
</Files>

RewriteEngine on

# Usually it RewriteBase is just '/', but
# replace it with your subdirectory path
RewriteBase /0/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
RewriteRule ^data/uploads/(.*)$ plugins/download_interceptor/intercept.php?file=$1 [L]
link
Code:
<p><a class="button red_btn large" href="<?php get_site_url(); ?>data/uploads/comm.zip">Cкачать коммерческое предложение</a></p>
in component
Code:
<?php echo return_hitcount_hits('data/uploads/comm.zip); ?>
Reply
Oleg06 Wrote:I can not get downloads to work the counter (download interceptor)

Try adding the rules from here before the standard rules:
Code:
RewriteBase ...

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^data/uploads/(.*)$ plugins/download_interceptor/intercept.php?file=$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /?([A-Za-z0-9_-]+)/?$ index.php?id=$1 [QSA,L]
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply




Users browsing this thread: 1 Guest(s)
Free HDTV Channels Residential Solar Panels