Opened 6 years ago

Closed 6 years ago

#1803 closed task (fixed)

Donation bar reset

Reported by: crumbking Owned by: crumbking
Priority: major Milestone: 1.2
Component: BW Admin Keywords: donation
Cc:

Description

According to the BoD meeting report point 5: http://www.bewelcome.org/wiki/BoD_Meeting_21.10.2012

Issue: We need to reset the "donation bar". Also a new wording needs to be established.

Solution

  • reset the bar
  • add new text (Help us to reach XXX € to cover our costs for the 2012 /2013 term!)
  • change the amount for the whole year to the budget number

Attachments (2)

internal startpage.png (52.9 KB) - added by crumbking 6 years ago.
donate (40.3 KB) - added by crumbking 6 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 6 years ago by crumbking

$requiredPerYear in donate.model.php needs to be changed

and in line 33 in donate.model.php

- created > CONCAT(CONCAT(year(NOW()), '-01'), '-01')
+ created > CONCAT(CONCAT(2012, '-10'), '-11')

... I would say that could do the job :-)

We simply count the values from > 11 October 2012.

But as I'm not familiar with this stuff I really would appreciate some input ;-)

comment:2 Changed 6 years ago by crumbking

We will introduce a new word code: Help us to reach 1260 € to cover our costs for 2012-2013!

Changed 6 years ago by crumbking

Changed 6 years ago by crumbking

comment:3 Changed 6 years ago by crumbking

  • Milestone changed from unassigned to 1.2

I add this ticket to 1.2 as there is nothing big happen codewise but it has a big impact of BW/BV. We need donations and currently on the page says we do need nothing ;-) If we wait longer there is no need for a change as the bar reset automatically at the beginning next year. But then we may miss donations of 2 months.

I added a new wordcode and changed the values to the current budget. Also took the donation bar down to 0%.

Just don't wanna commit yet as no answer by Meinhard?

@@ -16,8 +16,8 @@ class DonateModel extends PAppModel
      */
     public function getStatForDonations() {
         // TODO: Move to config
-        $requiredPerYear = 1000;
-        $requiredPerMonth = 85;
+        $requiredPerYear = 1260;
+        $requiredPerMonth = 105;
 
         // Calculate donations received for current year
         $result = $this->dao->query("
@@ -29,7 +29,7 @@ class DonateModel extends PAppModel
             FROM
                 donations
             WHERE
-                created > CONCAT(CONCAT(year(NOW()), '-01'), '-01')
+                created > '2012-10-11'
             ");
         $rowYear = $result->fetch(PDB::FETCH_OBJ);
 

------------------ build/donate/templates/userbar_donate.php ------------------
index 0f34571..15164f7 100644
@@ -30,7 +30,7 @@ if ($TDonationArray) {
 
-                    <?=$words->getFormatted('Donate_bar_annual',$TotalDonations,$TotalDonationsNeeded); ?>
+                    <?=$words->getFormatted('Donate_bar_annual_2013',$TotalDonations,$TotalDonationsNeeded); ?>


-------------------- build/rox/templates/userbar_donate.php --------------------
index bd63d12..999e5ec 100644
@@ -31,7 +31,7 @@ $Stats = $DModel->getStatForDonations() ;
             <div class="small">
-                <p><?=$ww->Donate_bar_annual($TotalDonations,$TotalDonationsNeeded) ?></p>
+                <p><?=$ww->Donate_bar_annual_2013($TotalDonations,$TotalDonationsNeeded) ?></p>
                 <a href="donate" title="<?=$wwsilent->Donate_DonateNow ?>"><?=$wwsilent->Donate_DonateNow ?></a>

comment:4 Changed 6 years ago by jsfan

Patchset a4229ee deployed on alpha.

comment:5 Changed 6 years ago by crumbking

  • Resolution set to fixed
  • Status changed from new to closed

Updated the new wordcode on alpha.

Seems to work. close this one.

Note: See TracTickets for help on using tickets.