Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Latest Paid Subscribers v1.1 Details »»
Latest Paid Subscribers v1.1
Version: 1.00, by paul41598 paul41598 is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 3.6.4 Rating:
Released: 10-09-2006 Last Update: 02-27-2007 Installs: 84
Uses Plugins Template Edits
 
No support by the author.

Latest Paid Subscribers v1.1 (LITE VER)

- This Hack Does Use The Usergroups Markup Color For A More Accurate Display Of Subscription Members!! This Hack Has It All!

Description:
This hack is fully functional and flexible allowing you to display the latest [x] subscribers on your forumhome! It also allows you to display a reminder/alert to your users who's subscriptions are expiring.

Features: (Lite Version)
  • Activate The System (Latest Paid Subscribers)
  • Select The Number Of Subscribers To Show On ForumHome

Features: (Premium Version Only)
  • Activate The System (Latest Paid Subscribers)
  • Select The Number Of Subscribers To Show On ForumHome
  • Display A Reminder/Alert Window To Warn Subscribers When Their Subscription Is Up
  • Select The Number Of Days Before That Reminder Shows
  • Never Show This Again For Reminder Alert!
  • Allow The Subscriber Info In The Title HoverOver Or Turn It Off
  • Select A Date Format For That HoverOver

Installation:
1.) 1 Template Edit
2.) 1 Product Upload
3.) Enjoy Release

Bug Fixes:
Allow Subscriber Info In HoverOver Never Worked - FIXED
Activate Latest Paid Subscribers Only Deactivated The Users, Not The Phrases Or Expiry Alert. - FIXED
SQL Bugs. - FIXED

Notes:
- Adds 1 extra query
- Premium Version Of Hacks Found Here

If you find any bugs, have comments, questions feel free to post them. I'll do my best to accomidate anything.
Disclaimer: Any modification to this hack, must get prior consent/authorization by me first.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 10-10-2006, 12:28 PM
steelerwatch steelerwatch is offline
 
Join Date: Jun 2002
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice - but could you work something up that recognizes recrurring contributors as well? This only displays brand new contributors.
Reply With Quote
  #3  
Old 10-10-2006, 02:22 PM
Distance's Avatar
Distance Distance is offline
 
Join Date: Jul 2006
Location: Boston, Uk
Posts: 725
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah true, its the whole

'special offer to new customers'

thing again
Reply With Quote
  #4  
Old 10-10-2006, 02:34 PM
paul41598's Avatar
paul41598 paul41598 is offline
 
Join Date: Jun 2004
Location: MI
Posts: 732
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

we'll see, maybe in th next version
Reply With Quote
  #5  
Old 10-10-2006, 03:48 PM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I HAD a strange error from vB 3.6.0...

Problem resolved as posted below
Reply With Quote
  #6  
Old 10-10-2006, 04:52 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow that is great!
Reply With Quote
  #7  
Old 10-10-2006, 07:04 PM
rmxs rmxs is offline
 
Join Date: Apr 2006
Posts: 419
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and works

thanks
Reply With Quote
  #8  
Old 10-10-2006, 08:15 PM
oberheimhaven's Avatar
oberheimhaven oberheimhaven is offline
 
Join Date: May 2006
Location: Daytona Beach FLA
Posts: 266
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

had huge sql error uninstalled!! Ouch
Reply With Quote
  #9  
Old 10-10-2006, 08:23 PM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, I got help from paul41598 on this but by changing the Latest Paid Subscribers pluggin to as follows this works 100% on my site (tested in 3.6.0. and 3.6.1.)


PHP Code:
// plugin by Paul41598

if ($vbulletin->options['latest_paid_subscribers_reminder_on'])
{    
if (
$vbulletin->userinfo['userid'] AND !$_COOKIE['lpscookie']) {
$alertdays $vbulletin->options['latest_paid_subscribers_warndays'];
$day1 = (TIMENOW + ($alertdays 86400));
$getexpirers $vbulletin->db->query_read("
SELECT subscriptionlog.userid, subscriptionlog.subscriptionid, subscription.subscriptionid, subscriptionlog.expirydate,
user.userid, user.username
FROM " 
TABLE_PREFIX "subscriptionlog AS subscriptionlog, " TABLE_PREFIX "subscription AS subscription
LEFT JOIN " 
TABLE_PREFIX "user AS user ON (subscriptionlog.userid = user.userid)
WHERE subscriptionlog.status != '0' AND subscriptionlog.subscriptionid = subscription.subscriptionid AND user.userid = "
.$vbulletin->userinfo['userid']." AND subscriptionlog.expirydate < $day1
ORDER BY subscriptionlog.expirydate ASC LIMIT 5"
);


    while(
$getexpirer $vbulletin->db->fetch_array($getexpirers))
    {
      
$expiryremaining round((($getexpirer['expirydate'] - TIMENOW)/86400),2);
    
$expirytitle $getexpirer['title'];
    
$expirydate vbdate('F jS, Y'$getexpirer['expirydate']);
    eval(
'$expiryalert .= "' fetch_template('expirydatebits') . '";');
    }
}
}

