Collecting & preserving snippets & gists together

We have been working with s2member for many years supporting many clients. It is not the easiest membership system by any means. BUT we love that we can, with a little bit of work, customize it to do almost anything a client would need.

One of the most important ways to do that is by getting or giving ( sharing ) snippets or examples. I am concerned thought that sometimes those examples exist in older conversations on other domains. A few times they have even disappeared for a while ( someone forgot to renew a domain or update DNS ? )

In addition, some of the older snippets or examples may now have newer ways to do the same - new hooks/filters/shortcodes/classes/methods ?

Now the question or proposal:

Is there one place where people now look for s2member snippets/gists/examples besides the current KB? If not, should we create one?

Of course we would not expect Jason, Raam & the gang to take any responsibility, but will include some of the excellent code bits they have given us over the years.

There isn’t any one place, that I know of, that people can look for this now. It’s a great idea though. There are plenty of places we could do this. I don’t use any of them regularly so I’m not sure which one would be the best for something like this. I would think it best if we all could contribute to the same “folder” rather than just relying on descriptions or tags to help people find them. Anyone familiar enough with the codesharing sites to recommend one?

Thanks Pat.

I will examine some options and hope others will make suggestions and contribute.

I have a ton of bookmarks to solutions people have shared. I worry that those lins may cease to work someday.

We also have a great deal of code I have written over the years for ourselves and our many clients that I would be happy to share and allow others to leverage or improve.

2 Likes

@Sonja, @JediShark, I think this is a great idea.

I have had a look round for what’s available, though, and didn’t find much. I have just tried out using Gistbox, which you makes it easy to register if you already have a Github account, and posted a gist here: https://gist.github.com/KTS915/c429e70a6956b98092590e2bba847752 I have labeled (tagged) mine s2Member, so it’s easy to find.

It also enables the creation of groups, to which you can post gists, which I have done (with the same gist) here: https://gist.github.com/KTS915/c429e70a6956b98092590e2bba847752

The groups feature seems nice, because it can be set so that others can then join and post. The problem is that it looks like they need to be invited, and that requires an email address.

I don’t know if you like this idea. If not, or you have found something better, just say so and I’ll forget it!

If it is of interest, though, you could either set up your own accounts and publish your own gists (like my first example) or else PM me your email addresses and I’ll invite you to my group, and you’ll be able to post your gists there.

Tim

Tim,

I have used github & gist.github, but not Gistbox.

I will give it a try and share my thoughts.

I’ll be posting a couple of Gists to the s2Member group this weekend.

Hey all. :wave:

This topic has come up a few times over the years and the trouble we’ve had with creating a repository for snippets has always been one of maintenance. If the software is updated in such a way that old snippets become broken, who makes those those snippets are updated? Over time, it would become a lot of work to test, update, and otherwise ensure that all snippets continue to work with the latest version of s2Member.

That said, I’m not at all opposed to the idea of collecting snippets—it’s going to happen one way or another and if we (the WP Sharks team) can at least provide a place for that, we’d be happy to, so long as it doesn’t come with the expectation that we’d maintain that repository.

Would a new category here on the WP Sharks forums help? If we create an s2Member Snippets (Unofficial) category here on the forum, would that work as a place where snippets can be posted?

Raam - that might work as well. My main concern is that many of the old snippets and answers may become unavailable and at best are scattered. I have hundreds of bookmarks that link to primothemes.com forum, the older s2member forum and others. It would be nice to know that they will not disappear.

Of course it would be nice if it were a true community effort, hopefully with a little support from you Jason & the gang.

It could also serve as a source of KB candidates. That is if @JediShark, @KTS915 , @krumch or any volunteer/contributor created a great snippet or write up, you could use it a s the core of future KB articles.

@KTS915 Tim - your links are showing 404s. Did you remove the gists?

Sonja,

No, I didn’t. I did, however, get an email from Github saying that that were closing Gistbox and replacing it with a service called Cacher. I just made sure that I retrieved a copy of all the gists posted.

Cacher is mainly a paid service. It does have a free option for public posts, but I’m a bit put off by the way that Github handled this. Is there a particular gist you were looking for?

@KTS915 No Tim, I just wanted to examine the concept you suggested and compare it with @raamdev 's offer of a forum category . I would really like to see a place where we could share code s2member code bits. We could also think about preserving or even migrating some of the valuable bits on primothemes or the old s2member forum. I would also like to be able to share some of the many hook actions and filters I have written for my clients over the years.