Pay to post / buy credits to post

0

Hello newbie here, proud to join you all. Gush over, I have a question…

I am stuck somewhere [hopeless me] between Pay to Blog and Upgrades! I am trying to achieve a:

“buy ‘credits’ [via PayPal] that allow you to post, one credit = one post”…

Site Admin functions allow setting of price per credit with ‘bundle’ discounts – e.g. 1 post = $99, 3 posts = $249, etc… also need to set specific pricing per individual blog in my Mu installation.

I doubt it’s out there all beautifully giftwrapped for me but if anyone has a direction they’d like to prod me in, I would be so grateful.

Also I don’t really know the etiquette of commissioning/where to start (best place) to get this built if there’s nothing similar I could play about with.

Was hoping for something nearer my needs in Premium plugins but typical me, I’m not a Pay to Blog or Upgrades kinda gal!!

Wishing you all a great weekend.

Jilly

  • Andrew
    • Champion of Loops

    Hiya,

    I’m afraid we don’t have anything that would work for this one. However, what I would do is have a credit debited each time they publish a post. If they hist the post page and have no credits they get directed to the credits page. Also, if for some reason they run out of credits while trying to publish a post then it should get saved as a draft and then the user redirected to the credits page.

    I think the hook you’ll want to use for this one is the save_post hook (or filter – I can’t remember which it is).

    Thanks,

    Andrew

  • TonyV
    • Site Builder, Child of Zeus

    Hi Andrew,

    I noticed you mentioned on the wordpress blog “The next version of the Pay to Blog plugin will allow for subscription payments.” this would be for paypal subscription.

    I was wondering if you could give an estimation as to how far out this might be? Only wanting to know so I can decide whether I need to wait, or set something else up.

    What I really need is the subscription to be set up on the signup page as mandatory. any chance of this? or maybe you know of a way I can do this?

    Thanks.

    Tony V

  • Andrew
    • Champion of Loops

    Hi Tony,

    I’ll try to get the Pay to Blog plugin updated with the subscription feature next week.

    What I really need is the subscription to be set up on the signup page as mandatory. any chance of this?

    I looked at this when coding the plugin but I just couldn’t find a suitable way to handle the PayPal bit on the signup form. So I’m afraid this isn’t something we’ll be adding in the near future.

    Thanks,

    Andrew

  • TonyV
    • Site Builder, Child of Zeus

    Thanks Andrew,

    Isn’t the sign up process a two page process?

    if yes, why not make the paypal subscription on the first page, and set up the second page so that the only way for anyone to get to it is if they complete the subscription option. I realize that we(each owner of the domain) would then have to include this second page in the paypal set up. At paypal, we list the page to send the subscriber to on a successful completion as well as a page to send to if cancel.

    I know that people could just go directly to the second page, but that would then have them missing the first page info needed to complete the signup process.

    if the link back from paypal is important, maybe it could have the url variable included from the sign up process. for example http://yourblogname.com/php?id=result or something

    then on paypal side, our link might be http://yourblogname.com/php?id=blogname

    more a thinker than a programmer, but, maybe something I said?

    Thanks.

    Tony V

  • TonyV
    • Site Builder, Child of Zeus

    Thank you very much Andrew and James, for taking the time to look into this. I am thinking that I might be able to make what I want to do work with the subscription sign up for paypal being in the admin after all. So I am very much looking forward to next week Andrew? Is there any way I can get a heads up when you get it done? or will I need to just pop in here or else where now and then?

    Thanks again for your time.

    Tony V

  • TonyV
    • Site Builder, Child of Zeus

    Andrew, thanks.

    so far looks great.

    a couple of questions though.

    any chance changing the amount options for subscription payments is an easy task? currently in the drop down you have 1-300 for 1 month 3 month or 12 month options as whole numbers. I am wanting to charge $5.50 per month for example… would this be easy for me to change?

    also, can you tell me how I can control the landing page for a successful subscription? I would like to create a page with more info on it, as well as add a cookie tracker of sorts. I plan on rewarding referrals and will be tracking this with an affiliate script.

    and thanks for updating the pay to blog plugin so quick.

    Tony V

  • Andrew
    • Champion of Loops

    Hiya,

    any chance changing the amount options for subscription payments is an easy task? currently in the drop down you have 1-300 for 1 month 3 month or 12 month options as whole numbers. I am wanting to charge $5.50 per month for example… would this be easy for me to change?

    It’s not super complicated to add but I won’t be updating this plugin for a while unless there’s a bug. So for now you’ll need to modify the drop down. Just add in whatever values you want (‘5.50’, etc).

    also, can you tell me how I can control the landing page for a successful subscription? I would like to create a page with more info on it, as well as add a cookie tracker of sorts. I plan on rewarding referrals and will be tracking this with an affiliate script.

    This will need to be a hack as well. Look at lines 118-119 and 144-145.

    Thanks,

    Andrew

  • TonyV
    • Site Builder, Child of Zeus

    Thanks Andrew,

    actually I should have mentioned that I was willing to hack if needs be, but I was not able to find which line the drop down is in?

    I saw line 118 and 119 for the return urls,

    118 is this;

    <input type="hidden" name="return" value="' . $blog_url . 'wp-admin/blog.php?updated=true&updatedmsg=' . urlencode(__('Transaction Complete!')) . '">

    I was thinking that blog.php?updated=true etc may have more of a function with the process?

    where ‘Transaction Complete!’ can I edit this and add a link maybe to the page I was referring to that I wanted to create? for example maybe, ‘Transaction Complete! blah blah, <a href="http://myblog.com">click here for more info.</a>

    would this work?

    Sorry, as I mentioned I am more a thinker then I am a programmer.

    Thanks for your time.

    Tony V

  • Andrew
    • Champion of Loops

    Hiya,

    but I was not able to find which line the drop down is in?

    Lines 267-284

    Just toss something like this:

    <option value="5.50" <?php if ($pay_to_blog_1_cost == '5.50') echo 'selected="selected"'; ?>>5.50</option>

    In before this:

    </select>

    You’ll meed to adjust this for the 3 and 12 month dropdowns.

    I was thinking that blog.php?updated=true etc may have more of a function with the process?

    Nope. You can completely change those form values to whatever you want. Ex:

    <input type="hidden" name="return" value="http://domain.tld/some-page/">

    Thanks,

    Andrew

  • TonyV
    • Site Builder, Child of Zeus

    Andrew,

    just logged into an existing account and I get this error in the header

    Warning: Cannot modify header information – headers already sent by (output started at /home/ismyblog/public_html/wp-admin/admin-header.php:17) in /home/ismyblog/public_html/wp-includes/pluggable.php on line 856

    the only menu options I have is Blog Account and Log out

    but I do see all the main content info in the dashboard.

    Tony V

  • TonyV
    • Site Builder, Child of Zeus

    Thanks Andrew,

    it may be fixed.

    now when I login to the existing account it goes right to the payment option page, showing blog inactive. I take it, this is to force a payment option? and once they pay, everything becomes active?

    if this is true,,, if they stop paying subscription or any paypal payment, the account locks up again?

    question.

    is there a way I can bypass this for selective accounts? without having to pay the paypal subscription, or payments?

    for example I am thinking of offering a free blog with ads.

    and, I have an account I gave to my son, for example that I would like him to have without ads on it, and not have to pay paypal….

    Thanks for taking the time to answer my questions.

    Tony V

  • Andrew
    • Champion of Loops

    Hiya,

    I take it, this is to force a payment option? and once they pay, everything becomes active?

    if this is true,,, if they stop paying subscription or any paypal payment, the account locks up again?

    That would be correct.

    is there a way I can bypass this for selective accounts? without having to pay the paypal subscription, or payments?

    You can extend blogs from the site admin page.

    Thanks,

    Andrew

  • TonyV
    • Site Builder, Child of Zeus

    That’s right, I forgot I did see the extension option.

    Thank you!

    everything you helped me with today solves the last bit of what I needed to launch (I think, lol) will find out soon enough.

    I really do appriciate all the time you have given me.

    Tony V

  • TonyV
    • Site Builder, Child of Zeus

    not sure if this is a big deal or not, certainly not an emergency for me but thought you might want to know in case it is a fixable bug.

    I just deleted an account I no longer needed and I got this error message.

    Warning: reset() [function.reset]: Passed variable is not an array or object in /home/ismyblog/public_html/wp-admin/includes/mu.php on line 47

    Warning: Cannot modify header information – headers already sent by (output started at /home/ismyblog/public_html/wp-admin/includes/mu.php:47) in /home/ismyblog/public_html/wp-includes/pluggable.php on line 856

    nothing else on the page so I had to use my browsers back button. and upon return to admin blog list I see the blog I deleted is gone.

    Tony V

  • TonyV
    • Site Builder, Child of Zeus

    Not sure how to test that without de activating plugins one by one. I do have a couple of plugins that I plan on canning in the next day or two that I am sure I will not be using now, like upgrades… I see that you have been updating plugins lately, it is possible I may need to update one or two of them. I will cycle through what I have and update to the latest versions. I only have about 6 so it shouldn’t take too long.

    then I will test again by creating an account I can delete and let you know what happens, unless you can tell me an easier way to test?

    Tony V

  • TonyV
    • Site Builder, Child of Zeus

    I did notice on the upgrades option, in an account that when I try to “click here to purchase credits” I am getting a message on the next page “cannot load credits”

    I was thinking this might be a conflict with pay to blog? this is the reason I was thinking of canning upgrades…

    Tony V

  • TonyV
    • Site Builder, Child of Zeus

    I did notice on the upgrades option, in an account that when I try to “click here to purchase credits” I am getting a message on the next page “cannot load credits”

    I was thinking this might be a conflict with pay to blog? this is the reason I was thinking of canning upgrades…

    Tony V

  • TonyV
    • Site Builder, Child of Zeus

    The only error message I get in this case is “Cannot Load Credits”

    and this is in one of the accounts admins, so I would not be able to link to it without giving you login info. unless this is what you want me to do. I put a screen shot up here http://ismyblogs.name/ss.jpg of what I see for the error.

    I tried sending credits from the main admin to this account and still get the same message when I click on the link to view credits.

    Should I try uninstalling the upgrades plugin and reinstall? or do you have other ideas?

    sorry for adding this in, but since you have been helping me I thought I would keep it all in one spot instead of many places in the forum. hope you don’t mind. I put up the most recent version of TOS and when I view it, on my sign up page, it does not have a scroll bar, and the lettering is light grey. not so much concerned about the light grey, but is there something I can do to have a scroll bar so all the tos can be viewed? here is a screen shot of what I see http://ismyblogs.name/ss2.jpg

    thanks for any input.

    Tony V

  • Andrew
    • Champion of Loops

    Hiya,

    Can you send WPMU login details to andrew AT wpmudev.org? That error shouldn’t be occurring and I can’t reproduce it locally.

    As for the TOS plugin… Last year a few members had a discussion about people being able to clear out the TOS box and then checking the “I Agree” box effectively agreeing to a blank box. So the text area was “disabled” to prevent users from editing the content.

    I’m just going to change it back because the “fix” is just causing problems. I’ll upload a new version later today.

    Thanks,

    Andrew

  • TonyV
    • Site Builder, Child of Zeus

    I still need to check to make sure I have all the files I am supposed to for upgrades. I moved some things around so it might have been my doing. If I am unable to correct still I will then send you the login details for wpmu.

    on the TO’s it’s not a big deal, maybe I can use iframe to create the scroller? I will have a look at how it is now that you put it back to how it was. I geuss I should ask, can html be used in the to’s?

    Thanks,

    Tony V

  • TonyV
    • Site Builder, Child of Zeus

    Andrew,

    we talked about a couple different issues so this is about the error message I was getting when I try to launch upgrades from any of the admins… error message being “Cannot Load Credits”

    I had multi-db set up after I already had upgrades installed, so I thought maybe the tables were missing for upgrades to work correctly, so I uninstalled upgrades and reinstalled thinking it would create the necessary tables, but it did not work. I still get the same error message.

    I got it to work when by accident I moved db.php (a multi-db file out of wp-content) but when I put db.php back in wp-content again I get the same error message.

    any thoughts?

    thanks.

    Tony V

  • TonyV
    • Site Builder, Child of Zeus

    trying to locate that now. moving upgrades to global db, should just be export from old db and then dump into global db right?

    as far as db-config.php this is the only mention I have;

    add_db_server(‘global’, ‘dc1′, 1, 1,’127.0.0.1′,’;01′, ‘username’, ‘password’, ‘12345678’:wink:;

    need more then this?

    Thanks.

    Tony V

  • Andrew
    • Champion of Loops

    Hi,

    You need to copy the upgrades tables from your original database to your global db.

    After you’ve done that you need to declare the tables as global tables.

    Take a look at the example db-config files that come in the Multi-DB download.

    Thanks,

    Andrew

  • TonyV
    • Site Builder, Child of Zeus

    thanks Andrew,

    I just want to confirm.

    my programmer actually set up the multi db for me.

    and I see where he put in

    add_db_server(‘global’, ‘dc1′, 1, 1,’127.0.0.1′,’;01′, ‘username’, ‘password’, ‘12345678’:wink:;

    in db-config.php

    this is the declaration you are talking about right? I looked in the example db-config files and they show pretty much this.

    so if I am right, then all I need to do is export from the old db and dump the tables into the global db and all should be good?

    thanks.

    Tony V

  • Andrew
    • Champion of Loops

    Hiya,

    Honestly it sounds like Multi-DB wasn’t installed properly.

    add_db_server('global', 'dc1', 1, 1,'127.0.0.1',';01', 'username', 'password', '12345678');

    If that is what’s actually in your db-config.php then that’s a problem right there.

    this is the declaration you are talking about right? I looked in the example db-config files and they show pretty much this.

    Check out this bit:

    //
    
    //
    //---Global Tables
    //
    //
    //
    // Do not include default global tables
    // Leave off base prefix (eg: wp_)
    //
    // Usage: add_global_table(TABLE_NAME)
    // EX: add_global_table('something');

    Thanks,

    Andrew

  • TonyV
    • Site Builder, Child of Zeus

    Andrew,

    there is a lot more and I changed what is actually there to username password, but I am thinking that is not what that part is after all. I just did not want to put everything up I actually have.

    can I zip you the file (db-config.php) to your email? if yes, your email is?

    my programer did set up all the db’s and they are referenced in db-config.php

    I do see this

    //—Global Tables


    //

    //


    //

    // Do not include default global tables

    // Leave off base prefix (eg: wp_)

    //

    // Usage: add_global_table(TABLE_NAME)

    // EX: add_global_table(‘something’:wink:;

    add_global_table(‘some_global_table’:wink:;

    so it looks like something is missing here then?

    thanks.

    Tony V

  • Andrew
    • Champion of Loops

    Hi Tony,

    I used to allow users to send me stuff via email but I really try to avoid that now.

    Just mask the passwords and post your db-config.php here. If you’re using 256 or 4096 tables then just post a selection of the connections lines.

    so it looks like something is missing here then?

    Let’s pretend the upgrades plugin has a table named ‘upgrades123’. You would need to add this line:

    add_global_table(‘upgrades123’:wink:;

    Do that for *every* global plugin table.

    I’ll check back in on Monday.

    Thanks,

    Andrew

  • TonyV
    • Site Builder, Child of Zeus

    Andrew, as mentioned I did get the global database updated with the tables for the upgrades plugin to work nicely however I just noticed something that might be a bug.

    in the top admin bar I have a link named blog account which brings me to an error page, and the error is Cannot load blog.php.

    this link points to wp-admin/admin.php?page=blog.php

    the link in the left side menu named the same “Blog Account” works great but points to wp-admin/blog.php

    Tony V