Advertisement:

Author Topic: Paid Subscriptions  (Read 346649 times)

Offline Paracelsus

  • Sr. Member
  • ****
  • Posts: 876
  • Gender: Male
Re: Paid Subscriptions
« Reply #880 on: January 25, 2010, 06:10:27 AM »
You don't need this if you're using 2.0 right?
it's a standard feature in smf 2.0 and have more options, like sending a PM before X days end of subscription

Does anyone know how to implement the PM functionality on this MOD? It shouldn't be too hard since smf 2.0 subscription feature is an improved version of this MOD.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,222
    • StoryBB/StoryBB on GitHub
Re: Paid Subscriptions
« Reply #881 on: January 25, 2010, 02:12:43 PM »
The PM functionality also relies on the scheduled tasks feature of 2.0...
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline vipmoney

  • Jr. Member
  • **
  • Posts: 102
  • Gender: Male
    • ClubeInvest.com
Re: Paid Subscriptions
« Reply #882 on: January 25, 2010, 09:08:53 PM »
Is it simple to upgrade from 1.1.11 to 2.0 having already this mod installed?

I mean, having hundreds of subscribers already inside this mod, it would be a problem to migrate and mantain all these subscriptions working with no trouble?

thanks for any feedback ;)
VipMoney

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,222
    • StoryBB/StoryBB on GitHub
Re: Paid Subscriptions
« Reply #883 on: January 25, 2010, 09:27:03 PM »
I believe the subscriptions should just drop into the 2.0 system since AFAIK the same person who wrote the mod was the one who added the feature to 2.0...
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

joehark

  • Guest
Re: Paid Subscriptions
« Reply #884 on: January 26, 2010, 06:55:50 AM »
Trying to install on 1.1.x

instruction says go to PP > Profile > IPN > Merchant Tools
Here's what is on that page. Note that the words IPN and Merchant Tools do not appear anywhere.  So, what is wrong here? Am i on the wong page or are these directions out of date?

Account Information

    * Email
    * Street Address
    * Phones and Mobile Payments
    * Password
    * Notifications
    * Language Preference
    * Time Zone
    * Manage User
    * API Access
    * PayPal Security Key
    * Getting Started Steps
    * Business Information
    * Close Account
    * Identification Preference

Financial Information

    * Credit/Debit Cards
    * Bank Accounts
    * Currency Balances
    * Money Market Fund
    * PayPal Debit Card
    * PayPal Plug-In
    * Balance Manager
    * Gifts and Discounts
    * Recurring Payments
    * Monthly Account Statements
    * Pay List
    * Preapproved Payments

Selling Preferences

    * Auctions
    * Sales Tax
    * Set Up Shipping Calculations
    * Shipping Preferences
    * My Saved Buttons
    * Payment Receiving Preferences
    * Instant Payment Notification Preferences
    * PayPal Shops
    * Reputation
    * Customer Service Message
    * Website Payment Preferences
    * Encrypted Payment Settings
    * Custom Payment Pages
    * Invoice Templates
    * Language Encoding



« Last Edit: January 28, 2010, 06:58:48 AM by joehark »

Offline WhiteEagle

  • Jr. Member
  • **
  • Posts: 113
  • Gender: Male
  • Writer at Large
    • nathanpinno on Facebook
    • nathanpinno on LinkedIn
    • @whiteeagle2008 on Twitter
    • Leet Link
Re: Paid Subscriptions
« Reply #885 on: February 07, 2010, 02:00:45 PM »
You don't need this if you're using 2.0 right?
it's a standard feature in smf 2.0 and have more options, like sending a PM before X days end of subscription

Too bad some of the other mods I use don't support 2.0 RC2 yet, or I'd have my sites running it!
I fold for team 52482. Do you Fold@Home?
SMF powered sites: Leet Link LeetSpace.com

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,222
    • StoryBB/StoryBB on GitHub
Re: Paid Subscriptions
« Reply #886 on: March 07, 2010, 05:29:32 PM »
index.template.php by the looks of things.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Viresh12

  • Newbie
  • *
  • Posts: 3
Re: Paid Subscriptions
« Reply #887 on: March 09, 2010, 01:21:28 AM »
Even i suggest the same think the package you tried to upload either is not a valid package or has become corrupted,,,

Offline Paracelsus

  • Sr. Member
  • ****
  • Posts: 876
  • Gender: Male
Re: Paid Subscriptions
« Reply #888 on: March 09, 2010, 02:46:34 AM »
index.template.php by the looks of things.

O.k., here's what I've got in index.template.php. 

Code: [Select]
// If the user is a guest, also show [register] button.
   if ($context['user']['is_guest'])
   echo '<li', $current_action == 'register' ? ' id="active"' : '', '><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';

        // If the user is a guest, also show [subscribe] button.
   if ($context['user']['is_guest'])
   echo '<li', $current_action == 'subscribe' ? ' id="active"' : '', '><a href="', $scripturl, '?action=profile, u=', $ID_MEMBER, 'sa=subscriptions">' , $txt[subscribe] , '</a></li>';

I'm using the Sonbahar theme, and I tried to use the code for the register button as well as the code I quoted in reply 887 to try to figure out what to put in there.  I substituted "subscribe" for every instance of "donation".  I added
Code: [Select]
$modSettings; to
Code: [Select]
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt,

because it wasn't in there to begin with, and then I just pasted
Code: [Select]
global $ID_MEMBER; after it.

I've now got the subscribe button on my page:

http://www.creekflows.com/forum/index.php

but it doesn't go anywhere.  The few times I was able to get it to point somewhere (and I'm not really sure how I did that) it just gave me an error stating the user profile I was trying to view didn't exist.  Eventually I want to remove the register button and only allow guests to subscribe, but I really don't know what I'm doing.  Could someone help me out?

Thank you.

You seem to have screwed things up. This link construction is wrong:

Code: [Select]
   echo '<li', $current_action == 'subscribe' ? ' id="active"' : '', '><a href="', $scripturl, '?action=profile, u=', $ID_MEMBER, 'sa=subscriptions">' , $txt[subscribe] , '</a></li>';
Try to go as a guest and click in the Subscribe button on your forum and then look at the url bar to see what link you get. ???


I don't get why do you put this either:
Code: [Select]
        // If the user is a guest, also show [subscribe] button.
   if ($context['user']['is_guest'])

And then you have an $ID_MEMBER string after... guest are not members, so the profile (u=', $ID_MEMBER, ') will always be zero. So I think you messed up this part. If people subscribe they have to be members, there's no way several guests can subscribe something.


Offline szinski

  • Jr. Member
  • **
  • Posts: 112
  • Gender: Male
  • Programmer by day, photographer by night.
    • Pizza Making
Re: Paid Subscriptions
« Reply #889 on: March 09, 2010, 08:55:33 AM »
Does anyone know how to implement the PM functionality on this MOD? It shouldn't be too hard since smf 2.0 subscription feature is an improved version of this MOD.

Ok, I hacked this together last night.

This mod will warn people two weeks before one of their subscriptions expires. Just replace the "autoCheckSubscriptions()" function (in Sources/ManagePaid.php) with this one. You will also want to edit the $txt[paid_reminder_body] text in Themes/default/languages/ManagePaid.english.php to set the notification the way you want it to be.

I tested this on my forum and it works like a charm.

Code: [Select]
// Function called to clean up expired subscriptions.
function autoCheckSubscriptions()
{
    global $db_prefix, $sourcedir, $txt;

    // Set notification time to be two weeks before subscription expires.
    // Expressed in seconds, so 14 days * 24 hours * 60 mins * 60 secs.
    $expire_time = time() + (14 * 24 * 60 * 60);

    // Select all subscriptions that are due to expire.
    $request = db_query("
        SELECT ID_SUBLOG, ID_SUBSCRIBE, ID_MEMBER
        FROM {$db_prefix}log_subscribed
        WHERE status = 2
        AND reminder_sent = 0
        AND endTime < $expire_time", __FILE__, __LINE__);

    // Step through each row and send a notification to each user.
    while ($row = mysql_fetch_assoc($request))
    {
        // Update "reminder_sent" flag that so we only remind them once.
        db_query("
            UPDATE {$db_prefix}log_subscribed
            SET reminder_sent = 1
            WHERE ID_SUBLOG = " . $row['ID_SUBLOG']);

        // Grab the user's name and e-mail address.
        $request2 = db_query("
            SELECT ID_MEMBER, realName, memberName, emailAddress
            FROM {$db_prefix}members
            WHERE ID_MEMBER = " . $row['ID_MEMBER'] . "
            LIMIT 1", __FILE__, __LINE__);
       
        $row2 = mysql_fetch_assoc($request2);
        mysql_free_result($request2);
       
        require_once($sourcedir . '/Subs-Post.php');

        // Send the subscription expiration warning via e-mail.
        sendmail($row2['emailAddress'], $txt['paid_reminder_subject'],
            sprintf($txt['sendtopic_dear'], $row2['realName']) . "\n\n" .
            "$txt[paid_reminder_body]\n\n" .
            $txt[130]);
    }
    mysql_free_result($request);
   
    // Find all the ones to remove.
    $request = db_query("
        SELECT ID_SUBSCRIBE, ID_MEMBER
        FROM {$db_prefix}log_subscribed
        WHERE status = 2
        AND endTime < " . time(), __FILE__, __LINE__);

    while ($row = mysql_fetch_assoc($request))
        removeSubscription($row['ID_SUBSCRIBE'], $row['ID_MEMBER']);
    mysql_free_result($request);

    // Store the next expire time.
    updateNextCheck();
}
« Last Edit: March 09, 2010, 04:38:30 PM by szinski »

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,222
    • StoryBB/StoryBB on GitHub
Re: Paid Subscriptions
« Reply #890 on: March 09, 2010, 02:22:04 PM »
Does the subscription feature in 2.0 also require that guests register before they can purchase a subscription?

Yes. But you don't have to actually open any boards to them, you could hide all boards, have them only accessible to a 'donator' group or similar, and have the paid subscription move them to that group on payment.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Paracelsus

  • Sr. Member
  • ****
  • Posts: 876
  • Gender: Male
Re: Paid Subscriptions
« Reply #891 on: March 09, 2010, 04:16:21 PM »
Does anyone know how to implement the PM functionality on this MOD? It shouldn't be too hard since smf 2.0 subscription feature is an improved version of this MOD.

Ok, I hacked this together last night.

This mod will warn people two weeks before one of their subscriptions expires. Just replace the "autoCheckSubscriptions()" function (in Sources/ManagePaid.php) with this one. You will also want to edit the $txt[paid_member_body] text in Themes/default/languages/ManagePaid.english.php to set the notification the way you want it to be.

I tested this on my forum and it works like a charm.

Code: [Select]
// Function called to clean up expired subscriptions.
function autoCheckSubscriptions()
{
    global $db_prefix, $sourcedir, $txt;

    // Set notification time to be two weeks before subscription expires.
    // Expressed in seconds, so 14 days * 24 hours * 60 mins * 60 secs.
    $expire_time = time() + (14 * 24 * 60 * 60);

    // Select all subscriptions that are due to expire.
    $request = db_query("
        SELECT ID_SUBLOG, ID_SUBSCRIBE, ID_MEMBER
        FROM {$db_prefix}log_subscribed
        WHERE status = 2
        AND reminder_sent = 0
        AND endTime < $expire_time", __FILE__, __LINE__);

    // Step through each row and send a notification to each user.
    while ($row = mysql_fetch_assoc($request))
    {
        // Update "reminder_sent" flag that so we only remind them once.
        db_query("
            UPDATE {$db_prefix}log_subscribed
            SET reminder_sent = 1
            WHERE ID_SUBLOG = " . $row['ID_SUBLOG']);

        // Grab the user's name and e-mail address.
        $request2 = db_query("
            SELECT ID_MEMBER, realName, memberName, emailAddress
            FROM {$db_prefix}members
            WHERE ID_MEMBER = " . $row['ID_MEMBER'] . "
            LIMIT 1", __FILE__, __LINE__);
       
        $row2 = mysql_fetch_assoc($request2);
        mysql_free_result($request2);
       
        require_once($sourcedir . '/Subs-Post.php');

        // Send the subscription expiration warning via e-mail.
        sendmail($row2['emailAddress'], $txt['paid_reminder_subject'],
            sprintf($txt['sendtopic_dear'], $row2['realName']) . "\n\n" .
            "$txt[paid_reminder_body]\n\n" .
            $txt[130]);
    }
    mysql_free_result($request);
   
    // Find all the ones to remove.
    $request = db_query("
        SELECT ID_SUBSCRIBE, ID_MEMBER
        FROM {$db_prefix}log_subscribed
        WHERE status = 2
        AND endTime < " . time(), __FILE__, __LINE__);

    while ($row = mysql_fetch_assoc($request))
        removeSubscription($row['ID_SUBSCRIBE'], $row['ID_MEMBER']);
    mysql_free_result($request);

    // Store the next expire time.
    updateNextCheck();
}

I'll try it out. I think I will add something more beside $txt[paid_reminder_body], since in the language file there is also $txt[paid_reminder_name], $txt[paid_reminder_date] and one more. I'll let you know later if it works. ;)

Offline sattninja

  • Sr. Member
  • ****
  • Posts: 701
    • Appfuzion.com
Re: Paid Subscriptions
« Reply #892 on: March 21, 2010, 05:59:26 PM »
hi i have this installed on RC2 and think i have set everything up right however when  i get to the point of logging into paypal to pay for the subscription i get this

Code: [Select]
The link you have used to enter the PayPal system is invalid. Please review the link and try again.
i have used the link provided in the mod settings like i said everything works till then
Running Rc4

Offline kizer

  • Jr. Member
  • **
  • Posts: 383
  • Gender: Male
    • Links4Jeeps.com
Re: Paid Subscriptions
« Reply #893 on: March 23, 2010, 04:46:22 PM »
This isn't needed since Subscription is part of the 2.0 release. Check under core and its listed there.
Own a Jeep? Links4Jeeps.com

Offline sattninja

  • Sr. Member
  • ****
  • Posts: 701
    • Appfuzion.com
Re: Paid Subscriptions
« Reply #894 on: March 23, 2010, 04:52:18 PM »
wow you are correct as a matter of fact that is what i am using wow what a blonde moment ok but my ??? still stands cause it is the core one that is doing it however i got it to work with a different paypal acct i think it has something to do with the paypal acct not being verified it doesn't seem to work on accts that are not verified can anyone confirm this?
Running Rc4

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,222
    • StoryBB/StoryBB on GitHub
Re: Paid Subscriptions
« Reply #895 on: March 23, 2010, 04:54:57 PM »
That's not an SMF issue but a PayPal one. Get the account verified and it should work.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline dumpster1979

  • Newbie
  • *
  • Posts: 8
Re: Paid Subscriptions
« Reply #896 on: March 29, 2010, 09:45:29 PM »
shary2007:[/b] paste this into your "Modifications.english.php" (or whatever language you use)

Code: [Select]
// Paid Subscriptions Mod
$txt['paid_subscriptions'] = 'Paid Subscriptions';
$txt['subscriptions'] = 'Subscriptions';
$txt['subscription'] = 'Subscription';
$txt['paid_subs_desc'] = 'Below is a list of all the subscriptions which are available on this forum.';
$txt['paid_subs_none'] = 'There are currently no paid subscriptions available!';

$txt['paid_current'] = 'Existing Subscriptions';

// Some errors for subscription mod.
$txt['paypal_could_not_connect'] = 'Could not connect to paypal server';
$txt['paypal_unverified_subject'] = 'Unverified Paypal Transaction';
$txt['paypal_unverified_body'] = 'A user attempted to add a paid subscription to your forum, but the transaction was unverified.';
$txt['paid_sub_not_active'] = 'That subscription is not taking any new users!';
$txt['paid_disabled'] = 'Paid subscriptions are currently disabled!';
$txt['worldpay_password_wrong'] = 'Payment ignored as WorldPay password is incorrect - please ensure you have the correct callback password set.';
$txt['2co_password_wrong'] = 'Payment ignored as 2co.com secret word is incorrect - please ensure you have the correct secret word and 2co.com ID set.';
$txt['paid_unknown_transaction_type'] = 'Unknown transaction type in ipn.php';
$txt['paid_missing_transaction_type'] = 'Cannot find transaction file %s.php';
$txt['paid_empty_member'] = 'Paid subscription handler could not recover member ID';
$txt['paid_could_not_find_member'] = 'Paid subscription handler could not find member with ID: %d';
$txt['paid_count_not_find_subscription'] = 'Paid subscription handler could not find subscription for member ID: %1$s, subscription ID: %2$s';
$txt['nochex_could_not_connect'] = 'Could not connect to nochex server';
$txt['nochex_unauthorised_subject'] = 'Unauthorised nochex Transaction';
$txt['nochex_unauthorised_body'] = 'A user attempted to add a paid subscription to your forum, but the transaction was rejected.';
[/quote]


the same thang is happening to me just like shary2007 and i dont no ware Modifications.english.php to past this code

Offline gibsongk55

  • Semi-Newbie
  • *
  • Posts: 53
Re: Paid Subscriptions
« Reply #897 on: May 09, 2010, 10:36:17 PM »
Hi,

Is there any plan to update this mod to work on SMF 1.1.11 ?

Or will this mod install with this version?  I never used this mod before and just found it.  This is what I've been looking for.  I'd appreciate a response.

Thanks,

Gibs

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,222
    • StoryBB/StoryBB on GitHub
Re: Paid Subscriptions
« Reply #898 on: May 10, 2010, 05:47:31 AM »
Most 1.1.x mods install on any 1.1.x version, give it a try.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline gibsongk55

  • Semi-Newbie
  • *
  • Posts: 53
install error
« Reply #899 on: May 10, 2010, 12:38:22 PM »
Hi,

I am trying to install the package.  I am using SMF 1.1.11 and I get this install error.

Fatal error: require() [function.require]: Failed opening required   /Packages/temp/subscription/paidsubsdb.php   (include_path='.:/usr/lib64/php') in /Sources/Packages.php  on line 556

Thanks for any help.

Gibs
« Last Edit: May 13, 2010, 12:39:35 AM by gibsongk55 »