The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
paid subscription info
What's the paid subscription variable?
|
#2
|
|||
|
|||
What do you mean with "the paid subscription variable"?
|
#3
|
|||
|
|||
Hi Marco,
We have 4 different paid subscriptions: platinum, silver, gold, bronze and none are associated with any specific forums/usergroups/permissions as it is only used as a donation system. Since we have upgraded from vb 3.5.1 to 3.5.8, the current variable we were using to pull in the subscription description (an img) per user in the posts $post[sub_id] (associated level of paid subscription) and $post[active_sub] (which checked to see if the paid subscription was active) have stopped working... This is what the postbit looks like now (hint- the blank space on the right above the flag of the user's country): And this is what it's supposed to look like (with gold subscription icon on the right above the flag): I've been looking all over the vB db for how the paid subscriptions are associated with the user - can't find it anywhere... Thanks for your help! |
#4
|
|||
|
|||
I don't think $post[sub_id] and $post[active_sub] are default vB variables, they where most likely added by a modification you had on your 3.5.1 installation.
|
#5
|
|||
|
|||
hmmm well is there a variable or something I could use to pull the paid subscription info in the template then? I can't find it in the db - but it has to exist somewhere since I see it in the admin cp
There were many modifications to the 3.5.1 install, and mostly undocumented... trying to find them and document them as I go... --------------- Added [DATE]1219017788[/DATE] at [TIME]1219017788[/TIME] --------------- Ok, found it in the db - it's the subscriptionlog table - status field = 1 if user has a paid subscription, and subscriptionid is the type of paid subscription... now how to pull that in. I have a conditional statement in the postbit template: Code:
<if condition="$subscription['status'] == 1"> $vbphrase[paidsubscriptiontype] <else /> Free </if> --------------- Added [DATE]1219020711[/DATE] at [TIME]1219020711[/TIME] --------------- getting closer... found the hack in the old code. Previous developer did not document an added $posts query joining the subscriptionlog table info... |
#6
|
|||
|
|||
Strange - my replies were being merged with my post from the other day...
I found it in the db - it's the subscriptionlog table - subscriptionid is the type of paid subscription... anyone know how to grab this? It isn't $subscription[subscriptionid]... |
#7
|
||||
|
||||
If the subscribed user will be put into a usergroup specific to the subscription, you can just check their usergroup (X is the subscription usergroup):
Code:
<if condition="is_member_of($post, X)"> $vbphrase[paidsubscriptiontype] <else /> Free </if> |
#8
|
|||
|
|||
yeah there is no specific usergroup and/or permissions for the paid members... guess I could create that with no permissions though...
Thanks will try it out! |
#9
|
||||
|
||||
Yea, you could just create a holder usergroup, just set all permissions to "No" or "0". A "yes" will always override a "no".
|
#10
|
|||
|
|||
But how would the holder usergroup be able to tell if it's a gold, silver, bronze or platinum?
I tried doing this in the postbit template: Code:
<if condition="is_member_of($post, 28)"> <img src="http://www.wetcanvas.com/forums/images/sub/icon_bronze.gif" alt="Bronze Membership"> <else /> <if condition="is_member_of($post, 27)"> <img src="http://www.wetcanvas.com/forums/images/sub/icon_silver.gif" alt="Silver Membership"> <else /> <if condition="is_member_of($post, 26)"> <img src="http://www.wetcanvas.com/forums/images/sub/icon_gold.gif" alt="Gold Membership"> <else /> </if> </if> </if> I did put this hack back into showthread.php: Code:
$posts = $db->query_read("SELECT sublog.status AS active_sub,sub.subscriptionid as sub_id, post.*, post.username... Code:
... LEFT JOIN subscriptionlog AS sublog ON sublog.userid = user.userid AND sublog.status = 1LEFT JOIN subscription as sub ON sub.subscriptionid = sublog.subscriptionid |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|