Exclusive eBooks, Software Solutions, Quality Guaranteed
 
Web NukeBiz
Welcome to NukeBiz · Members
Amazon
show cart or checkout0 items
Cart Value: 0.00

Forums » DragonflyCMS Projects » Treasury and Supporters » Suggestions To Enhance The Module (Supporters module)
Suggestions To Enhance The Module (Supporters module)
For managing donations, site expenses and supporters - further enhancements only in the Donations Pro version.
Topic initiation via Bugger.

Go to page Previous  1, 2, 3  Next
Post new topic    Reply to topic    Printer Friendly Page     Forum Index »  eCommerce » Treasury and Supporters

View previous topic :: View next topic  
Author Message
hqarrse
Director
Director

Offline Offline
Joined: Jan 08, 2006
Posts: 153

PostPosted: Fri Mar 02, 2007 5:29 pm
Post subject: Re: Suggestions To Enhance The Module

Phoenix, Thanks a lot for that - I'm also away for the next two weeks so won't be able to do much with it until then. Its quite possible that the other site admin will be on here and take this forward though. Otherwise I'll look forward to getting stuck in when I get back.

_________________
Online Dating

hqarrse's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Slackware/Apache 2.2.4/MySQL 5.0/PHP5.2/9.1.2.1
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Sat Mar 03, 2007 3:09 am
Post subject: Re: Suggestions To Enhance The Module

It's a standard installation, so he shouldn't experience any problems Smile


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Mon Mar 12, 2007 1:17 pm
Post subject: Re: Suggestions To Enhance The Module

I've modified the code, but it's not in the download yet, so that,
  • the list of proposed ranks is shown (as before)
  • the red button displays to implement the change (as before)
  • when clicked, the change happens automatically (based on rank title) and immediately returns to the listing i.e. all done in a fraction of a second, and ready to change the next one you choose.
    At this point the changed rank will convert to the green button, signifying completion - it's clean and tidy, but does popup an alert asking you if you really meant to change the rank.
The more I think about it, it's better to just add an extra field for the rank minimum amount to the bbranks table and work directly from that table - a quick review of Dragonfly core code tells me that adding the extra field shouldn't conflict with a 'vanilla' core (also cuts out a db query).


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
hqarrse
Director
Director

Offline Offline
Joined: Jan 08, 2006
Posts: 153

PostPosted: Tue Mar 13, 2007 2:08 am
Post subject: Re: Suggestions To Enhance The Module

Cheers mate - I'll look forward to having a play when I get back in a week or so. Great news that you are still pushing forward with this though.

_________________
Online Dating

hqarrse's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Slackware/Apache 2.2.4/MySQL 5.0/PHP5.2/9.1.2.1
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Tue Mar 13, 2007 10:21 pm
Post subject: Re: Suggestions To Enhance The Module

Transition complete - as mentioned above, plus it now works off an extra field in the bbranks table, without any apparent conflicts with the existing ranks administration.

Also supporters can see their own data like proposed rank, donations, and last donation date - it does provide a plain red button if there is a rank disparity.

Non-supporter users just see basic PM, rank and date joined. Non-users just see rank and date joined, if they are allowed to view the module.

I'll package the new download, v9.1.2, later today.


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Wed Mar 14, 2007 6:48 am
Post subject: Re: Suggestions To Enhance The Module

v9.1.2 released Smile
nukebiz.com/Downloads/...id=55.html

_________________
DonationsPro for vBulletin, SMF, MyBB, DragonflyCMS


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
hqarrse
Director
Director

Offline Offline
Joined: Jan 08, 2006
Posts: 153

PostPosted: Thu Mar 15, 2007 3:44 pm
Post subject: Re: Suggestions To Enhance The Module (Supporters module)

Thanks Phoenix, I'll give this a go today.

_________________
Online Dating

hqarrse's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Slackware/Apache 2.2.4/MySQL 5.0/PHP5.2/9.1.2.1
Back to top
View user's profile Visit poster's website
hqarrse
Director
Director

