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 |
#2
|
|||
|
|||
This looks great! any way to make it work with vbportal?
|
#3
|
|||
|
|||
Quote:
Let's see if any vbportal expert can suggest the right template edits. |
#4
|
|||
|
|||
the top of the template says Warning: Invalid argument supplied for foreach() in /web/forums/includes/functions.php on line 2871
|
#5
|
|||
|
|||
Quote:
|
#6
|
|||
|
|||
this is line 2871 in my functions.php
// ###################### Start bits2array ####################### // takes a bitfield and the array describing the resulting fields function convert_bits_to_array(&$bitfield, $_FIELDNAMES) { $bitfield = intval($bitfield); $arry = array(); foreach ($_FIELDNAMES AS $field => $bitvalue) { if ($bitfield & $bitvalue) { $arry["$field"] = 1; } else { $arry["$field"] = 0; } } return $arry; } and I added the thank you code right above the end of the file, here: // ###################### thankyou ####################### function thankyou(){ global $DB_site, $stylevar, $vboptions, $vbphrase; require_once('./global.php'); $latestcontributers = $DB_site->query("SELECT username, 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 10"); $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'"); } /*================================================= =====================*\ || ################################################## ################## || # Downloaded: 18:53, Tue Apr 27th 2004 || # CVS: $RCSfile: functions.php,v $ - $Revision: 1.967 $ || ################################################## ################## \*================================================ ======================*/ ?> I couldnt post the whole file, it was too big |
#7
|
|||
|
|||
This is strange, as that portion of the code is not related.
Try this: remove the thankyou stuff from the bottom of functions.php (and from functions_subscriptions.php), and see if this still keeps happening. It might be totally unrelated. |
#8
|
|||
|
|||
Great hack! *install*
|
#9
|
||||
|
||||
I'd really like to use this but I use a third party script for subscriptions that moves users in and out of a specified usergroup. Is there a way this could query a usergroup ID instead of the subscription logs?
|
#10
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|