News:

Wondering if this will always be free?  See why free is better.

Main Menu

Treasury mod

Started by Sir Osis of Liver, April 28, 2023, 01:21:36 PM

Previous topic - Next topic

Sir Osis of Liver

One of my guys is running Treasury mod from http://resourcez.biz in 2.0, we want to upggrade to 2.1 but still needs the mod.  http://resourcez.biz is gone.  Don't see anything similar on mod site, SMFHacks, SMFPacks.  Anyone know of mod that tracks donations?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

mickjav

I was talking about a donation mod for 2.1.3 to another member he did indicate he may be able to create one, but he's very sort of time.

If he's unable to do it, I may have a pop myself, as I think a large part of it would be within my abilities, But I'm in the same boat with time.

Mick

Sir Osis of Liver

I have the original treasury mod package, if that's any help.  Don't know what the license status is at the point, originating site is gone.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

It's a GNU license, if I understand correctly it's ok to modify and share the code for free.  Would have to be updated to support 2.1.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

mickjav

No, If I do it, It'll be for 2.1.3, I have some things I want for my site.

Sesquipedalian

Quote from: Sir Osis of Liver on April 28, 2023, 01:45:38 PMIt's a GNU license, if I understand correctly it's ok to modify and share the code for free.

That is correct.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Sir Osis of Liver

Would be good if someone could adopt this mod and update it for 2.1.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

landyvlad

Quote from: mickjav on April 28, 2023, 02:41:03 PMNo, If I do it, It'll be for 2.1.3, I have some things I want for my site.

I think that's what he means mate - 2.1.x
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

Shades.

I would very much like that mod to be updated for 2.1x as well!

Might be able to donate a little! ;)

Thanks,
Shades 8)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Mightymax44

#9
Adapt This mode for 2.1, it's easy but adapt the install.php and test the files more complexe.
(file is attachment, install for 2.1.3 but not ok with install.php file in origenal file)
La connaissance, c'est partager le savoir qui nous fait grandir.

Mightymax44

replace install.php file with this in archive and install mod ok for 2.1.3 but file treasury.php and treasuryadmin.php not worked correctly.
La connaissance, c'est partager le savoir qui nous fait grandir.

Mightymax44

ok in archive update treasory file but not sure about my fix and if it works with paypal.  It works with php 7.4 on smf local without error.

treasoryadmin.php original file ligne 372:
$query_Recordset1 = "SELECT user_id, custom, SUM(ROUND(mc_gross,2)) AS total, SUM(ROUND(mc_fee,2)) AS fee, SUM(ROUND(mc_gross,2))-SUM(ROUND(mc_fee,2)) AS net, MAX(payment_date) AS lastdate, mc_currency, SUM(ROUND(settle_amount,2)) AS settle
FROM {db_prefix}treas_donations
WHERE $search_query
AND (payment_status = 'Completed' OR payment_status = 'Refunded')
GROUP BY user_id";
$query_limit_Recordset1 = $query_Recordset1 . ' ORDER BY ' . $order_by;

$Recordset1 = $smcFunc['db_query']('', $query_limit_Recordset1, array());
$all_Recordset1 = $smcFunc['db_query']('', $query_Recordset1, array());
$totalRows = $smcFunc['db_affected_rows']();

while ($row = $smcFunc['db_fetch_assoc']($Recordset1))
$context['donor_totals'][] = array(
'custom' => $row['custom'],
'mc_gross' => $row['total'],
'mc_fee' => $row['fee'],
'mc_net' => $row['net'],
'lastdate' => $row['lastdate'],
'mc_currency' => $row['mc_currency'],
'settle_amount' => $row['settle'],
);
$smcFunc['db_free_result']($Recordset1);