Offline Offline
Joined: Jan 08, 2006
Posts: 153

PostPosted: Fri Mar 16, 2007 6:01 pm
Post subject: Re: Suggestions To Enhance The Module (Supporters module)

Phoenix - this is superb and straight away led me to an email problem where we'd missed Paypal's emails and therefore had a list of rank / donation mismatches, so very very useful right from the outset.

I do have a couple of anomalies though where the treasury module recognizes that a donation has been made, and this can be seen on the users profile page as well as in the treasury payment list, but he is not showing up in the supporters list.

I'm going to have to stop for a while now, but will try and work out what the difference is between his details and someone else who is showing up. Perhaps is user error too (I'm 'the other admin' so coming in a little blind on this).


hqarrse's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Slackware/Apache 2.2.4/MySQL 5.0/PHP5.2/9.1.2.1
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Sat Mar 17, 2007 2:01 am
Post subject: Re: Suggestions To Enhance The Module (Supporters module)

hmm, Supporters is generated by joining users table and treasury table on user_id, so it's most probable (especially from earlier versions where user_id wasn't used) that padbeat is missing his user_id in the _trans_trans table.

However, if you were to edit (without changing anything) padbeat's transactions, the table should update the missing user_id just from saving the transaction and padbeat should magically appear in Supporters Smile

Now that we have Supporters, we could (with an option to allow it) automatically update ranks when a donation is received, excepting those with special ranks not designated as supporter ranks e.g. mods, admins, etc. This still leaves Supporters as a quick check that all is okay.

It might also be helpful to have a link that permits manual adjustment of ranks for those special ones you have for mods etc.


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
hqarrse
Director
Director

Offline Offline
Joined: Jan 08, 2006
Posts: 153

PostPosted: Sat Mar 17, 2007 7:43 pm
Post subject: Re: Suggestions To Enhance The Module (Supporters module)

So to put this right do you see any problem with this:
Code::
<?php

//Basic report

$duffEntries = $db->sql_count($prefix."_treas_trans where user_id = '0' AND custom IS NOT NULL");
echo("There are $duffEntries entries in your treasury table where a user id is not defined and should be");

//Uncomment to go for it!
/*

echo("<br/>Running the update script<br />");

$sql = "SELECT t.id, u.user_id
	FROM ".$user_prefix."_users u
	JOIN ".$prefix."_treas_trans t
	ON u.username = t.custom
	WHERE t.user_id = '0' AND t.custom IS NOT NULL";

$result = $db->sql_query($sql);

if ($row = $db->sql_fetchrow($result))
{
	do
	{
		$sql = "update ".$prefix."_treas_trans set user_id = ".$row['user_id']." where id = ".$row['id'];
		$db->sql_query($sql);
	}
	while ( $row = $db->sql_fetchrow($result) );
}

$duffEntries = $db->sql_count($prefix."_treas_trans where user_id = '0' AND custom IS NOT NULL");
echo("There are $duffEntries entries in your treasury table where a user id is not defined and should be");
*/

?>


hqarrse's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Slackware/Apache 2.2.4/MySQL 5.0/PHP5.2/9.1.2.1


Last edited by hqarrse on Sat Mar 17, 2007 7:46 pm; edited 1 time in total
Back to top
View user's profile Visit poster's website
hqarrse
Director
Director

Offline Offline
Joined: Jan 08, 2006
Posts: 153

PostPosted: Sat Mar 17, 2007 7:45 pm
Post subject: Re: Suggestions To Enhance The Module (Supporters module)

An addition to try and sweep up some username changes and other oddities:

Code::
echo("<br/>Running EMail Address Comparison<br />");

$sql = "SELECT t.id, u.user_id
		FROM ".$user_prefix."_users u
		JOIN ".$prefix."_treas_trans t
		ON t.payer_email = u.user_email WHERE t.user_id = '0' AND length(u.user_email) > 4";

$result = $db->sql_query($sql);

if ($row = $db->sql_fetchrow($result))
{
	do
	{
		$sql = "update ".$prefix."_treas_trans set user_id = ".$row['user_id']." where id = ".$row['id'];
		$db->sql_query($sql);
	}
	while ( $row = $db->sql_fetchrow($result) );
}

$duffEntries = $db->sql_count($prefix."_treas_trans where user_id = '0' AND custom IS NOT NULL");
echo("There are $duffEntries entries in your treasury table where a user id is not defined and should be after email comparison");

Pretty simplistic but *seems* to have worked with a few exceptions, which !

Automatic idea would be very good for us with the comment you made about special ranks being left for manual control, and also no automatic 'demotion'.

I've just been toying with ideas for monitoring this automation - 'automatic change made' flag and so on, but I don't think anything like that is necessary, just an enable / disable option.


hqarrse's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Slackware/Apache 2.2.4/MySQL 5.0/PHP5.2/9.1.2.1
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Sun Mar 18, 2007 2:27 am
Post subject: Re: Suggestions To Enhance The Module (Supporters module)

hmm, you did have some oddities, but hardly surprising given the changes in treasury, plus my occasional screw-up, and the risk with manual additions (though that was tightened up recently). In theory, your remaining exceptions should only be genuine non-member donations.

Since we have a rank_value for special ranks used for supporters, it's a pretty easy check for zero value to ensure that non-supporter special ranks remain untouched.

I guess an extra field could be added to the _treas_trans table to signify a rank change occurred with that last donation. Simplest way to add the option will be to add it to the _config_custom table, and trigger it from Supporters admin since that is required for it to work.

One downside - if you do have an anomaly where a supporter has a higher rank than treasury indicates, it will reduce the rank. I do have such a scenario myself on one site.


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
hqarrse
Director
Director

Offline Offline
Joined: Jan 08, 2006
Posts: 153

PostPosted: Sun Mar 18, 2007 9:16 pm
Post subject: Re: Suggestions To Enhance The Module (Supporters module)

I hope I didn't offend by those posts - they were in no way meant as negative, just as a possible help and for you comment. The data in the table I was trying them on has had every generation of your module, fiddled with and broken by us at times in the past, and may have even been taken across from an older phpnuke one a few years ago (I can't remember), so some anomalies were inevitable!

_________________
Online Dating

hqarrse's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Slackware/Apache 2.2.4/MySQL 5.0/PHP5.2/9.1.2.1
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Mon Mar 19, 2007 1:07 am
Post subject: Re: Suggestions To Enhance The Module (Supporters module)

Laughing not much chance of offending me. Your feedback and suggestions have been most welcome.

Treasury was getting a little ho-hum until you started suggesting things Very Happy

As a matter of interest, what did you have left after running the queries?


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
BadCO
Director
Director

Offline Offline
Joined: Mar 20, 2007
Posts: 144

PostPosted: Tue Mar 20, 2007 9:44 pm
Post subject: Re: Suggestions To Enhance The Module (Supporters module)

Phoenix,
Just to clear up a bit of confusion ..... (hopefully) ....

I have been posting on here as hqarrse until the top of this page. From then on its been the other site admin. He also uses the handle hqarrse on the main Dragonfly site so we've decided that it would be easier for him to adopt it on here too.

My user on DF is BadCO so I've adopted the same one on here ..... hopefully all is clear now?

Now back on topic - the supporters module is looking excellent and definitely a big improvement for us. I gather that hqarrse's script revealed several hundred discrepancies but then we have been running variants of this module for at least 2-3 years. In fact it may even have crossed over when we transferred from phpnuke in 2004 .....

_________________
There can be only one

BadCO's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.4/5.0.37/5.2/9.1.2.1
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic    Reply to topic    Printer Friendly Page    Forum Index »  eCommerce » Treasury and Supporters
Page 2 of 3
All times are GMT + 9.5 Hours
Go to page Previous  1, 2, 3  Next



Jump to:  


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum