Page 1 of 2

Possible New Implementation?

Posted: 01 Dec 2011, 17:05
by Vox Populi
Hey Stoker,

I don't like making suggestions to a MOD as it's the authors baby however, I feel compelled to ask you something.

How about, in the LAST box (below the images), adding a Donation Goal. It'll require three more items in the ACP, current, goal, off or on.

Just a thought. Then everything is together without having a bunch of goal here at the header, goal on the footer etc.

I'd like SITE GOAL as mine is on the whole site for donations but I can change the wording my self. Again, just a thought.....

Thanks for the great work you are doing. :thumb:

Possible New Implementation?

Posted: 01 Dec 2011, 17:07
by Stoker
Its doable. I will look at it when I get the time.

Possible New Implementation?

Posted: 01 Dec 2011, 17:08
by Vox Populi
NP. I know you are busy and have your plate full. Again, it's just a thought currently.

Possible New Implementation?

Posted: 01 Dec 2011, 17:57
by martin123456
link changed in my post

Possible New Implementation?

Posted: 01 Dec 2011, 18:42
by Stoker
Open index.php
Find:

Code: Select all

if (!empty($config['donation_goal_enable']) &&  $config['donation_goal'] > 0)
{
$donation_goal_number = ($config['donation_achievement'] * 100) / $config['donation_goal'];
$template->assign_vars(array(
   'DONATION_GOAL_NUMBER'            => $donation_goal_number,
));
}
Replace with:

Code: Select all

if (!empty($config['donation_goal_enable']) &&  $config['donation_goal'] > 0)
{
$donation_goal_number = ($config['donation_achievement'] * 100) / $config['donation_goal'];
$donation_goal_rest = $config['donation_goal'] - $config['donation_achievement'];
$template->assign_vars(array(
   'DONATION_GOAL_NUMBER'           => number_format($donation_goal_number),
   'DONATION_GOAL_REST'            	=> $donation_goal_rest,
));
}
Open language/en/common.php
Find:

Code: Select all

'GOAL_REMAINING'			=> 'Remaining',
After add:

Code: Select all

'TOTAL_FORUM_DONATION_GOAL'		=> 'Donation goal',
	'TOTAL_FORUM_DONATIONS'			=> 'Total donations',
Open styles/prosilver/template/forum_goal_body.html
Find:

Code: Select all

</tbody>
Before add:

Code: Select all

<!-- IF (DONATION_INDEX_ENABLE and S_DONATE_ENABLED and DONATION_INDEX_BOTTOM) and (DONATION_ACHIEVEMENT_ENABLE or DONATION_GOAL_ENABLE) -->
			<tr>
				<td style="width: 160px; font-size:12px;">{L_TOTAL_FORUM_DONATION_GOAL} <strong>{DONATION_GOAL}</strong> {DONATION_GOAL_CURRENCY}</td>
				<td style="width: 160px; font-size:12px;">{L_TOTAL_FORUM_DONATIONS} <strong>{DONATION_ACHIEVEMENT}</strong> {DONATION_GOAL_CURRENCY}</td>
				<td style="width: 160px; font-size:12px;"><!-- IF DONATION_GOAL_NUMBER < 100 -->{L_GOAL_REMAINING} <strong>{DONATION_GOAL_REST}</strong> {DONATION_GOAL_CURRENCY}<!-- ELSE --><em>{L_GOAL_REMAINING_ZERO}</em> <img src="{ROOT_PATH}images/forum_goal_ok.png" width="12" height="12" alt="" /><!-- ENDIF --></td>
				<td><div style="background:url('{ROOT_PATH}images/forum_goal_grey.png') repeat-x; background-color: #cccccc; border: 1px solid black; width:100%;"><div style="background:url('{ROOT_PATH}images/forum_goal_<!-- IF DONATION_GOAL_NUMBER < 34 -->red<!-- ELSEIF DONATION_GOAL_NUMBER < 67 -->yellow<!-- ELSE -->green<!-- ENDIF -->.png') repeat-x;background-color: #008040; color: white; font-weight:bold;<!-- IF DONATION_GOAL_NUMBER < 100 --> border-right: 1px solid black;<!-- ENDIF --> max-width:100%;  width:{DONATION_GOAL_NUMBER}%; height:12px;"><span style="padding-left:25px; font-size:10px; line-height:12px;">{DONATION_GOAL_NUMBER}%</span></div></div></td>
			</tr>
			<!-- ENDIF -->

Possible New Implementation?

Posted: 01 Dec 2011, 19:00
by Vox Populi
Thanks Stoker.

Possible New Implementation?

Posted: 01 Dec 2011, 19:02
by Stoker
Let me know if it works okay.
I think I remembered everything :D

Possible New Implementation?

Posted: 01 Dec 2011, 19:09
by Stoker
Oooopsie :)
You need to enable Display Donation Stats Bottom
And you can delete the code from index_body.html now we have added it to forum_goal_body.html

Possible New Implementation?

Posted: 01 Dec 2011, 19:38
by Vox Populi
I'll check it out shortly.

EDIT: It appears I need to have your Donate Mod installed for the edits to function, correct?

Possible New Implementation?

Posted: 04 Dec 2011, 22:39
by Solidjeuh
Stoker wrote:Oooopsie :)
You need to enable Display Donation Stats Bottom
I can't see that anywhere ..
http://i43.tinypic.com/313lxs8.png
Also not in the donation mod..