The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
List latest X paid subscribers on Forum Home Details »» | |||||||||||||||||||||||||||
List latest X paid subscribers on Forum Home
Developer Last Online: Nov 2023
There's also a vB 3.5 version here: https://vborg.vbsupport.ru/showthrea...threadid=99049
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. Demo: http://forum.lowcarber.org PHP edits: 1. 2 edits in index.php 2. 1 edit in includes/functions.php 3. 2 edits in includes/functions_subscriptions.php Template edits: 1. 1 new template: thanks 2. 1 edit in FORUMHOME Installation: 1. In index.php Find: PHP Code:
PHP Code:
PHP Code:
PHP Code:
At the end of the file, just before the end/footer stuff, Code:
/*======================================================================*\ || #################################################################### || # Downloaded: Thu Apr 15th 2004 || # CVS: $RCSfile: functions.php,v $ - $Revision: 1.967 $ || #################################################################### \*======================================================================*/ ?> PHP Code:
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: PHP Code:
3. In includes/functions_subscriptions.php Find: PHP Code:
PHP Code:
PHP Code:
PHP Code:
Leave the new template empty 5. Edit the FORUMHOME template Add $thanks where you want the list of members to appear. For example, I use this in the stats area of FORUMHOME: Code:
<div>Thanks latest <a href="subscriptions.php">contributing members</a>: $thanks</div> 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
|
Comments |
#22
|
||||
|
||||
Quote:
|
#23
|
||||
|
||||
Thanks assassingod and tamarian.
This is my code: Code:
// ###################### thankyou ####################### function thankyou(){ global $DB_site, $stylevar, $vboptions, $vbphrase; require_once('./global.php'); $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"); $latest_str = ""; while ($contributer = $DB_site->fetch_array($latestcontributers)) { eval ('$latest_str .= ", ' . fetch_template('thanksbit') . '";'); } $latest_str = substr($latest_str , 2); $latest_str = addslashes($latest_str); $DB_site->query("UPDATE " . TABLE_PREFIX . "template SET template=\"$latest_str\", template_un=\"$latest_str\" WHERE title='thanks'"); } Quote:
|
#24
|
|||
|
|||
Quote:
Give it another try (just step #2), and let's see how it goes. |
#25
|
||||
|
||||
Apparently, mysql still can't get it clear:
Quote:
|
#26
|
|||
|
|||
Quote:
PHP Code:
|
#27
|
||||
|
||||
That worked. Thanks a ton!
BTW I'm a big anti-carb person myself. |
#28
|
|||
|
|||
Quote:
|
#29
|
||||
|
||||
PHP v4.3.3
MySQL v4.0.18-standard |
#30
|
|||
|
|||
I'm getting these errors when editing subscription users
Quote:
I'd just like to know what it means, and if it'll affect anything on my board or subscriptions. nice hack though, btw. |
#31
|
||||
|
||||
Did you edit functions.php with dreamweaver by chance? If so it's one of a couple of vB3 files it will mess up by changing code on you.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|