Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki-CVS

SVN: [59164] branches/wmf-deployment/extensions/ContributionReporting

 

 

Wikipedia mediawiki-cvs RSS feed   Index | Next | Previous | View Threaded


tomasz at svn

Nov 16, 2009, 5:14 PM

Post #1 of 1 (128 views)
Permalink
SVN: [59164] branches/wmf-deployment/extensions/ContributionReporting

http://www.mediawiki.org/wiki/Special:Code/MediaWiki/59164

Revision: 59164
Author: tomasz
Date: 2009-11-17 01:14:31 +0000 (Tue, 17 Nov 2009)

Log Message:
-----------
picking up to r59163

Modified Paths:
--------------
branches/wmf-deployment/extensions/ContributionReporting/ContributionReporting.i18n.php
branches/wmf-deployment/extensions/ContributionReporting/ContributionReporting.php

Added Paths:
-----------
branches/wmf-deployment/extensions/ContributionReporting/cc-reporting.js
branches/wmf-deployment/extensions/ContributionReporting/cc-reporting.php

Property Changed:
----------------
branches/wmf-deployment/extensions/ContributionReporting/


Property changes on: branches/wmf-deployment/extensions/ContributionReporting
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/REL1_15/phase3/extensions/ContributionReporting:51646
/trunk/extensions/ContributionReporting:56151-57449,58684,58687-59049
/trunk/extensions/ContributionTracking:58684
/trunk/phase3/extensions/ContributionReporting:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,58633,58816
+ /branches/REL1_15/phase3/extensions/ContributionReporting:51646
/trunk/extensions/ContributionReporting:56151-57449,58684,58687-59049,59134-59163
/trunk/extensions/ContributionTracking:58684
/trunk/phase3/extensions/ContributionReporting:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,58633,58816

Modified: branches/wmf-deployment/extensions/ContributionReporting/ContributionReporting.i18n.php
===================================================================
--- branches/wmf-deployment/extensions/ContributionReporting/ContributionReporting.i18n.php 2009-11-17 01:08:03 UTC (rev 59163)
+++ branches/wmf-deployment/extensions/ContributionReporting/ContributionReporting.i18n.php 2009-11-17 01:14:31 UTC (rev 59164)
@@ -524,7 +524,9 @@
'contribstats-conversion' => 'Stopa pretvaranja (%)',
'contribstats-template' => 'Šablon',
'contribstats-nodata' => 'Nisu dostupni podaci',
+ 'contribstats-landingpage' => 'Ciljna stranica',
'contribstats-donatepage' => 'Stranica donacija',
+ 'contribstats-average' => 'Prosjek',
'fundraiserstatistics' => 'Statistike donatora',
'fundraiserstats-date' => 'Datum',
'fundraiserstats-day' => 'Dan $1 od $2',
@@ -1471,6 +1473,7 @@
'contribstats-nodata' => 'Kei Date vorhande',
'contribstats-landingpage' => 'Landsyte',
'contribstats-donatepage' => 'Spändesyte',
+ 'contribstats-average' => 'Durschnitt',
'fundraiserstatistics' => 'Spändestatischtik',
'fundraiserstats-date' => 'Datum',
'fundraiserstats-day' => 'Dag $1 vo $2',
@@ -1870,9 +1873,11 @@
'contribstats-day' => 'Dio',
'contribstats-month' => 'Monato',
'contribstats-total-ytd' => 'Sumo (YTD)',
+ 'contribstats-value-exactly' => 'Exakte $1',
'contribstats-value-under' => 'Min kam $1',
'contribstats-value-from' => 'Inter $1 - $2',
'contribstats-value-over' => 'Plu kam $1',
+ 'contribstats-week' => 'Semano',
'fundraiserstats-date' => 'Dato',
'fundraiserstats-day' => 'Dio $1 di $2',
);
@@ -2267,7 +2272,9 @@
'contribstats-conversion' => 'Ëmrechnungs-Cours (%)',
'contribstats-template' => 'Schabloun',
'contribstats-nodata' => 'Keng Donnéeën uginn',
+ 'contribstats-landingpage' => 'Zilsäit',
'contribstats-donatepage' => 'Spende-Säit',
+ 'contribstats-average' => 'Duerchschnëtt',
'fundraiserstatistics' => 'Statistike vun den Donen',
'fundraiserstats-date' => 'Datum',
'fundraiserstats-day' => 'Dag $1 vu(n) $2',
@@ -2941,12 +2948,12 @@
'contributionreporting-desc' => 'Relatório ao vivo da angariação de fundos da Wikimedia',
'contributiontotal' => 'Total de contribuições',
'contributionhistory' => 'Histórico de contribuições',
- 'contrib-hist-header' => 'Comentários em tempo real de doadores de todo o mundo',
+ 'contrib-hist-header' => 'Comentários em tempo real de benfeitores de todo o mundo',
'contrib-hist-name' => 'Nome',
'contrib-hist-date' => 'Hora e data',
'contrib-hist-amount' => 'Quantia',
- 'contrib-hist-next' => 'Doações mais antigas',
- 'contrib-hist-previous' => 'Doações mais recentes',
+ 'contrib-hist-next' => 'Contribuições mais antigas',
+ 'contrib-hist-previous' => 'Contribuições mais recentes',
'contrib-hist-anonymous' => 'Anónimo',
'contributionstatistics' => 'Estatísticas de contribuições',
'contribstats-desc' => 'Apresenta estatísticas das contribuições feitas à Fundação Wikimedia',
@@ -2979,7 +2986,10 @@
'contribstats-donations' => 'Donativos',
'contribstats-conversion' => 'Taxa de conversão (%)',
'contribstats-template' => 'Predefinição',
- 'contribstats-nodata' => 'Não foram providenciados dados',
+ 'contribstats-nodata' => 'Não foram fornecidos dados',
+ 'contribstats-landingpage' => 'Página inicial',
+ 'contribstats-donatepage' => 'Página de donativos',
+ 'contribstats-average' => 'Média',
'fundraiserstatistics' => 'Estatísticas da angariação de fundos',
'fundraiserstats-date' => 'Data',
'fundraiserstats-day' => 'Dia $1 de $2',
@@ -2996,6 +3006,7 @@

/** Brazilian Portuguese (Português do Brasil)
* @author Eduardo.mps
+ * @author Hamilton Abreu
*/
$messages['pt-br'] = array(
'contributionreporting-desc' => 'Relatório ao vivo da angariação de fundos da Wikimedia',
@@ -3039,6 +3050,7 @@
'contribstats-donations' => 'Doações',
'contribstats-conversion' => 'Taxa de conversão (%)',
'contribstats-template' => 'Predefinição',
+ 'contribstats-nodata' => 'Não foram providenciados dados',
'fundraiserstatistics' => 'Estatísticas da angariação de fundos',
'fundraiserstats-date' => 'Data',
'fundraiserstats-day' => 'Dia $1 de $2',
@@ -3146,6 +3158,7 @@
'contribstats-nodata' => 'Данные не указаны',
'contribstats-landingpage' => 'Страница приземления',
'contribstats-donatepage' => 'Страница пожертвований',
+ 'contribstats-average' => 'Среднее',
'fundraiserstatistics' => 'Статистика сбора средств',
'fundraiserstats-date' => 'Дата',
'fundraiserstats-day' => '$1 день $2',

Modified: branches/wmf-deployment/extensions/ContributionReporting/ContributionReporting.php
===================================================================
--- branches/wmf-deployment/extensions/ContributionReporting/ContributionReporting.php 2009-11-17 01:08:03 UTC (rev 59163)
+++ branches/wmf-deployment/extensions/ContributionReporting/ContributionReporting.php 2009-11-17 01:14:31 UTC (rev 59164)
@@ -77,7 +77,13 @@
'title' => '2008 Fundraiser',
'start' => 'Nov 4 2008',
'end' => 'Jan 9 2009'
- )
+ ),
+ array(
+ 'id' => '2009',
+ 'title' => '2009 Fundraiser',
+ 'start' => 'Nov 10 2009',
+ 'end' => 'Jan 15 2010'
+ ),
);

// Thesholds for fundraiser statistics

Copied: branches/wmf-deployment/extensions/ContributionReporting/cc-reporting.js (from rev 59163, trunk/extensions/ContributionReporting/cc-reporting.js)
===================================================================
--- branches/wmf-deployment/extensions/ContributionReporting/cc-reporting.js (rev 0)
+++ branches/wmf-deployment/extensions/ContributionReporting/cc-reporting.js 2009-11-17 01:14:31 UTC (rev 59164)
@@ -0,0 +1,24 @@
+
+runOnloadHook = function(){
+ sendReq("cc-reporting.php?load=1&utm_src=" + document.payment.utm_source.value);
+}
+
+submitForm = function(){
+ sendReq("cc-reporting.php?submit=1&utm_src="+ document.payment.utm_source.value);
+ return validate_form(document.payment);
+}
+
+sendReq = function(sendRequest){
+ if (window.XMLHttpRequest)
+ {
+   xhttp=new XMLHttpRequest();
+   }
+ else // Internet Explorer 5/6
+ {
+ xhttp=new ActiveXObject("Microsoft.XMLHTTP");
+ }
+ xhttp.open("GET",sendRequest ,false);
+ xhttp.send("");
+ dummyVar=xhttp.responseXML;
+}
+

Copied: branches/wmf-deployment/extensions/ContributionReporting/cc-reporting.php (from rev 59163, trunk/extensions/ContributionReporting/cc-reporting.php)
===================================================================
--- branches/wmf-deployment/extensions/ContributionReporting/cc-reporting.php (rev 0)
+++ branches/wmf-deployment/extensions/ContributionReporting/cc-reporting.php 2009-11-17 01:14:31 UTC (rev 59164)
@@ -0,0 +1,35 @@
+<?php
+if(isset ($_REQUEST['load'])){
+ handleLoad();
+}
+else if(isset ($_REQUEST['submit'])){
+ handleSubmit();
+}
+
+function handleLoad(){
+ $cc_id = randomCookie();
+
+ if(!isset($_COOKIE['cc-cookie'])){
+ $cc_id = $_REQUEST['cc-cookie'];
+ }
+ else{
+ //set cookie to expire in maybe about a year or so... 300 days
+ setcookie('cc-cookie', $cc_id, time() + (60 * 60 * 24 * 300), '/', "payments.wikimedia.org");
+ }
+
+ //if not exist insert into DB
+ //via REQUEST['utm_src']
+}
+
+function handleSubmit(){
+ $cc_id = "NULL";
+ if(isset($_COOKIE['cc-cookie'])){
+ $cc_id = $_COOKIE['cc-cookie'];
+ }
+
+ //donations++
+}
+
+function randomCookie(){
+ return md5(mt_rand() + time());
+}
\ No newline at end of file



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Wikipedia mediawiki-cvs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.