News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Paid subscriptions

Started by Danallkins, March 31, 2014, 05:18:38 PM

Previous topic - Next topic

Danallkins

Hi all

I'm about to use the paid subscriptions on my forum and so I have a couple of questions

1.  Can I have a button to allow people to subscribe rather than going to profile action paid subscriptions etc?

2.  When I setup a test user to test the subscriptions I never received an email as a subscriber to confirm my subscription?
have I missed something?
I'm using version 2.0.7

Sir Osis of Liver

You can add a 'Subscribe' button to the main menu by adding following to the button array in /Sources/Subs.php -



'subscribe' => array(
'title' => 'Subscribe',
'href' => $scripturl . '?action=profile;area=subscriptions',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
),



It will take a member directly to the subscription page in their Profile.

Have you put something in the 'Email to Send upon Completion:' field in the subscription setup?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Danallkins

Thanks for that - my coding is very poor.

I have draft an email in that box using the  [FORUM] and [NAME] tags, but nothing is sent ?

Sir Osis of Liver

Actually, I believe that email is sent when subscription expires (and you have to use curly brackets - {NAME} {FORUM} ). Don't think forum sends a confirming email when subscription is activated, but it does send one to admins if notification is enabled.  Member receives a payment confirmation from PayPal.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Danallkins

Thanks, that makes sense 
.
How can I change the button name to 'Paid Membership' and not 'Subscriptions' ?  I changed your code to read:

'subscribe' => array(
      'title' => 'Paid Membership',
      'href' => $scripturl . '?action=profile;area=subscriptions',
      'show' => !$user_info['is_guest'],
      'sub_buttons' => array(
      ),
   ),

But I get an error when I view my forum?!?

Sir Osis of Liver

That should work.  Attach your Subs.php and I'll have a look.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters


Sir Osis of Liver

Attach the file to a post, so I can work with it directly.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Danallkins

sorry missed that bit.  attached now.. I hope.

Sir Osis of Liver

#9
-



‘membership’ => array(
'title' => Membership,
'href' => $scripturl . '?action=profile;area=subscriptions',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
),



Try this -



'subscribe' => array(
'title' => 'Membership',
'href' => $scripturl . '?action=profile;area=subscriptions',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
),



Make sure you're using a plain text editor to edit forum files (Notepad, Notepad++) or you'll get formatting codes inserted that you won't see and will bugger your code.  I use Wordpad, and save as "Text document".
   
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Danallkins

That didn't work for me.

This works

'membership' => array(
'title' => Membership,
'href' => $scripturl . '?action=profile;area=subscriptions',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
),


But I want to see Paid Membership on the menu bar, but when I replace 'title' => Paid Membership I get an error?!?

Illori

are you using word to edit the file? if so stop.

Danallkins

editing it direct on my server.  I'll download it to dreamweaver or some other coding package.

Danallkins

Sorted it... Thank you.. my server must of been putting in some formatting.  Thank you very much for your help.

Danallkins

Hi.. got another little problem....

I have tried to add a member manually to the subscriptions but every time I try to add them I get the message:

QuoteThis member is already subscribed to this subscription. Please edit their existing subscription.

But they do not have a subscription.  I have had to edited their profile to change their membergroup, but this means I will need to remember when their membership runs out.

Can anyone help?

Biology Forums

Quote from: Danallkins on April 02, 2014, 04:54:22 PM
editing it direct on my server.  I'll download it to dreamweaver or some other coding package.

Please download Notepad++ ... Dreamweaver, Frontpage, etc. will never do.

Sir Osis of Liver

Have seen that problem before, don't remember what causes it.  Believe you have to fix it in the database.  No time to chase it now, but will take a look when I'm on tonight.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

Ok, you have to look for that member's id_member in smf_log_subscribed, and delete that row.  Wouldn't have any idea how it got there, but should clear the problem, then you can manually subscribe the member.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Danallkins

Quote from: Krash. on April 23, 2014, 10:59:54 PM
Ok, you have to look for that member's id_member in smf_log_subscribed, and delete that row.  Wouldn't have any idea how it got there, but should clear the problem, then you can manually subscribe the member.

I've had a look at the members ID (taken from their forum url) and that id isn't in wmf_log_subscribed ??

Danallkins

just tired to add them again and it worked now. ?!?!!?

Thanks for your help

Dan

Advertisement: