Page 1 of 2

Patreon Integration Public

PostPosted: January 4th, 2017, 1:48 pm
by Admin
Hey y'all,

The Patreon Integration is now public. To set up Patreon Integration with your comic, head on over to Comic Management, and you'll see a new menu item for Patreon Settings. There, you'll be able to connect your Patreon account to Smack Jeeves and associate a Patreon campaign with your comic and set up all kinds of neat things like Bonus Content and allowing your visitors to log in with Patreon. Doing so will also enable the Patreon widget on your comic profile.

As usual, feel free to post any questions/comments here or in the Help forum.

Re: Patreon Integration Public

PostPosted: January 5th, 2017, 12:55 am
by evegwood
This is great, I love the level of customisation! I can't wait to play about with these options a bit.

Re: Patreon Integration Public

PostPosted: January 5th, 2017, 9:16 am
by Respheal
Oh sweet! I had no idea what sort of rewards to set up with Patreon, but now I can set up early access! This is awesome! :D

It only works for patrons with a SmackJeeves account though?

Re: Patreon Integration Public

PostPosted: January 5th, 2017, 10:22 am
by Admin
Respheal wrote:Oh sweet! I had no idea what sort of rewards to set up with Patreon, but now I can set up early access! This is awesome! :D

It only works for patrons with a SmackJeeves account though?


Nope, any of your readers (with a Patreon account, obviously) can use the feature! They can be "guests".

Re: Patreon Integration Public

PostPosted: January 5th, 2017, 10:42 am
by Respheal
Ehh, there seems to be a bug then. I set up a test patreon account and a test SJ account and I wasn't able to view the early access page unless I was logged in with my test SJ account and it didn't toggle the "logged in with patreon" switches until I logged in as the test account.

Replication details: Log in on patron, DON'T log in on Smack Jeeves, click "Log in with patreon" button on comic page, click 'allow', it redirects back to the comic page, but no access to the early access page. This one's a bit weird because it works fine (logged in on Patreon, not logged in on SJ) for Mokepon for example, but not on my own comic? Maybe the custom domain is messing with things? Edit: It's DEFINITELY the custom domain mucking things up. Tested out on my template-test comic that doesn't have a custom domain and it works fine.

Edit:
Ah, also managed to spawn a PHP error somehow:

Code: Select all
Warning: Invalid argument supplied for foreach() in /home/[youruser]/public_html/includes/classPatreon.php on line 1035

Warning: Invalid argument supplied for foreach() in /home/[youruser]/public_html/includes/classPatreon.php on line 830

Warning: Invalid argument supplied for foreach() in /home/[youruser]/public_html/includes/classPatreon.php on line 848

Warning: Cannot modify header information - headers already sent by (output started at /home/[youruser]/public_html/includes/classPatreon.php:1035) in /home/[youruser]/public_html/viewsite.php on line 3519

Warning: Cannot modify header information - headers already sent by (output started at /home/[youruser]/public_html/includes/classPatreon.php:1035) in /home/[youruser]/public_html/viewsite.php on line 3529

Warning: Cannot modify header information - headers already sent by (output started at /home/[youruser]/public_html/includes/classPatreon.php:1035) in /home/[youruser]/public_html/viewsite.php on line 3531

Warning: Cannot modify header information - headers already sent by (output started at /home/[youruser]/public_html/includes/classPatreon.php:1035) in /home/[youruser]/public_html/viewsite.php on line 3532


Replication:
- Be logged in on Patreon (and not subscribed as a patron for the comic using to replicate), but not Smack Jeeves.
- Log in to Smack Jeeves
- Go to comic with Patreon login button
- Click button, Allow
- Get redirected back to comic, errors on top of page
- Refreshing clears the error

Re: Patreon Integration Public

PostPosted: January 5th, 2017, 12:01 pm
by Admin
Did you remove the Patreon login button? I'm not seeing it on your site to test.

Re: Patreon Integration Public

PostPosted: January 5th, 2017, 12:21 pm
by Respheal
It should be there? It's under the comic page but above the comments.

Re: Patreon Integration Public

PostPosted: January 5th, 2017, 12:30 pm
by Admin
Ah, okay, that might be a bug as well. Looking into it.

Re: Patreon Integration Public

PostPosted: January 5th, 2017, 4:02 pm
by AlkseeyaKC
Thanks for doing this! It was much needed! =3

Re: Patreon Integration Public

PostPosted: January 6th, 2017, 9:40 am
by Admin
Respheal wrote:Ehh, there seems to be a bug then. I set up a test patreon account and a test SJ account and I wasn't able to view the early access page unless I was logged in with my test SJ account and it didn't toggle the "logged in with patreon" switches until I logged in as the test account.

...
Spoiler! :
Replication details: Log in on patron, DON'T log in on Smack Jeeves, click "Log in with patreon" button on comic page, click 'allow', it redirects back to the comic page, but no access to the early access page. This one's a bit weird because it works fine (logged in on Patreon, not logged in on SJ) for Mokepon for example, but not on my own comic? Maybe the custom domain is messing with things? Edit: It's DEFINITELY the custom domain mucking things up. Tested out on my template-test comic that doesn't have a custom domain and it works fine.

Edit:
Ah, also managed to spawn a PHP error somehow:

Code: Select all
Warning: Invalid argument supplied for foreach() in /home/[youruser]/public_html/includes/classPatreon.php on line 1035

Warning: Invalid argument supplied for foreach() in /home/[youruser]/public_html/includes/classPatreon.php on line 830

Warning: Invalid argument supplied for foreach() in /home/[youruser]/public_html/includes/classPatreon.php on line 848

Warning: Cannot modify header information - headers already sent by (output started at /home/[youruser]/public_html/includes/classPatreon.php:1035) in /home/[youruser]/public_html/viewsite.php on line 3519

Warning: Cannot modify header information - headers already sent by (output started at /home/[youruser]/public_html/includes/classPatreon.php:1035) in /home/[youruser]/public_html/viewsite.php on line 3529

Warning: Cannot modify header information - headers already sent by (output started at /home/[youruser]/public_html/includes/classPatreon.php:1035) in /home/[youruser]/public_html/viewsite.php on line 3531

Warning: Cannot modify header information - headers already sent by (output started at /home/[youruser]/public_html/includes/classPatreon.php:1035) in /home/[youruser]/public_html/viewsite.php on line 3532


Replication:
- Be logged in on Patreon (and not subscribed as a patron for the comic using to replicate), but not Smack Jeeves.
- Log in to Smack Jeeves
- Go to comic with Patreon login button
- Click button, Allow
- Get redirected back to comic, errors on top of page
- Refreshing clears the error


OKAY! I fixed it! You were right, it was because of the custom domain, although that was just kind of exposing a different bug that was the real problem.

Also, you had a few weird conditionals around your Patreon log-in button and your page title - that's why I couldn't see the Patreon log-in button. So I removed the conditionals because they didn't really make sense being there. And I updated your Comic and Overall Layout templates (added CSS to overall layout) a bit to just make the Patreon button fit in slightly better. Probably still room for improvement, but I'll leave that up to you to do what you wish.

Re: Patreon Integration Public

PostPosted: January 6th, 2017, 9:47 am
by Respheal
Awesome, yup, you fixed it! Thank you very much! :D And heh, thanks for adding in the CSS. I am a bit lazy and hadn't gotten around to prettying up the Patreon button.

The Warning: Invalid argument supplied for foreach() in /home/[youruser]/public_html/includes/classPatreon.php on line 1035 bug is still there, but it goes away after a refresh so it's not too big of a deal.

Re: Patreon Integration Public

PostPosted: January 6th, 2017, 10:21 am
by Admin
Respheal wrote:Awesome, yup, you fixed it! Thank you very much! :D And heh, thanks for adding in the CSS. I am a bit lazy and hadn't gotten around to prettying up the Patreon button.

The Warning: Invalid argument supplied for foreach() in /home/[youruser]/public_html/includes/classPatreon.php on line 1035 bug is still there, but it goes away after a refresh so it's not too big of a deal.


I'm not getting that error following the steps you listed - it may have to do with you logging into the same Patreon account multiple times in different sessions. Is that a possibility?

EDIT: Ah, nevermind, created a new Patreon account and now I'm seeing it. Thanks, will definitely look into this.

EDIT 2: Okay, that one was actually an easier fix. Thanks again!

Re: Patreon Integration Public

PostPosted: January 6th, 2017, 2:14 pm
by EllirhShaan
Thank you for this feature!

But I found a small problem with Kingly Grunge template.
The word "Patreon" goes out of borders when the button for logging or supporting on patreon changes to the template settings.

Spoiler! :
Image

Re: Patreon Integration Public

PostPosted: January 6th, 2017, 3:45 pm
by Admin
Try adding this CSS:

Code: Select all
a.patreon-log-in.override {
    padding: 2px 10px 2px 35px;
    background-size: 20px;
    background-position-x: 8px;
    font-size: 12px;
    white-space: nowrap;
    margin: 12px 0 0 -4px;
}

Re: Patreon Integration Public

PostPosted: January 6th, 2017, 6:00 pm
by EllirhShaan
Thanks!
Now it's much better :)