if (
$vbulletin->options['latest_paid_subscribers_on'])
{        
$show['subscribers'] = true;
$max $vbulletin->options['latest_paid_subscribers'];

$getsubscribers $vbulletin->db->query_read("
SELECT subscriptionlog.userid, subscriptionlog.status, subscriptionlog.regdate, subscriptionlog.expirydate,
user.userid, user.username, user.usergroupid, displaygroupid,
usergroup.usergroupid, usergroup.title,
groupa.opentag as opentaga, groupa.closetag as closetaga, 
groupb.opentag as opentagb, groupb.closetag as closetagb
FROM " 
TABLE_PREFIX "subscriptionlog AS subscriptionlog
LEFT JOIN " 
TABLE_PREFIX "user as user ON (subscriptionlog.userid = user.userid)
LEFT JOIN " 
TABLE_PREFIX "usergroup as usergroup ON(user.usergroupid = usergroup.usergroupid)
LEFT JOIN " 
TABLE_PREFIX "usergroup as groupa ON(user.usergroupid = groupa.usergroupid)
LEFT JOIN " 
TABLE_PREFIX "usergroup as groupb ON(user.displaygroupid = groupb.usergroupid)
WHERE subscriptionlog.status != '0' ORDER BY subscriptionlog.regdate DESC LIMIT 0, 
$max");


if (
$vbulletin->db->num_rows($getsubscribers) > 0)
{
    
$count 0;
    while(
$getsubscriber $vbulletin->db->fetch_array($getsubscribers))
    {
       
        
$getsubscriber['opentag'] = $getsubscriber['opentagb'] ? $getsubscriber['opentagb'] : $getsubscriber['opentaga'];
        
$getsubscriber['closetag'] = $getsubscriber['closetagb'] ? $getsubscriber['closetagb'] : $getsubscriber['closetaga'];

if (
$vbulletin->options['latest_paid_subscribers_dateselect'])
        {
        
$expireson vbdate($vbulletin->options['latest_paid_subscribers_dateselect'], $getsubscriber['expirydate']);
        }
else {
        
$expireson vbdate($vbulletin->options['dateformat'], $getsubscriber['expirydate']);
     }

if (
$vbulletin->options['latest_paid_subscribers_hoverover']) {
        
$subscribers[$count] .= "<a href=\"member.php?" $vbulletin->options[sessionurl] . "u=$getsubscriber[userid]\" title='$getsubscriber[username] Subscription Expires On: $expireson'>";
        
$subscribers[$count] .= $getsubscriber['opentag'].$getsubscriber['username'].$getsubscriber['closetag']."</a>";
        
$count++;
        }
    else {
        
$subscribers[$count] .= "<a href=\"member.php?" $vbulletin->options[sessionurl] . "u=$getsubscriber[userid]\" title='$getsubscriber[title]'>";
        
$subscribers[$count] .= $getsubscriber['opentag'].$getsubscriber['username'].$getsubscriber['closetag']."</a>";
        
$count++;
    }    

    }
    
    
$showsubscribers implode(", "$subscribers);
    unset(
$count$getsubscriber$max);
    @
mysql_free_result($getsubscribers);
}

The difference is in these TWO lines of code!

PHP Code:
LEFT JOIN " . TABLE_PREFIX . "user as user ON (subscriptionlog.userid user.userid
LEFT JOIN " . TABLE_PREFIX . "usergroup as usergroup ON(user.usergroupid usergroup.usergroupid
My site uses PHP 4.4.1. and MySQL 4.1.21 in case that helps debug this... but it works 100% with those two "As" terms included!

Oh yea, did you mean to have you help link in your hack go to Google (as opposed to here?)?
Reply With Quote
  #10  
Old 10-10-2006, 08:47 PM
jgommel's Avatar
jgommel jgommel is offline
 
Join Date: Jun 2005
Location: Ohio
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not sure if this a 3.6.2 issue, but I just intalled and now I'm getting database errors. If I deactivate the hack, I'm back to normal. I checked my Template edits... all there and correct according to the documentation.

Code:
Database error in vBulletin 3.6.2:

Invalid SQL:

SELECT subscriptionlog.userid, subscriptionlog.status, subscriptionlog.regdate, subscriptionlog.expirydate,
user.userid, user.username, user.usergroupid, displaygroupid,
usergroup.usergroupid, usergroup.title,
groupa.opentag as opentaga, groupa.closetag as closetaga, 
groupb.opentag as opentagb, groupb.closetag as closetagb
FROM vb_subscriptionlog AS subscriptionlog
LEFT JOIN vb_user ON (subscriptionlog.userid = user.userid)
LEFT JOIN vb_usergroup ON(user.usergroupid = usergroup.usergroupid)
LEFT JOIN vb_usergroup as groupa ON(user.usergroupid = groupa.usergroupid)
LEFT JOIN vb_usergroup as groupb ON(user.displaygroupid = groupb.usergroupid)
WHERE subscriptionlog.status != '0' ORDER BY subscriptionlog.regdate DESC LIMIT 0, 5;

MySQL Error  : Unknown table 'user' in field list
Error Number : 1109
Date         : Tuesday, October 10th 2006 @ 03:35:33 PM
Script       : http://www.website.com/vb/
Referrer     : http://www.website.com/index.php
IP Address   : xx.xx.xx.xx
Username     : xxxxxxxx
Classname    : vb_database
and

Code:
Database error in vBulletin 3.6.2:

Invalid SQL:

SELECT subscriptionlog.userid, subscriptionlog.status, subscriptionlog.regdate, subscriptionlog.expirydate,
user.userid, user.username, user.usergroupid, displaygroupid,
usergroup.usergroupid, usergroup.title,
groupa.opentag as opentaga, groupa.closetag as closetaga, 
groupb.opentag as opentagb, groupb.closetag as closetagb
FROM vb_subscriptionlog AS subscriptionlog
LEFT JOIN vb_user ON (subscriptionlog.userid = user.userid)
LEFT JOIN vb_usergroup ON(user.usergroupid = usergroup.usergroupid)
LEFT JOIN vb_usergroup as groupa ON(user.usergroupid = groupa.usergroupid)
LEFT JOIN vb_usergroup as groupb ON(user.displaygroupid = groupb.usergroupid)
WHERE subscriptionlog.status != '0' ORDER BY subscriptionlog.regdate DESC LIMIT 0, 5;

MySQL Error  : Unknown table 'user' in field list
Error Number : 1109
Date         : Tuesday, October 10th 2006 @ 03:36:30 PM
Script       : http://www.website.com/index.php
Referrer     : http://www.website.com/index.php
IP Address   : xx.xx.x.xx
Username     : xxxxxx
Classname    : vb_database
Site Stats:
Apache Server 1.3.37 (Unix)
PHP 4.4.4
MySQL 4.1.21
vBulletin 3.6.2
vBadvanced CMPS 2.2.0
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:59 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06095 seconds
  • Memory Usage 2,340KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete