Upgrades Questions

My WPMUDEV Premuim subscription payment just went though this week and I am already hard at work setting up the premium plugins I want to use. I got the upgrades plugin and I have a few questions about it.

1) I don’t have a worldpay account, I haven’t decided yet whether I even should get one or just only offer paypal. But in the mean time on the credits purchase page is there an easy way to have the worldpay buttons not be added unless its a payment option, such as a not avalible mode? Or would that require modifying the source?

2) I only want to offer upgrades for purchase for 12months to the user, but leave the 1month option for the admin when I am visitng a users upgrades page. Only rarely should an upgrade need to be for 1month, and that is only when I start the subscription for the user. Whats the best way to accomplish this?

3) I have some plugins I want to offer as upgrades that are designed for the plugins directory (Feedburner redirection and Google Analytics for now anyway) and I can’t seem to get them to workby moving them unmodified to the upgrade-plugins directory. So what would be easier modifying the plugin to work from upgrade-plugins or writing a script for upgrade-plugins that would activte the necessaey plugin in the plugins directory then deactivate it when it expires, keeping in mind I use plugin commander which comes with plugin activation and deactivation functions I can use to make that part easy. PC would disallow user control over the plugin thats associated with an upgrade and I could even modify my plugins page to even hide them from me so I don’t mess anything up by activating or deactivating it there.

Thanks so much.

  • GSU Blogs
    • New Recruit

    Ok I think I answered question 3 of mine,I looked at quota.php and I need tomodify the plugins to call upgrades_register_feature() then check if the upgrade is active then if so do it’s thing.

    Simple enough but one question on upgrades_register_feature():

    This line in quota.php (well one of them) looks like this

    upgrades_register_feature(‘ca6b47d19bac12356ba79dc49cfa1fb0’, ‘Quota Increase (50MB)’, ‘Increases the allowed upload space to 50MB. ‘:wink:;

    Now the first string, is that just a a unique string identifier that can be anything? or is it a hash or what is it?

    And then it looks like the second is the feature name, then the feature description right?

    Also, I am still looking for insight on the first two questions of my first post.

    Thanks again for your time and patients with me.

  • Andrew
    • Champion of Loops

    Hiya,

      1) is there an easy way to have the worldpay buttons not be added unless its a payment option

    Yep, just remove ‘upgrades_payment_module_worldpay.php’ from mu-plugins.

      2) Whats the best way to accomplish this?

    I’m afraid that’s not any option at the moment but it’s a good idea for the next version.

      Now the first string, is that just a a unique string identifier that can be anything? or is it a hash or what is it?

    It’s just a unique string. I use an md5 hash of the plugin name but you can use whatever you wish.

      And then it looks like the second is the feature name, then the feature description right?

    Exactly :slight_smile:

  • GSU Blogs
    • New Recruit

    Ah thanks for your help, that all sounds easy enough, I think I will look into manually removing the shorter subscriptions manually.

    Also one more quick thing, is there a way to give the site admin unlimited credits? If not it’s not a huge deal, I can just add more to my account though the admin interface but I do alot of premium upgrade subscription activating for users, as special promotions, ect.

  • Andrew
    • Champion of Loops
      Also one more quick thing, is there a way to give the site admin unlimited credits?

    Afraid not but you can give the site admin users as many credits as you wish. If you don’t want to have to deal with that then just find the row in the credits table for that user and set the credits to something like 9999999.

    Thanks,

    Andrew

  • GSU Blogs
    • New Recruit

    Well I did some hackery using is_site_admin() to bypass the check to see if you have enough credits, and the credit deduction for me. I also used that to give me all three length options but leaving just the 12 month option to the users. Then modified the table code to not display the credit cost for a 1 month or 3 month subscription.

    So I should be good now. Thanks so much for your help.

  • drmike
    • DEV MAN’s Mascot

    You could probably write a small plugin where if one of the site admins log in, have them check their credit account and, if it;’s not set to at least say 1000 credits, give them that many. That way you wouldn’t have to worry about dealing with manually editing it.

    There’s a previous thread here somewhere about the idea of giving folks just enough credits when they sign up to give them a chance to try some of the advanced features. The 1 month time period is good for that. Sort of a trial period. You have to watch it though as you’ll get folks creating fake accounts and transferring funds.

  • Qlof
    • The Crimson Coder

    Allright. As I suspected. Thank you for the info.

    I’ve been looking for a plugin to see how members are holding their quota up. Mainly to see if someone has too much on their account which would lead me to ask them to remove something or upgrade again. I tried Z-space but I don’t really think it did it for me as it seems to mainly be useful for the individual users. Do you have a suggestion? I’ll keep looking too tho. If I don’t find one I’ll probably try to make one myself. Shouldn’t be too hard. I’d just have to learn the basic plugin stuff as I haven’t done a plugin before =).

    Like a check to run. “Check member quotas” and it runs through every users quota, comparing quota with space usage and printing out the ones that are using “too much”.

  • Webmeister
    • Flash Drive

    OK, this plugin seems to be hindering the Upgrades-Advertising plugin from working properly and I get this message consistently when going from the homepage to any subpage:

    Fatal error: Call to undefined function upgrades_show_ads() in /home/hsaanet/public_html/wp-content/mu-plugins/upgrades-advertising.php on line 123

    I’ve checked and re-checked the exact FTP locations for the various files…the HOME folder is of course the public_html folder, right?

  • Webmeister
    • Flash Drive

    Thanks, but I’ve tried the / and /home directories and understand paths but still don’t get it working. Tried the paypal.php file in multiple places, that was the only thing I’m not sure about. Being a MU plugin it self-activates, can’t see it in plugins folder…. Puzzled.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.