GalleryEnthusiast! (A WordPress plugin...)

DarkDepths

Your friendly neighbourhood robot overlord
#1
So, some of you might not exactly consider this to be "creative", but I've been creatin' so I'm postin'! =P

It's a WordPress plugin for making awesome Galleries for your site! It's not finished yet. I had hoped to be a lot further than I am right now, but I sort of decided to go a little overboard on some aspects of the admin panel. So That's what I'm going to show you right now.

Basically, there is only one admin panel where you can manage you galleries. But, when you want to manage the assets in a gallery, you can bring up a dialog that I am ever so cleverly calling the "Asset Manager". It has three functions: creating new assets, finding and editing existing assets, and selecting assets for the gallery. The last two aren't all that complicated, but creating assets has turned into something of a beast. Here is a screenshot of what it looks like after I drag-n-drop a few files from my desktop into it:



I've been working on the Asset Manager for about a week now, and I'm starting to get pretty tired of seeing it! But, it works really smoothly and makes me happy whenever I try something and it works =P

Also, notice the tab at the top that says "Upload Image". See how it has a radio button on it? That's because there are actually more tabs. There is one for grabbing images off the web, there is a different one for uploading images that used a file selector (rather than drag-n-drop) and there is also one for grabbing videos from video providers! However, when you drag-n-drop images in from your computer, uploading it becomes the only option, short of deleting it and creating a new one.

I decided to post here mostly because I got a little bored of working on it, and I thought I might be able to help my motivation if I kept a log of sorts. I'll be posting more in the future. If you want to follow along, that's cool, but I understand, it's a gallery wordpress plugin - not the most exciting thing in the world!

Also, I just wanted to mention, because I thought it was kind of funny. For the first time ever, one of my projects managed to crash chrome! I opened up the task manager and my page was using up a gig of memory! I had a slight memory leak with the image preview... whoopsies!
 
Last edited:

DarkDepths

Your friendly neighbourhood robot overlord
#2
A new update for those of you that are surely perched on the edges of your seats!



All of the information was automatically populated after I pasted in the video url! It's so shnazzy =P At the moment, it only works with Youtube and Vimeo URL's, but if I have time, I might add others. One annoying thing is that Youtube doesn't provide tags (or "keywords") through it's API unless it's your own video, so for Youtube videos, it doesn't load any tags. But it's still pretty cool anyways =P

There are a few little bugs to sort out, and I need to make a few icon images, but then I think I'm done with this bloody "creation" panel. The "Finder" and "Selected" panels are just about complete, but they aren't entirely functional at the moment. It'll be easier to make them functional if I can test them, though, and it will be easier to test them if I have a functioning interface for uploading new assets. So the next step will be actually upload these things... just a small step I'm sure =P
 

DarkDepths

Your friendly neighbourhood robot overlord
#3
So I actually spent today refactoring my JavaScript and fixing bugs. When I started writing the JavaScript for this thing, I hadn't envisioned myself going quite as in-depth in the various features as I ended up going. That meant that I didn't really structure the project in a way that would allow it to be maintainable if the code were to get very large. So today, I went through my JavaScript and did some re-architecting. The results is that it is now much more pleasing to read and follow, and just as importantly, easy to add on to and maintain. And that is very important because I still have a lot to add!

If anyone is interested in some numbers (who am I kidding, no one has even stepped foot in this thread =P), at the moment, the JavaScript file for this interface comes in at 1489 lines of code. I expect to at least double that over the next couple of days.

In total, the plugin is currently at 4261 lines!

I'm not sure why I decided to make such a complicated Gallery plugin for WordPress, but I somehow stuck with it for this long - I guess I'll probably make it through to the end! Hopefully soon-ish, though. I have some other cool projects I'd really like to get started in on!
 

DarkDepths

Your friendly neighbourhood robot overlord
#4


Image uploads are complete now! I still have to work on the external images, and video linking, but that should be a bit easier. There is some sort of cool stuff happening behind the scenes, but I'll leave that for another day when I can show off what it does!
 

Cyan

Well-Known Member
#5
Awesome! What libraries/plugins are you using? Making WordPress stuff is hard with all that hooking stuff. It's something I can't seem to figure out on my own. :<
 

DarkDepths

Your friendly neighbourhood robot overlord
#6
Awesome! What libraries/plugins are you using? Making WordPress stuff is hard with all that hooking stuff. It's something I can't seem to figure out on my own. :<
The only code I'm using that's not mine, aside from WordPress of course, is jQuery.

Up to now, this plugin only uses a few hooks really, and I just keep the codex open to help me figure out what I need to hook into.
 

DarkDepths

Your friendly neighbourhood robot overlord
#7
Quick update:

Video uploads are now done, as are "external" images. External images are images that are stored on a remote server and linked to from the Gallery. Videos are treated in basically the same way - since they might as well just live on Youtube or Vimeo.

Progress bars are done, though to be honest, most of them cheat. Most of the time, they just say "In Progress" or "Success". However, for some types of uploads, if you are using a compatible browser, it will give you actual upload progress.

You can also cancel uploading assets. It doesn't reject the assets, it just doesn't upload any more after you click the button. I've also got it removing the successfully created assets from the creator, so they aren't duplicated. I have THREE more dialogs to create now, and then I'm done with the AssetManager, methinks.
 

DarkDepths

Your friendly neighbourhood robot overlord
#9
When it's done I certainly will. I've taken a bit of a break to work on something else, but I should be back on it tomorrow or Sunday. I still have to do the frontend stuff, and a little bit of admin stuff, but I'm hopeful it won't take too much longer.
 

DarkDepths

Your friendly neighbourhood robot overlord
#11
Thanks for the offer, but no. There really isn't too much left to do, it's just a matter of finding time to do it. Thanks though.
 
Top