Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graphical counter plugin #3153

Closed
anonymous-matomo-user opened this issue May 25, 2012 · 29 comments
Closed

Graphical counter plugin #3153

anonymous-matomo-user opened this issue May 25, 2012 · 29 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. worksforme The issue cannot be reproduced and things work as intended.

Comments

@anonymous-matomo-user
Copy link

Piwik plugin that display an image counter (image 80x31 by default) with the total site visits and page views.

It's uses Piwik API for taking a site stats. Plugin have a caching mechanism for large sites.

More information about the plugin - http://.com/en/others/notes-on-html-jquery-php-mysql/10-piwik-graphical-counter.html
Keywords: third-party-plugin

@anonymous-matomo-user
Copy link
Author

Please reports about any problems or bugs. It's not a final version, but stable.
Requires testing for large sites.
Any comments and suggestions are welcome!

PS! Sorry for the poor English.

@mattab
Copy link
Member

mattab commented May 28, 2012

Thank you for this new plugin! It would be great if you could maybe show a few examples of counters that can be made with the plugin to fit people's websites.. otherwise looks good (I havent looked at the code yet)

@anonymous-matomo-user
Copy link
Author

Replying to matt:

Thank you for this new plugin! It would be great if you could maybe show a few examples of counters that can be made with the plugin to fit people's websites.. otherwise looks good (I havent looked at the code yet)

Ok matt Later, I'll do a demo site specifically for the tests. Now peoples who want to view a how the counter looks on the page can view at the bottom of page at link that I provide in the first post.

@anonymous-matomo-user
Copy link
Author

A new version of the plugin is available. Now user can create different counters for each site. Plugin support user access rules from Piwik and can display "user online" stat for custom period of time.

Now it's still in beta, because I have some difficults with plugin installation in database.

If you get a database error after the installation proccess execute a next SQL query

CREATE TABLE `piwik_counter_sites`(`id` INT(11) NOT NULL AUTO_INCREMENT, `idsite` INT(11) NOT NULL, `params` TEXT NOT NULL, `published` TINYINT(1) NOT NULL DEFAULT 0, PRIMARY KEY (`id`)) ENGINE=MYISAM CHARSET=utf8 COLLATE=utf8_general_ci;

@anonymous-matomo-user
Copy link
Author

Attachment: Admin page
piwik_c_demo_en.png

@anonymous-matomo-user
Copy link
Author

Fixed a bug with the process of creating a table during the installation.

@anonymous-matomo-user
Copy link
Author

A new version just released.

  • Added missing code for display counter w/o cache
  • Other small fix

@anonymous-matomo-user
Copy link
Author

Thanks for the plugin :) I have a problem with it though... I can't "Save" Apply" or "Cancel". The three buttons are greyed out and not clickable.

Do you have a hint?

Thanks :)

@anonymous-matomo-user
Copy link
Author

Replying to uwdus:

Thanks for the plugin :) I have a problem with it though... I can't "Save" Apply" or "Cancel". The three buttons are greyed out and not clickable.

Do you have a hint?

Thanks :)

Do you have an AdBlock plugin enabled? By default "save" and "apply" buttons disabled if site not selected in list.

Please be more specifically when you describe you problem.

@anonymous-matomo-user
Copy link
Author

Thanks for your quick rsponse. Sorry about beeing not to specific. Here is the info:

  • Piwik 1.9.1
  • PHP Version 5.3.3-7
  • MySQL 5.1.63
    Tried with
  • Chrome 23.0.1271.64 m with whitlisting of domain running piwik
  • IE 10 (no Adblock Plugin)

@anonymous-matomo-user
Copy link
Author

At evening(when I come to home) I check how plugin work on Chrome.

@anonymous-matomo-user
Copy link
Author

Thank you :)

@anonymous-matomo-user
Copy link
Author

Replying to uwdus:

Thanks for your quick rsponse. Sorry about beeing not to specific. Here is the info:

  • Piwik 1.9.1
  • PHP Version 5.3.3-7
  • MySQL 5.1.63
    Tried with
  • Chrome 23.0.1271.64 m with whitlisting of domain running piwik
  • IE 10 (no Adblock Plugin)

Checked in latest Chrome. No errors and buttons not blocked.
Unfortunately I cannot check how plugin works in IE10.

Can you provide an access to the stat page?

@anonymous-matomo-user
Copy link
Author

Thanks for checking.
Yes I can - how can I send you the data?

@anonymous-matomo-user
Copy link
Author

Replying to uwdus:

Thanks for checking.
Yes I can - how can I send you the data?

Send me email via [http://xn--80aeqbhthr9b.com/en/contact-form.html]

@anonymous-matomo-user
Copy link
Author

A new version is available.

c - Standard alert dialog replaced by jQueryUI dialog. No page reload needed.
r - Removed dropdown list with options location label website. Instead, the settings for each label rendered separately.
a - Added option to hide the label.

NB! Need to re-save previously created counters! Otherwise plugin will not work!

@anonymous-matomo-user
Copy link
Author

A new version is available.
c - Piwik_Query changed to Zend_Db
r - Removed "font_size" and added 'sitename_font_size', 'visits_font_size', 'hits_font_size' for each label
c - createImage return false if Piwik_API_Request return an error and if FINFO module not loaded
a - Now user can preview edited counter image w/o saving.
a - New "update" method for updating from 0.7 to 0.8
a - Now user can clear the cache of cached counter images
c - Some visual changes on Add/Edit pages
c - Language updates

PS! Please read http://.com/en/others/piwik/10-piwik-graphical-counter.html#install section before upgrade

@mattab
Copy link
Member

mattab commented Dec 13, 2012

Very nice work @Globulopolis ! It looks like the plugin is now full featured and has a nice admin UI with inline help etc. Well done!

@anonymous-matomo-user
Copy link
Author

A new version is available.

a - Added a selection list of the period of calculation
a - Added checking the new version of the footer
c - When selecting a site from the list, in the date field, if it is empty, automatically substituted date add the site to the system
c - When choosing a period of "Day" the cache lifetime is set to 1 day
c - Fixed display of template pages for counter list, adding and editing
c - Updated the method of "update" to update from 0.7 to 0.9

PS! Please read http://.com/en/others/piwik/10-piwik-graphical-counter.html#install section before upgrade

Need help with translation plugin into other languages. Please contact me via http://.com/en/contact-form.html

@anonymous-matomo-user
Copy link
Author

Replying to matt:

Very nice work @Globulopolis ! It looks like the plugin is now full featured and has a nice admin UI with inline help etc. Well done!

Thank you Matt

@aureq
Copy link

aureq commented Jan 8, 2014

Attachment: Patch for API.php to have the plugin even if piwik is on a different http host.
CORS.diff

@aureq
Copy link

aureq commented Jan 8, 2014

@Globulopolis This is a very plugin and really useful.
I tried to deploy it today and had few issues. The Javascript doesn't work if piwik is hosted on a different domain (CORS).

Also, the generated javascript produced does not support a different host.

After working my head around the piwik API, I produced a patch to allow "Counter" to be CORS compatible so it returns "Access-Control-Allow-Origin" if needed.
Also, the generated javascript is compatible with either http and https even if piwik is on another http host.

Please have a look at CORS.diff.

Also, are you interested to have the French translation of this plugin ?

@anonymous-matomo-user
Copy link
Author

@aureq Thank you fot path. I review it and apply it asap.
Now plugin have a repo at github [https://github.com/Globulopolis/Counter]. All request you can leave here or on github repo.

Language files please send as described here [http://.com/en/others/piwik/10-piwik-graphical-counter.html#translations].

PS! Latest stable version always only on site not in github repo.

@mattab
Copy link
Member

mattab commented Jan 9, 2014

Dear Globulopolis, maybe you would be interested to publish your Counter plugin on the Marketplace? you can find the documentation at: http://developer.piwik.org/guides/distributing-your-plugin

It would be awesome to see your plugin listed at: http://plugins.piwik.org/ Cheers

@aureq
Copy link

aureq commented Jan 9, 2014

Hi @Globulopolis,

I made a pull request on github with my changes. That way, it should be simpler for you to review the code and accept the changes.

Also, as @matt said, it would be lovely to have your plugin on the marketplace.

Let me know if you have any questions.

Cheers

@anonymous-matomo-user
Copy link
Author

Patch merged.

matt I've read all docs for how to distribute plugin into marketplace, but maybe my hand curves. Need some help with it.

@mattab
Copy link
Member

mattab commented Jan 10, 2014

@Globulopolis

I see you tested to publish the plugin! it almost worked, I got an email with following message:


Unfortunately there was an issue while publishing your plugin Counter 2.0.1:

-> The metadata structure in your plugin.json file is not valid. The validator returned:
the property keywords is required. <-


So if you add keywords property and try again to tag the plugin, maybe it will work?

@mattab
Copy link
Member

mattab commented Feb 6, 2014

Great to see the plugin was published at: http://plugins.piwik.org/Counter

please direct all feedback via the Github page of this plugin. Great work guys!

@mattab
Copy link
Member

mattab commented Aug 4, 2014

@aureq CORS functionnality was added to Piwik in this global.ini.php entry: https://github.com/piwik/piwik/blob/master/config/global.ini.php#L388-L393

see #5912

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

3 participants