Dlcounter_XH

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

Post Reply
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Dlcounter_XH

Post by cmb » Sun Jul 22, 2012 3:21 pm

Hello Community,

I've just released Dlcounter_XH 1alpha1.

Any feedback is welcome!

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

oldnema
Posts: 265
Joined: Wed Jan 21, 2009 5:15 pm
Location: Czech Republic
Contact:

Re: Dlcounter_XH

Post by oldnema » Sun Jul 22, 2012 5:12 pm

Bomb! I installed in the new site. Christopher thanks.
Josef
Nobody knows how much time he has left ...
http://oldnema.compsys.cz/en/?Demo_templates

svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

Re: Dlcounter_XH

Post by svasti » Fri Aug 10, 2012 4:33 pm

Great plugin! Just installed it and have been seeing it already on some other CMSimple Websites.

svasti

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Dlcounter_XH

Post by cmb » Wed May 03, 2017 10:04 pm

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!
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Dlcounter_XH

Post by cmb » Tue Nov 21, 2017 8:47 pm

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!
Christoph M. Becker – Plugins for CMSimple_XH

tanavots
Posts: 72
Joined: Sat Feb 25, 2012 4:18 pm

Re: Dlcounter_XH

Post by tanavots » Fri Dec 29, 2017 6:51 am

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

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Dlcounter_XH

Post by cmb » Fri Dec 29, 2017 5:38 pm

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?>
Christoph M. Becker – Plugins for CMSimple_XH

tanavots
Posts: 72
Joined: Sat Feb 25, 2012 4:18 pm

Re: Dlcounter_XH

Post by tanavots » Fri Dec 29, 2017 7:20 pm

Thanks! Working fine now.
Alo

tanavots
Posts: 72
Joined: Sat Feb 25, 2012 4:18 pm

Re: Dlcounter_XH

Post by tanavots » Fri Jan 26, 2018 8:24 am

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

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Dlcounter_XH

Post by cmb » Fri Jan 26, 2018 11:45 am

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.
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply