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'.
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
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 SubscriptionGift (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.
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.
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.
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.
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?
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.