Treasury.php orignal file ligne 99:
$query_Recordset1 = "
SELECT user_id, custom AS name, option_seleczion1 as showname, mc_currency AS currency, currency_symbol AS symbol, settle_amount AS settled, FROM_UNIXTIME( payment_date, '%b-%e' ) AS date, SUM(ROUND(mc_gross,2)) AS amt
FROM {db_prefix}treas_donations
WHERE $where
AND (payment_status = 'Completed' OR payment_status = 'Refunded')
GROUP BY txn_id
ORDER BY payment_date DESC
LIMIT $tr_config[don_num_don]";
$Recordset1 = $smcFunc['db_query']('', $query_Recordset1,
La connaissance, c'est partager le savoir qui nous fait grandir.

mickjav

Hi @Mightymax44 could you upload all files?

Mightymax44

ok archive complete with modification
La connaissance, c'est partager le savoir qui nous fait grandir.

mickjav

Have a working version of my pledges mod

https://www.databasedreams.co.uk/testing/index.php?action=pledge;area=pledge;sa=index;ds=pledges

I still have a lot of work left to do but the basic system is complete.

You can see the block on top left which uses a very simple bit of code that will be posted with the mod info.

There are permissions for view and adding donations

There are 2 types of donate images used in block 8 colours of each selectable from setting.

This is my main site version
https://www.databasedreams.co.uk/charts/index.php?action=pledge;area=pledge;sa=index;ds=pledges



mickjav

Right just about got my mod finished Only have a few minor things to sort plus readme file and install for tables

It now consists of 4 main parts

  • Donations Main Screen
  • Expenses Screen
  • Goals "Yearly, Monthly, Quarterly and Bi-Yearly" There can only be 1 Goal per year
  • Block Code "Still got a bit to add to this now I have the Goals working"

There are a number of admin screens

Confirm Donations
Add Expenses
Lists
Settings
Permissions.

Should anybody be interested, I'm hoping to be able to put it in for approval in a week or two

I've updated my site, so it now includes a full copy

mick

TwitchisMental

Quote from: mickjav on July 11, 2023, 03:05:22 PMRight just about got my mod finished Only have a few minor things to sort plus readme file and install for tables

It now consists of 4 main parts

  • Donations Main Screen
  • Expenses Screen
  • Goals "Yearly, Monthly, Quarterly and Bi-Yearly" There can only be 1 Goal per year
  • Block Code "Still got a bit to add to this now I have the Goals working"

There are a number of admin screens

Confirm Donations
Add Expenses
Lists
Settings
Permissions.

Should anybody be interested, I'm hoping to be able to put it in for approval in a week or two

I've updated my site, so it now includes a full copy

mick

Your knowledge growth on making mods is inspiring.

Do not be afraid to submit you mod, you'll probably learn some stuff during the approval process. 

Looking forward to your contributions :).

mickjav

Thanks, I'm hoping there won't be too much wrong with it.

I have had a lot of help from @Diego Andrés who built me a sort of template, so I can put basic Mods together plus he has helped with advice and coding when It's way over my head lol.

And also All those who help me out when I get stuck Which Is Quite often lol.

My 25 years working with access helps at times.

I hope to be able to contribute and learn over the years I have left  ;D

I am going to be working on a prize system soon, but that Will require STSHop which My Pledges mod can make use of if installed.

Anyways thanks dinner time mick




mickjav

This will be my last post on this topic.

Well Finally got all the UI Files finished So I just have the Install for the tables  ;D

I am knackered, lol

Files are being looked over so hopefully won't have too much to correct/Improve

I've spent years on some access databases but learning something new makes ya sweat esp At 60  :o

Test site Version
https://www.databasedreams.co.uk/testing/index.php?action=pledge;area=pledge;sa=index

Main Site Version
https://www.databasedreams.co.uk/charts/index.php?action=pledge;area=pledge;sa=index

I have not used an API for PayPal, but may add one in another version when I can figure it all out  :laugh:

Readme file




Pledges
Developed by Michael Javes



Introduction
Pledges implements a donations system to your forum.

Features
  • Email Admin(s) on New Donation
  • PM thank you message on donation confirmation
  • Includes PHP Block Portal Code
  • Comprehensive list of settings
  • Create Goals one per year for yearly, Monthly, Quarterly and bi-yearly
  • Includes a system for entering/Viewing site expenses
  • stats section
  • Menu Link shows how many donations are awaiting confirmation
  • Choose from 2 sets of 8 colours each for block donation images selectable in settings

Localization
English



TwitchisMental

Can't wait to see it submitted :). Awesome work @mickjav 

Advertisement: