now working who donated what list.

Download and support for PhpBB3 Paypal Donation Mod
User avatar
phenomkw
BBCoder II
BBCoder II
Posts: 38
Joined: 11 Jan 2012, 17:34
BBCodes: 0
Contact:

now working who donated what list.

Post by phenomkw »

I have worked out a scrolling marquee that you can change in the acp along with the body/success/cancel to add who donated and how much.

Please see next post.
Last edited by phenomkw on 13 Jan 2012, 09:08, edited 1 time in total.
User avatar
phenomkw
BBCoder II
BBCoder II
Posts: 38
Joined: 11 Jan 2012, 17:34
BBCodes: 0
Contact:

who donated what list.

Post by phenomkw »

Please make sure to make back ups of your files before you start to edit.

in phpmyadmin go to your forum database and

find:

Code: Select all

phpbb_donation
insert:

Code: Select all

donation_from

open: adm/style/acp_donation.html

Find:

Code: Select all

	<fieldset>
		<legend>{L_DONATION_CANCEL_SETTINGS}</legend>		
		<dl>
				<dt><label for="donation_cancel">{L_DONATION_CANCEL}:</label><br />
				<span>{L_DONATION_CANCEL_EXPLAIN}</span></dt>
				<dd><textarea id="donation_cancel" name="donation_cancel" rows="8" cols="45">{DONATION_CANCEL}</textarea></dd>
			</dl>
	</fieldset>
add after:

Code: Select all

	<fieldset>
		<legend>{L_DONATION_FROM_SETTINGS}</legend>		
		<dl>
				<dt><label for="donation_from">{L_DONATION_FROM}:</label><br />
				<span>{L_DONATION_FROM_EXPLAIN}</span></dt>
				<dd><textarea id="donation_from" name="donation_from" rows="8" cols="45">{DONATION_FROM}</textarea></dd>
			</dl>
	</fieldset>
		
open: includes/acp/acp_donation.php

find:

Code: Select all

'donation_success' 			=> utf8_normalize_nfc(request_var('donation_success', '', true)),
add after:

Code: Select all

'donation_from' 			=> utf8_normalize_nfc(request_var('donation_from', '', true)),
find:

Code: Select all

$donation_success = isset($donation['donation_success']) ? $donation['donation_success'] : '';
add after:

Code: Select all

$donation_from = isset($donation['donation_from']) ? $donation['donation_from'] : '';
find:

Code: Select all

'DONATION_SUCCESS'					=> $donation_success,
add after:

Code: Select all

'DONATION_FROM'				     	=> $donation_from,
open: language/en/mods/info_acp_donation.php

find:

Code: Select all

'DONATION_CANCEL_EXPLAIN'				=> 'Enter the text you want displayed on the cancel page<br />This is the page users are redirected to after they cancel a donation.<br /><br />HTML is allowed.',
add after:

Code: Select all

	'DONATION_FROM_SETTINGS'				=> 'Donation From Config',
	'DONATION_FROM'					    	=> 'Donation From text',
	'DONATION_FROM_EXPLAIN'				    => 'Enter the Donators you want displayed.',
open: donation.php

find:

Code: Select all

$donation_success = isset($donation['donation_success']) ? $donation['donation_success'] : '';
add after:

Code: Select all

$donation_from = isset($donation['donation_from']) ? $donation['donation_from'] : '';
find:

Code: Select all

'DONATION_SUCCESS'					=> html_entity_decode($donation_success),
add after:

Code: Select all

'DONATION_FROM'					    => html_entity_decode($donation_from),
open: styles/prosilver/template/index_body.html

find:

Code: Select all

	<p style="text-align:center;"><!-- IF DONATION_ACHIEVEMENT_ENABLE -->{L_WE_HAVE_ACHIEVED} <strong><!-- IF DONATION_ACHIEVEMENT > 0 -->{DONATION_ACHIEVEMENT}<!-- ELSE -->{DONATION_GOAL_NUMBER}<!-- ENDIF --></strong><!-- IF DONATION_GOAL_CURRENCY_ENABLE --> {DONATION_GOAL_CURRENCY}<!-- ENDIF --> {L_WE_HAVE_ACHIEVED_IN}<!-- ENDIF --><!-- IF DONATION_GOAL_ENABLE and DONATION_GOAL > 0 --> {L_OUR_DONATION_GOAL} <strong>{DONATION_GOAL}</strong><!-- IF DONATION_GOAL_CURRENCY_ENABLE --> {DONATION_GOAL_CURRENCY}<!-- ENDIF -->.<!-- ENDIF --></p>
add after:

Code: Select all

<p style="text-align:center;"><marquee>{DONATION_FROM}</marquee></p>
open: index.php

find:

Code: Select all

$template->assign_vars(array(
   'DONATION_GOAL_NUMBER'            => $donation_goal_number,
));
}
add after:

Code: Select all

$sql = 'SELECT * FROM ' . DONATION_TABLE;
		$result = $db->sql_query($sql);
		$donation = array();
		while ($row = $db->sql_fetchrow($result))
		{
			$donation[$row['config_name']] = $row['config_value'];
		}
		$db->sql_freeresult($result);
		
$donation_from = isset($donation['donation_from']) ? $donation['donation_from'] : '';

$template->assign_vars(array(
	'DONATION_FROM'					=> html_entity_decode($donation_from),
));
now purge all cache and refresh template.

now go to acp .mods tab and scroll to the bottom you will see the Donation From Config box. Type in what you want and save.

Subsilver2 edits can be found here
viewtopic.php?f=42&t=1822
Last edited by phenomkw on 16 Jan 2012, 03:34, edited 3 times in total.
User avatar
Arnevb
BBCoder III
BBCoder III
Posts: 98
Joined: 08 Oct 2011, 18:23
BBCodes: 8
Location: Belgium
Contact:

who donated what list.

Post by Arnevb »

How do I add that "donation_from"?
User avatar
phenomkw
BBCoder II
BBCoder II
Posts: 38
Joined: 11 Jan 2012, 17:34
BBCodes: 0
Contact:

who donated what list.

Post by phenomkw »

you have to log into your sites cpanel then go to your phpmyadmin.

from there you will have to go to your forum database.

then

find:

Code: Select all

phpbb_donation
then at the top click on insert

then in the first top right box put

donation_from

and click GO.

and you are done.
User avatar
Terr0r
BBCoder V
BBCoder V
Posts: 339
Joined: 04 May 2011, 00:47
BBCodes: 100
Location: The Netherlands
Contact:

who donated what list.

Post by Terr0r »

Is there a screenshot or live demo from this ?

Greets Terr0r
If you can't fix it with ducktape you ain't using enough
For my MODS and BBCodes or other things that I have made take a look here
User avatar
phenomkw
BBCoder II
BBCoder II
Posts: 38
Joined: 11 Jan 2012, 17:34
BBCodes: 0
Contact:

who donated what list.

Post by phenomkw »

Here are some screen shots.I hope its what you want.
acp panel.png
donate page.PNG
donate page2.PNG
User avatar
Terr0r
BBCoder V
BBCoder V
Posts: 339
Joined: 04 May 2011, 00:47
BBCodes: 100
Location: The Netherlands
Contact:

who donated what list.

Post by Terr0r »

Thanks and for wich version of the donation MOD is this ?

Can I also this for the version 1.0.0

Greets Terr0r
If you can't fix it with ducktape you ain't using enough
For my MODS and BBCodes or other things that I have made take a look here
User avatar
phenomkw
BBCoder II
BBCoder II
Posts: 38
Joined: 11 Jan 2012, 17:34
BBCodes: 0
Contact:

who donated what list.

Post by phenomkw »

I do not know if it will work for older version or not. I am using version 1.0.3.

Does anyone have any idea where to start to get it to show on the index?
User avatar
Terr0r
BBCoder V
BBCoder V
Posts: 339
Joined: 04 May 2011, 00:47
BBCodes: 100
Location: The Netherlands
Contact:

who donated what list.

Post by Terr0r »

I think the same thing waht you do for the donate_body.html try that I think it will work

Greets Terr0r
If you can't fix it with ducktape you ain't using enough
For my MODS and BBCodes or other things that I have made take a look here
User avatar
phenomkw
BBCoder II
BBCoder II
Posts: 38
Joined: 11 Jan 2012, 17:34
BBCodes: 0
Contact:

now working who donated what list.

Post by phenomkw »

Updated code to work on forum index.

also if you are using the Collapsible-Categories and would like to have your donation bar in one here is the code i am using for that.

open: index_body.html

find:

Code: Select all

