Here's a quick little plugin I'm currently poking at for WordPress that I think many web-comic peeps will find handy. Requires both Comic Easel and s2member. This is getting close to a release state, however it is still beta.
SMEW-comic-easel-heart-s2member-v0.1.4
=== Comic Easel <3 s2member ===
Requires at least: WordPress 3.0, Comic Easel Plugin, s2member
Tested up to: WordPress 4, Comic Easel Plugin, s2member
s2member integration for Comic Easel for drip feeding of comic posts. Will let subscribers 'preview' comics for specified times before opening up to the wide world based on user roles. Will also allow different size images to be displayed based on user roles. Only works on Single Posts.
Known Issues: This plugin currently breaks Image Maps and Light Box use inside of Comic Easel. It is recommended you do not use this plugin until the next revision of both SMEW Comic Easel <3 s2member and Comic Easel if either of those two functions are necessary for your site.
Upcoming: Adding a backend setting UI to change things such as the custom post type slug name. Fix for the Image Map and Light Box issue coming with next revision of both SMEW Comic Easel <3 s2member and Comic Easel (will require both). Add descriptions to Settings page.
Update:
v 0.1.4 - Fixed the comic display so that it would correctly display/interact when 'Comic Easel'->'Clicking the comic goes to next comic' is active. Removed add_action via Frumph's wonderful suggestion. Changed timestamp creation to fall more inline with WordPress standards.
v 0.1.3 (internal release only) - Added the ability to set image size via membership level. Currently hard coded to the 4 basic membership levels that come standard with s2member. It can be wonky since it can be set in any random order, so use with caution.
v 0.1.2 - Fixed bug where variable was feeding into wrong function.
Wow- not even 48 hours old and I find my first bug! Basically, the name was causing WordPress to try and update the as if it was Comic Easel. Not helping. So I renamed the plugin slightly to include the studio's abbreviation, SMEW, at the front. The link above has been updated with the newest version. If you really want the older version, I have it listed below.
SMEW-comic-easel-heart-s2member-v0.1.2
SMEW-comic-easel-heart-s2member-v0.1.1
comic-easel-heart-s2member-v0.1
Hi there! This is rainbowprophet: I haven’t been able to use my spearcarrier handle in that forum for months now. Anyway. Very excitedly I have installed your plugin!!! I don’t know if it’s working or not. I have a question, though. My website is set to 2 levels and you can’t see anything unless you login. I couldn’t see any way to get the plugin to adapt to that. I should learn what I’m doing.
hurm – checking into it. Will post back with more info…
Okay, took a look at it and it was not feeding a variable correctly. Is now fixed. Currently, the plugin dosn’t care what level you have set, only that you set one (or 2). Alas, ATM it will only works on single posts – will not properly lock/unlock anything that is currently covered by Alternative View Protection. Will poke at it more later this week.
You have two duplicate statements at the top of the function doing the same thing twice, .. remove the add_action one, action is used for echo’ing content, while filters change the internal content to what you need.. ref: http://wordpress.stackexchange.com/questions/1007/difference-between-filter-and-action-hooks
I looked at the plugin otherwise and it’s golden. The usage of U (linuxstringtime) is a perfect example of keeping it consistently reliable, well done. Might be wise to use $gmt_timestamp = get_post_time(‘U’, true); which is the best way to keep consistent with the WordPress installations based on the timezone user sets the GMT in the settings.
Don’t worry about the slug name, the post type will always be ‘comic’ with comic easel so there’s no need to change that; Unless you want to make this available to ‘webcomic’ users as well, than it would be good to change it to webcomic1 webcomic2 or whatever the post type is for which set is created in that plugin (it increments for each comic that is set)
Lol! You have good timing Frumph! I was just poking at the plugin when I got this reply.
add_action has been removed by your suggestion. Thanks!
I assume you mean replace $comic_time = get_post_time(‘U’, true); with $gmt_timestamp = get_post_time(‘U’, true); (and references to there in) to fall inline with WordPress standards?
At this time, I had no plan on tweaking this for ‘webcomic’. The main reason for the idea of messing with the slug is encase any users decide to mess with their own. But that’s something I don’t wanna mess with just yet. But I’ll keep the incremental thing in mind when I get to that point sometime down the road.
Oh, I found one thing you might want to look at in your own code while I was getting this working tonight. When you pass the final ‘img src=’ string to display the comic image, the info passed through ‘title=’ and ‘alt=’ is the post name, and not the actual image title and alt info as defined by the WordPress Media handler. Not a big deal in the slightest, but I thought I would pass that info along.
Anyway, thanks for the suggestions! Hope to have v.0.1.4 up tonight here and this weekend look at cleaning up the back end enough so that I feel comfortable enough putting it up on WordPress Plugins.
Heh included WebComic in my reply because it was a ‘to be fair’ thing. ;/
Thanks for the info on the img src= alt= … I wasn’t planning on using the media library entry boxes for them since hovertext overrides both, but seeing now that I could probably get away with having those as the entries and hovercard override those if used. Maybe a toggle in the options ;/
Took a look at 0.1.4, totally gettin your coding skills on, awesome except the part where you’re reinventing the output. Posts that have img maps and lightbox and oembed will be broken.
I am wondering if it would be better if I added a filter on the comic size in the function to better deal with that. i.e. as it passes through the function place a $size = add_filter(‘ceo_comic_size_change’, $size); so that it can accept an easy change.
Yeap, did it: https://github.com/Frumph/comic-easel/commit/6098e1bc5a41d5bd084c6fe9201768a7d42b2796 up for next update. Filter is: ‘ceo_display_featured_image_comic_size’
Yay! That hook is just what I needed. I only did the whole reconstruct thing because I didn’t have the hook. I’ll probably go ahead and post 0.1.4 to WordPress (with a warning that it’ll break img maps and light box), then get the new hook version going so that I can have it ready to post when the next version of ComicEasel hits.
Thanks so much for taking the time to write that hook. It means a lot!
Hi guys! I love your plugin! Waah! I love it! Except (man I hate it when I have to type except… I guess I could type… but…)… but… Things are being dripped!
YES!
They’re being dripped to the wrong people.
Maybe I have the settings all wrong?
I have 2 levels for membership. Free, which you have to login for. And paid, which you have to pay for.
I told it to drip things to the free level, membership level 0, today.
It’s dripping it down to people who aren’t logged in too.
WAH!
But… still… it’s… dripping!!!!!
Hello Spear!
Right now the plugin is very binary (on/off). It either locks a viewer out of a given post except for anyone with the approved membership level or higher, or it’s free to everyone in the world to see.
With that said, what are you wanting to do that is giving free memberships viewership but not non-subscribers?
Hey there! Thanks for the fast reply! I thought as much about the binary situation, but I’m just so happy to have it drip I’m not complaining too loudly. I was just also hoping there was something I was missing. It took me weeks to even figure out what I was doing. LOL.
Heavenly Bride is locked against random visitors because 1. on very rare occasion is shows adult material and 2. I got tired of not even knowing if the comic was even being read. It got very disheartening at one point, so I set it up the way it is now. Doing that freed me from fighting to get things out on schedule for people who I wasn’t even sure was there and, well, it also appears to have protected the comic somewhat. My morale was lifted at least!
That being said, all I’m wanting to do is enable the free viewers to get to see dripped content while not allowing free people to just see things wil-nilly. But I’m also okay with it as it is, especially if what I’m trying to do is super complicated!
Humm – the tighter control of adult material is a good reason to lock it behind a login. Let me think on it to see how viable it might be. Though don’t look for a change until the next major revision since it will be some coding work to add an extra gate. Hope you can hang in there till then.