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

Reply
 
Thread Tools
Pig's Subscription Gift Details »»
Pig's Subscription Gift
Version: 1.00, by boozehound boozehound is offline
Developer Last Online: Sep 2007 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 01-16-2006 Last Update: Never Installs: 58
Template Edits
 
No support by the author.

Description

Allows users to pay for a paid subscription for another user.
  • Five plugins
  • One new template
  • Three new phrases
  • Three template edits

Installation
  • Install the product XML through the product manager.
  • Edit template 'subscription' in 'Paid Subscriptions Templates'.

    Find:
    Code:
    <if condition="$show['activesubscriptions']">
    Insert before that, this code:
    Code:
    $giftbits
    Find:
    Code:
    <input type="hidden" name="do" value="order" />
    Insert after that, this code:
    Code:
    <if condition="$giftuser != null">
    <input type="hidden" name="gift" value="$giftuser[userid]" />
    </if>
  • This step may be altered according to taste. I chose to insert the link that userA would click to pay for userB into userB's profile, i.e. MEMBERINFO, but it could just as easily be put in 'postbit'. Anyway...

    Edit template 'MEMBERINFO' in 'Member Info Templates'.

    Find:
    Code:
    	<td class="vbmenu_control">
    		<if condition="$show['addbuddylist']">
    Add before that, this code:
    Code:
    	<td class="vbmenu_control">
            <a href="payments.php?$session[sessionurl]gift=true&userid=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[buy_x_a_sub]</phrase></a>
            </td>
And you're done.

Notes
  • Active subscriptions are never shown on the paid subscriptions page, either for the donor or the recipient, when visiting the paid subscriptions page through the gift subscription link.
  • The identity of the donor is not revealed to the recipient. An admin will have to check out the payment info if the recipient wants to know who gave them the subscription.

Screenshots
  • screen1.png: Member profile page containing link to subscription gift page
  • screen2.png: Subscription page showing that the user is about to pay for someone else

Supporters / CoAuthors

Show Your Support

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

Comments
  #22  
Old 03-09-2006, 01:03 AM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, I got this working with 3.5.4. Install the hack as it is, but make sure you do this:

DISABLE this plugin:
Hook Location : paidsub_order_paymentbit
Pig's Subscription Gift (4)

If you don't, the donation will still go to the donating member, not the other member. To be honest, I'm not sure why it's there in the first place as it removes the effect of the previous code.
Reply With Quote
  #23  
Old 03-13-2006, 05:20 PM
yayvb's Avatar
yayvb yayvb is offline
 
Join Date: Feb 2005
Location: CT
Posts: 192
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the fix, I just installed and didn't have to experience that.
Is there a certain if statement that we could surroud the memberinfo code to only show if the profile isn't already a subscriber? In other words if they are paying no need to have this link, but I'm not sure how.
Reply With Quote
  #24  
Old 03-16-2006, 08:58 PM
yayvb's Avatar
yayvb yayvb is offline
 
Join Date: Feb 2005
Location: CT
Posts: 192
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After installing this hack, I click on the link provided in a profile and I'm brought to where you select which subscription to buy. I select the one I want, hit submit, and it reloads the subscription page but with this error on the top:

Warning: Invalid argument supplied for foreach() in /includes/functions_user.php on line 50

If I try to buy a subscription by not going through the 'buy this person a subscription' link, then I don't get that error message and it appears to work correctly.

My script has been customized by an external coder so I was thinking that is what caused the error. However when I view an original file I see that not much in that file has changed and line 50 is the same either way.
This is line#50 on either:
Code:
foreach ($vbulletin->userinfo['forumpermissions'] AS $forumid => $perm)
Anyone have any idea what's causing this?

The only thing that I've done is what Erwin recommended above by disabling that particular plugin that he specified. I've done nothing else.
Reply With Quote
  #25  
Old 03-16-2006, 09:03 PM
yayvb's Avatar
yayvb yayvb is offline
 
Join Date: Feb 2005
Location: CT
Posts: 192
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I just for the hell of it re-enabled the plugin that Erwin said to disable and the error message went away. Now I'm wondering though, Erwin said the subscription goes to the buyer not the person it's intended for. I guess I could setup a paypal developer account and test this out but I haven't looked into that yet. haha

Has anyone else experienced the problem that Erwin was having? I am running 3.5.4 as well, but like I said re-enabling the plugin that Erwin said to disable got rid of the above error message.
Reply With Quote
  #26  
Old 03-23-2006, 12:28 AM
yayvb's Avatar
yayvb yayvb is offline
 
Join Date: Feb 2005
Location: CT
Posts: 192
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok I can't seem to test this out because I can't send my own paypal account money. Does this work for recurring, in other words if I want to pay for someone elses subscription and I choose a recurring one then my paypal account will be the one billed each month but each month the other person will get the credit right? Any more info on what Erwin was saying?
Reply With Quote
  #27  
Old 03-23-2006, 09:39 AM
flfooty tv flfooty tv is offline
 
Join Date: Oct 2005
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

awsome mod! love it
Reply With Quote
  #28  
Old 03-24-2006, 05:10 PM
tei727's Avatar
tei727 tei727 is offline
 
Join Date: Feb 2006
Posts: 162
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can anyone show this noob how to put this in postbit legacy?
Reply With Quote
  #29  
Old 03-26-2006, 05:28 AM
yayvb's Avatar
yayvb yayvb is offline
 
Join Date: Feb 2005
Location: CT
Posts: 192
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

btw this is such a cool hack. I am nervous since Erwin said to disable a plugin and doing so caused an error message. I am going to just trust the lack of problems reported and see what happens. Thanks again.
Reply With Quote
  #30  
Old 05-16-2006, 08:40 AM
Shaliza Shaliza is offline
 
Join Date: Apr 2006
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Seems like this is another abandoned hack.
Reply With Quote
  #31  
Old 05-22-2006, 10:24 PM
TRR TRR is offline
 
Join Date: Jan 2005
Location: San Antonio, TX
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't get it to work in postbit. It drops the userID:

"invalid userID specified"

When I disable the plugin, it follows the link to paid subscriptions, but I don't think that it is paying for another user...
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 01:50 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07088 seconds
  • Memory Usage 2,310KB
  • Queries Executed 26 (?)
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
  • (7)bbcode_code
  • (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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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