<!-- IF DONATION_INDEX_ENABLE and (DONATION_ACHIEVEMENT_ENABLE or DONATION_GOAL_ENABLE) -->
	<h3><a href="{U_DONATE}">{L_DONATIONS_INDEX}</a></h3>
	<!-- IF DONATION_GOAL_ENABLE and DONATION_ACHIEVEMENT_ENABLE and DONATION_GOAL > 0 -->
	<div style="background:url('{ROOT_PATH}images/prog_grey.png') repeat-x; background-color: #cccccc; border: 1px solid black; width:100%; margin-top: 2px;"><div style="background:url('{ROOT_PATH}images/prog_green.png') repeat-x;background-color: #008040; color: white; font-weight:bold; max-width:100%;  width:{DONATION_GOAL_NUMBER}%; height:24px;"><span style="padding-left:25px; font-size:18px;">{DONATION_GOAL_NUMBER}%</span></div></div>
	<!-- ENDIF -->
	<p style="text-align:center;"><!-- IF DONATION_ACHIEVEMENT_ENABLE -->{L_WE_HAVE_ACHIEVED} <strong><!-- IF DONATION_ACHIEVEMENT > 0 -->{DONATION_ACHIEVEMENT}<!-- ELSE -->{DONATION_GOAL_NUMBER}<!-- ENDIF --></strong><!-- IF DONATION_GOAL_CURRENCY_ENABLE --> {DONATION_GOAL_CURRENCY}<!-- ENDIF --> {L_WE_HAVE_ACHIEVED_IN}<!-- ENDIF --><!-- IF DONATION_GOAL_ENABLE and DONATION_GOAL > 0 --> {L_OUR_DONATION_GOAL} <strong>{DONATION_GOAL}</strong><!-- IF DONATION_GOAL_CURRENCY_ENABLE --> {DONATION_GOAL_CURRENCY}<!-- ENDIF -->.<!-- ENDIF --></p>
<!-- ENDIF -->
replace with:

Code: Select all

<!-- IF DONATION_INDEX_ENABLE and (DONATION_ACHIEVEMENT_ENABLE or DONATION_GOAL_ENABLE) -->
<div class="forumlist">
<div class="forabg">
	<div class="inner"><span class="corners-top"><span></span></span>
	<ul class="topiclist">
				<li class="header">
					<dl class="icon">
						<dt><a href="{U_DONATE}">{L_DONATIONS_INDEX}</a></dt>
					</dl>
				</li>
			</ul>
			</div>
	<!-- IF DONATION_GOAL_ENABLE and DONATION_ACHIEVEMENT_ENABLE and DONATION_GOAL > 0 -->
	<!-- IF SCRIPT_NAME eq 'index' --><div class="trigger active"></div><!-- ENDIF -->
<div class="collapsethis">
	<div style="background:url('{ROOT_PATH}images/prog_grey.png') repeat-x; background-color: #cccccc; border: 1px solid black; width:100%; margin-top: 2px;"><div style="background:url('{ROOT_PATH}images/prog_green.png') repeat-x;background-color: #008040; color: white; font-weight:bold; max-width:100%;  width:{DONATION_GOAL_NUMBER}%; height:24px;"><span style="padding-left:25px; font-size:18px;">{DONATION_GOAL_NUMBER}%</span></div></div>
	<!-- ENDIF -->
	<p style="text-align:center;"><!-- IF DONATION_ACHIEVEMENT_ENABLE -->{L_WE_HAVE_ACHIEVED} <strong><!-- IF DONATION_ACHIEVEMENT > 0 -->{DONATION_ACHIEVEMENT}<!-- ELSE -->{DONATION_GOAL_NUMBER}<!-- ENDIF --></strong><!-- IF DONATION_GOAL_CURRENCY_ENABLE --> {DONATION_GOAL_CURRENCY}<!-- ENDIF --> {L_WE_HAVE_ACHIEVED_IN}<!-- ENDIF --><!-- IF DONATION_GOAL_ENABLE and DONATION_GOAL > 0 --> {L_OUR_DONATION_GOAL} <strong>{DONATION_GOAL}</strong><!-- IF DONATION_GOAL_CURRENCY_ENABLE --> {DONATION_GOAL_CURRENCY}<!-- ENDIF -->.<!-- ENDIF --></p>
 <p style="text-align:center;"><marquee>{DONATION_FROM}</marquee></p>
</div>
<span class="corners-bottom"><span></span></span></div>
</div>
</div><!-- ENDIF -->
if you are not using this marquee add-on

remove:

Code: Select all

<p style="text-align:center;"><marquee>{DONATION_FROM}</marquee></p>
from the above code

enjoy. :thumb:
Locked