Page 1 of 1

Dlcounter_XH

Posted: Sun Jul 22, 2012 3:21 pm
by cmb
Hello Community,

I've just released Dlcounter_XH 1alpha1.

Any feedback is welcome!

Christoph

Re: Dlcounter_XH

Posted: Sun Jul 22, 2012 5:12 pm
by oldnema
Bomb! I installed in the new site. Christopher thanks.
Josef

Re: Dlcounter_XH

Posted: Fri Aug 10, 2012 4:33 pm
by svasti
Great plugin! Just installed it and have been seeing it already on some other CMSimple Websites.

svasti

Re: Dlcounter_XH

Posted: Wed May 03, 2017 10:04 pm
by cmb
Hi everybody!

After a very long time I finally have released Dlcounter_XH 1.0beta1.

I've fixed a few bugs and made some improvements; see the changelog for details.

I still didn't find time to improve the download statistics, what is likely the most missing feature from a user's perspective. I hope to land at least some improvements before 1.0 GA.

Update notes: the config option folder_data is gone. You have to move your old downloads.dat to content/dlcounter.csv to re-use it. Also you have to reconfigure folder_downloads; this expects a path relative to userfiles/, instead of relative to the root folder, now.

Enjoy!

Re: Dlcounter_XH

Posted: Tue Nov 21, 2017 8:47 pm
by cmb
Hi everybody!

Dlcounter_XH 1.0beta2 has just been released.

The new version fixes two minor bugs, makes the Fileinfo extension optional, and requires Pfw_XH ≥ 0.2.0. See the changelog for details.

Enjoy!

Re: Dlcounter_XH

Posted: Fri Dec 29, 2017 6:51 am
by tanavots
Hi!

I updated Dlcounter_XH to 1.0beta2 and now have an issue in one server, where under Statistics page all file names are marked as 0 in Totals table. In Individual Downloads table, all file names are correct.
Warning I get is: Illegal type returned from Pfw\View\ArrayViewValue::key()
/data/home/xxx/www/plugins/dlcounter/views/stats.php:12
All requirements for both plugins are fulfilled.
CMSimple XH 1.6.10
PHP 5.4.17
Pfw 0.2.0
How to fix this issue?

Best!
Alo

Re: Dlcounter_XH

Posted: Fri Dec 29, 2017 5:38 pm
by cmb
Hi Alo!
tanavots wrote:I updated Dlcounter_XH to 1.0beta2 and now have an issue in one server, where under Statistics page all file names are marked as 0 in Totals table. In Individual Downloads table, all file names are correct.
Warning I get is: Illegal type returned from Pfw\View\ArrayViewValue::key()
/data/home/xxx/www/plugins/dlcounter/views/stats.php:12
All requirements for both plugins are fulfilled.
CMSimple XH 1.6.10
PHP 5.4.17
Pfw 0.2.0
How to fix this issue?
Thanks for reporting this issue! Actually, Pfw_XH is relying on a feature which is not supported by PHP 5.4.

Quick-Fix: change these lines to:

Code: Select all

        $newtotals = [];
        foreach ($totals as $filename => $count) {
            $newtotals[] = (object) compact('filename', 'count');
        }
        (new View('dlcounter'))
            ->template('stats')
            ->data([
                'totals' => $newtotals,
                'details' => $data
            ])
            ->render(); 
And also these lines to:

Code: Select all

<?php foreach ($totals as $total):?>
            <tr>
                <td><?=$total->filename?></td>
                <td><?=$total->count?></td>
            </tr>
<?php endforeach?>

Re: Dlcounter_XH

Posted: Fri Dec 29, 2017 7:20 pm
by tanavots
Thanks! Working fine now.
Alo

Re: Dlcounter_XH

Posted: Fri Jan 26, 2018 8:24 am
by tanavots
Hi!

Found another issue related to Dlcounter_XH. Have a lot of files, which are downloadable with Dlcounter_XH. What I found that the search function does not work anymore if the number of downloadable files exceeds ~400. Error I get is "Maximum execution time of 30 seconds exceeded in /.../172/plugins/dlcounter/classes/DbService.php on line ...". The line number will vary. Is it solution for this issue?

Regards,
Alo

Re: Dlcounter_XH

Posted: Fri Jan 26, 2018 11:45 am
by cmb
tanavots wrote:
Fri Jan 26, 2018 8:24 am
Found another issue related to Dlcounter_XH. Have a lot of files, which are downloadable with Dlcounter_XH. What I found that the search function does not work anymore if the number of downloadable files exceeds ~400. Error I get is "Maximum execution time of 30 seconds exceeded in /.../172/plugins/dlcounter/classes/DbService.php on line ...". The line number will vary. Is it solution for this issue?
Ah, thanks! Currently, for each download button the whole file dlcounter.csv is read, parsed, and the actual count is summed up. This shouln't be a problem for a few download buttons, but I had not considered the search function. The proper solution would be some kind of caching (I have to investigate), but as temporary workaround you can simply delete this line and this line. This will not show the download count anymore, but the search is supposed to work.