What this hack does: This hack will list and instantly refresh (when a new subscription is made) a list of the latest X paid subscribers to your forum. It's a nice way of recognizing members who help pay the the forum bills, and encourages others to join.
// ###################### thankyou #######################
function thankyou(){
global $DB_site;
// This is the template for usernames
$thanksbit = ' <a href=\"member.php?$session[sessionurl]u=$contributer[userid]\"><font color=\"#228E8E\"><b>$contributer[username]</b></font></a>';
$latestcontributers = $DB_site->query("SELECT username, status,regdate, subscriptionlog.userid
FROM " . TABLE_PREFIX . "subscriptionlog AS subscriptionlog
LEFT JOIN " . TABLE_PREFIX . "user AS user
USING ( userid )
WHERE user.userid = subscriptionlog.userid
AND STATUS = '1'
ORDER BY regdate DESC
LIMIT 5");
Note 1: Change "LIMIT 5" to any number. By default, it will show the latest 5 paid subscribers. If you want to show the latest 3, simply change to "LIMIT 3". Note2 The template for usernames is in the code. To change the style and colour, edit this line from the code you added to functions.php:
6. First run To auto fill the list for the first time, you just need to edit an existing subscription, or just wait for the next subscription to arrive.
To auto fill it right now: Simply go to your admin control panel, click on subscriptions, view list, edit any existing subscription, for example, add 1 day to the subscription of a member, and save. You can re-edit to subtract the 1 day if you want.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Mine is linking each member but when you click on them it goes to a Page Not Found. How do I correct this? TIA!
Check the links themselse, and make sure this has the correct link to member.php. It might be due to a portal page? Is that where you're displaying the list?
You probably can display it on a different page, but a small mod may be required. The default is this:
This is what I see.
This is the link to one of the newest contributors
http://www.littlegreenphotographers.com/"member.php?u=424\" See "s? and the \?
Now if I click on a member that is online this is the link I get without the " and \ http://www.littlegreenphotographers....ember.php?u=71
This is what I see.
This is the link to one of the newest contributors
http://www.littlegreenphotographers.com/"member.php?u=424\" See "s? and the \?
Now if I click on a member that is online this is the link I get without the " and \ http://www.littlegreenphotographers....ember.php?u=71
you think that this is affecting it?
Double-check to make sure you have made the edits correctly. Also check in your vb options in the admincp, is the forum URL set correctly?
I see where the problem is.
First, it has the " and the \ in there but it is also not adding the \community\
in there.
I wouldn't of changed that at all, I just did the cut and pasting.
Is there a place to correct this?
I see where the problem is.
First, it has the " and the \ in there but it is also not adding the \community\
in there.
I wouldn't of changed that at all, I just did the cut and pasting.
Is there a place to correct this?
Yes, from the admin panel, for the forum URL setting. If for some reason (due to the portal for example), you do not want to add the /community/ portion to the forum URL, then you can try another modification, change the same line to: