Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2   Go Down

Author Topic: [Unsupported, outdated]: Google Analytics plugin for cpg1.5.x  (Read 34990 times)

0 Members and 1 Guest are viewing this topic.

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
[Unsupported, outdated]: Google Analytics plugin for cpg1.5.x
« on: August 16, 2009, 10:48:02 pm »

I have updated my Google Analytics plugin to work with cpg1.5.x. The testing has been done with cpg1.5.2.

Features:
  • multilingual (currently: en, fr, fi, de, nl )
  • puts tracker code in all pages except if an admin has logged in or if the user has installed an optional cookie
  • won't overwrite any core files (eg. anycontent.php or theme.php)
  • theme independent

Feel free to post your translation or comments.

EDIT: This plugin is now replaced by my External tracker plugin. Therefore this plugin becomes unsupported.
« Last Edit: May 31, 2010, 07:57:13 am by Joachim Müller »
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15415
Re: Google Analytics plugin for cpg1.5.x
« Reply #1 on: August 17, 2009, 08:59:58 am »

I've attached version 1.1 to the initial post.

Changes:
- German translation added
- Assigned class 'button' to buttons
- Minor bug fixes
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: Google Analytics plugin for cpg1.5.x
« Reply #2 on: August 19, 2009, 10:00:35 pm »

Thanks for your contributions.
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: Google Analytics plugin for cpg1.5.x
« Reply #3 on: November 18, 2009, 02:02:39 pm »

I've attached version 1.2 to the first post.

Changes:
- Bugfix for a broken html output
- Fixed typo in the Finnish language file
- Αndré, you're now added to the author list of this plugin
Logged

tjiepie

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Translation for Google Analytics
« Reply #4 on: December 17, 2009, 06:24:27 am »

I have translation Google Analytics to Dutch

Forum: (I can't post it there, thanks for move)
http://forum.coppermine-gallery.net/index.php/topic,61232.0.html

Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: Google Analytics plugin for cpg1.5.x
« Reply #5 on: December 18, 2009, 09:44:14 am »

I've attached version 1.3 to the initial post.
Changes:
- Dutch translation added (contibuted by tjiepie)
- Changelog and readme files are added
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: Google Analytics plugin for cpg1.5.x
« Reply #6 on: February 20, 2010, 08:04:55 pm »

I've attached version 1.4 to the initial post.

Changes:
- Added support for the new plugin installer
- Added svn headers as this plugin has been added to svn
- Added Announcement thread -links to configuration.php

This version is taken from svn, so it includes Joachim's code optimisations in codebase.php. I didn't add the svn headers to the index.html since it is empty and its purpose is to disable diroctory viewing of my plugin.

Ps. Thanks for adding my plugin to svn.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4482
    • Windsurf.me
Re: Google Analytics plugin for cpg1.5.x
« Reply #7 on: February 20, 2010, 08:19:09 pm »

Thank you for your efforts. Any good script will be added. Coppermine is a community driven project and can only grow with support from users such as yourself. Keep up the good work.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

MisteryBrother

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Google Analytics plugin for cpg1.5.x
« Reply #8 on: February 24, 2010, 05:34:32 pm »

Small mistake on line 32:
$extra_info =

Find these code:

Code: [Select]
$extra_info '<a href="index.php?file=google_analytics/cookie" title="Install or update the cookie">Install or update the cookie</a><br /><a href="http://forum.coppermine-gallery.net/index.php/topic,61232.0.html" rel="external" class="admin_menu external">'.cpg_fetch_icon('announcement', 1).'Announcement thread for '.$name.' plugin</a>';
REPLACE with the code:

Code: [Select]
$extra_info = '<a href="index.php?file=google_analytics/cookie" title="Install or update the cookie">Install or update the cookie</a><br /><a href="http://forum.coppermine-gallery.net/index.php/topic,61232.0.html" rel="external" class="admin_menu external">'.cpg_fetch_icon('announcement', 1).'Announcement thread for '.$name.' plugin</a>';



Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: Google Analytics plugin for cpg1.5.x
« Reply #9 on: February 27, 2010, 11:04:57 pm »

@MisteryBrother: Thanks for reporting that bug. The fixed version is attached to the initial post.
Logged

a-m

  • Translator
  • Coppermine novice
  • **
  • Offline Offline
  • Posts: 30
Re: Google Analytics plugin for cpg1.5.x
« Reply #10 on: March 04, 2010, 10:32:42 am »

 :)chinese_gb
Logged

jmatute

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 453
Re: Google Analytics plugin for cpg1.5.x
« Reply #11 on: May 04, 2010, 07:21:27 am »

Hi,

This is the spanish translation. However the plugin information keeps showing in English in Coppermine's plugin admin page - it reads the description field  in the configuration.php file, doesn't it?.

Just in case it changes in the future:
Code: [Select]
$description='Este plugin añade el código de seguimiento de <a href="http://www.google.com/analytics/" rel="external" class="external">Google Analytics</a>\ a cada página de la galería, salvo al entrar como administrador. También se puede activar la exclusión mediante una cookie tras la instalación del plugin.';
$author='<a href="http://forum.coppermine-gallery.net/index.php?action=profile;u=56739" rel="external" class="external">papukaija</a>, v1.1 por <a href="http://forum.coppermine-gallery.net/index.php?action=profile;u=24278" rel="external" class="external">André</a>';

Regards,
« Last Edit: May 04, 2010, 07:41:54 am by Joachim Müller »
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: Google Analytics plugin for cpg1.5.x
« Reply #12 on: May 05, 2010, 07:37:19 pm »

This is the spanish translation. However the plugin information keeps showing in English in Coppermine's plugin admin page - it reads the description field  in the configuration.php file, doesn't it?.
The plugin information is read from configuration.php but that information is static; always in English. I may change this if needed with the coming update of my plugin (see the edit in the initial post).
Logged

jmatute

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 453
Re: Google Analytics plugin for cpg1.5.x
« Reply #13 on: May 05, 2010, 11:20:49 pm »

Hi,

This is the spanish translation.


Sorry, but I can't see attached the file I intended to (spanish.zip). Did I forget it, or got lost when Joachim beautyfied my post ?

Regards,
José Luis
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Google Analytics plugin for cpg1.5.x
« Reply #14 on: May 06, 2010, 08:29:40 am »

I just added the code tags to your posting. I haven't removed an attachment. How could there be translation for a plugin that doesn't feature i18n? As suggested in Geo IP Lookup - check from which country your visitors come from, you're welcome to add i18n for this plugin - that's dead easy, but won't help much, as this plugin doesn't have a config screen or similar - all the end user can do is install it.
Logged

jmatute

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 453
Re: Google Analytics plugin for cpg1.5.x
« Reply #15 on: May 06, 2010, 09:17:22 am »

Spanish file attached. Please forgive my head - I'll try to swicth on 'Memory' config option next time.

Thank you,
José Luis.
Logged

jmatute

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 453
Re: Google Analytics plugin for cpg1.5.x
« Reply #16 on: May 10, 2010, 06:50:46 am »

Hi,

I did some modifications in my personal copy of the plugin, and I don't know if they can be interesting for anybody.

Original plugin had some sentences written in the configuration.php file. I could easily translate them in my but new versions of the plugin will ruin that work. So I put them in the spanish.php and english.php files, and for the rest of languages I provide a default value. It isn't needed when all messages are translated in every language file.

Regards,
José Luis.
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: Google Analytics plugin for cpg1.5.x
« Reply #17 on: May 10, 2010, 02:43:56 pm »

So I put them in the spanish.php and english.php files, and for the rest of languages I provide a default value. It isn't needed when all messages are translated in every language file.

Thanks for your effort. My plugin (as Coppermine) has already a language fallback, so there is no need for if ( is_null($description)) function, which can be removed as soon as the needed text is defined in english.php. I won't made those changes to my 1.x version of my plugin because I want to concentrate 100% to the coming v. 2.0 plugin which will add support for other trackers too. However, I will make the configuration.php translateable in my v. 2.0 plugin.
Logged

jmatute

  • Translator
  • Coppermine frequent poster
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 453
Re: Google Analytics plugin for cpg1.5.x
« Reply #18 on: May 10, 2010, 03:01:44 pm »

Thanks for your effort. My plugin (as Coppermine) has already a language fallback, so there is no need for if ( is_null($description)) function, which can be removed as soon as the needed text is defined in english.php.

Heard about it, but didn't know it applied here too. I suppose it's my lack of PHP skills.

I won't made those changes to my 1.x version of my plugin because I want to concentrate 100% to the coming v. 2.0 plugin which will add support for other trackers too.

Very interesting: I had in mind to try to include utm_* and user-defined GA variables specially for postcards sent by coppermine. But it will be in the long term, again because of my lack of  PHP skills. And i'm concentrating on translation - at least I feel I can help that way. Just for curiosity: can you advance which ones are you thinking about?

However, I will make the configuration.php translateable in my v. 2.0 plugin.
I'll keep aware of it.

Thank you, and regards
José Luis
Logged

papukaija

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Posts: 333
Re: Google Analytics plugin for cpg1.5.x
« Reply #19 on: May 10, 2010, 04:14:43 pm »

Heard about it, but didn't know it applied here too. I suppose it's my lack of PHP skills.
Just for curiosity: can you advance which ones are you thinking about?
I'll keep aware of it.

I'm thinking about Piwik and Tynt Insight. Feel free to post more suggestions. I can also look for some GA variables that I could add.
Logged
Pages: [1] 2   Go Up
 

Page created in 0.024 seconds with 21 queries.