Jump to content

Am I right in thinking ProcessWire will be ideal for this site?


rickm
 Share

Recommended Posts

Hi all,

I've got a bit of a newbie situation for you all today and would appreciate any input you could provide.

Right. I use PyroCMS, a very dated, but heavily modified and patched copy on my site. As it stands I'm finding Pyro to be more of a pain by the day (broken features, now impossible to upgrade as they discontinued some stuff we need, etc) and am looking to move to something else.

I first started out by planning out, and starting a completely custom CMS built on Laravel. But I've not come anywhere close to finishing and it seems silly to spend months building a complete system, when I can use something like ProcessWire and then build (and, where possible, share) custom modules for any functionality I need added.

The site has a custom set of tables. They store theme parks, the 'lands' inside the parks, then the attractions, restaurants and stores inside each land. It also stores hotels and their restaurants, and hotel details such as room types, gps data for locations, etc. A lot of the data isn't utilised on the current site, but I've got it all ready to be used on the new system. Ideally I'm also looking for a way to have all these individual sets of data (which then get shown as 'pages') properly tagged for a decent way of searching the site.

Am I right in thinking ProcessWire is an ideal option for all these custom data types? 

One other thing I'm a little worried about is images/media. I've got a TON of photos and galleries on the site, and right now I use PyroCMS's built in file manager, which is essentially a jquery based virtual file browser, but it allows cool things like on the fly image resizing and caching by doing something like this: 

Original: http://wdwfans.com/files/large/21638

500x500 cropped: http://wdwfans.com/files/thumb/21638/500/500/fit

500x500 filled: http://wdwfans.com/files/thumb/21638/500/500/fill

Whilst from the front-end I have no need to do that, it'd be from the backend that I need to browse and insert images into pages that are already uploaded, and set the sizes up. I had a flick through the modules database but didn't see anything obvious that would allow this. I'd happily write a custom module for something like this, but wanted to first check that nothing existed already, or if there was a better method of achieving something along these lines.

For my current database-based content I'm literally pulling the DB content directly into the template files. Am I right in thinking process wire handles this sightly better?

For reference/info here's some examples of the pages that use custom data:

Restaurant: http://wdwfans.com/dining/teppan-edo

Attraction: http://wdwfans.com/theme-parks/magic-kingdom/attractions/splash-mountain

Resort: http://wdwfans.com/resorts/disneys-all-star-movies-resort

I'm excited at the thought that I may have finally found a CMS capable of performing the tasks I need it to do. I'd really appreciate any input or suggestions on if ProcessWire will be able to do what I need, and where I may run into any problems.

Many thanks.

  • Like 1
Link to comment
Share on other sites

I'm strapped for time but let me just say quickly that PW seems a perfect fit for this out of the box, apart from the images/media part.

PW doesn't have some sort of centralized media library/manager like others. Instead files are basically attached/uploaded on a page by page basis. Some attempts have been made (can't find them right now) but none that would seem like an ideal fit. Other will prolly elaborate more :)

Link to comment
Share on other sites

Thanks for your reply SiNNuT. For the images my plan would be to write a module that essentially emulates what the PyroCMS one, and my custom one do.

It'd basically have 2 DB tables, one for categories, one for media files. The files would all go in somewhere like /site/files/ (I'd probably not have categories in here as it complicates things - I'd use this just purely to store all the files in). A cache directory would store all resized images.

You'd then have an area in the admin area to manage the files and their folders. The only bit I've not figured out yet is the best way to add it as a plugin to either TinyMCE or CKEditor (or even Redactor - I'm licensed to use it in commercial projects so could add it as a module and release it, but I'd be required to charge a fee, even if it was just $1 or something).  

I'd guess whichever editor I use I'd have to have a copy of that editor as a separate module, that requires the main media module, so that when you click the image button in the editor, it loads up the image picker from the media module instead of a URL or upload field. I did get this working with CKEditor on my own system, so it'd be fairly simple to pull that across and convert it over. 

I did find one addon called ImageManager which does look pretty decent, I'll have to have a play with it and see how it handles things like image serving and caching.

Link to comment
Share on other sites

I agree, I think ProcessWire would be an excellent fit for your needs. With regard to centralized media manager, there's a reason we don't have one built in and that's because we've got something better. You may have to think differently about how you manage them, but once you get it I don't think you'd want to go back to an old style media manager. If you need any help understanding how a particular situation would be accomplished in PW I'm happy to give more info. 

This is a potential security hole. Allowing URLs to create images on the fly has high potential as a ddos (denial of service) hole that is an easy attack target. Someone can write a quick script to formulate and call millions of those URLs, consuming your server for hours or days till eventually filling up the hard drive (or your hosting quota). Basically, it's a security problem if non-predefined resize dimensions are coming from the client (user input, like URLs) rather than from the server. I substituted some other width/height values in there and can see it will take whatever I give it (no restraints). For example, this call uses 3 megabytes on disk, takes up several seconds of server time, and consumes 3 megabytes of your bandwidth: http://wdwfans.com/files/thumb/21638/3500/3500/fit

Here's how you'd approach creating 500x500 images in PW: 

$image = $page->image->size(500, 500); 
echo "<img src='$image->url' />";

Our default behavior would be the same as your "fit" method described. I'm not sure there is a legitimate use for the "fill" method as it distorts the photo, something that I can't imagine is desirable on any site. But if you wanted to duplicate that, you'd turn cropping off:

$image = $page->image->size(500, 500, array('cropping' => false)); 
  • Like 3
Link to comment
Share on other sites

The above is just the start of image manipulation potential in PW. There are so many things you can do from the API side with images. Just today we added some new cropping options to the dev branch (thanks to Horst, who is one of the best in the world when it comes to image related code). 

Btw, your site is great and I will definitely visit a lot in the future. We're in Atlanta, but have family moving to Orlando and plan on spending a lot of time at Disney World when we can (we have two young daughters that of course love everything Disney). 

  • Like 2
Link to comment
Share on other sites

Hey Ryan, thanks for your reply.

I know what you mean about the Pyro way being insecure. I brought it up with them a while ago and the only option was to allow BOTH the ID and the Filename. There was no way to set any kind of limitations on image sizes that could be generated, or any way to pre-define the sizes to use to prevent users generating new images. 

I've been having a play around with images and pages and I see what you mean about having something better - that just saved me weeks of potential dev work :P

Thanks for the comments on the site too! It's currently a bit dated as I basically had about a 6 month period where I was too busy to do any site content other than news posts. I've got a whole stash of new and updated content for it but have been holding off publishing until it was moved off of Pyro.

I've only been playing with ProcessWire for a few hours but I'm loving it so far. I finally think I've found what I'm looking for - thanks for creating such an awesome project! (Have a great time in Orlando!)

  • Like 2
Link to comment
Share on other sites

With regards to a media manager, this is a topic not everyone agrees on so when I state "something better" I'm stating my opinion, formed largely on the sites I've built over the years. I don't believe I've ever dealt with a site that would have been better served by a media manager than with PW's way of managing assets, especially as the scale increases. But not all sites have the same needs, and we like differences of opinion here so I aways want to encourage discussion and questions. Keep asking questions and decide for yourself. If you are coming from a background of having used a media manager on past sites, I'd definitely encourage you to post more about the things you are trying to solve so that we can direct you towards simple ways of solving them. There are lots of different ways to accomplish things in PW. 

  • Like 1
Link to comment
Share on other sites

To be honest I'm not a massive fan of how Pyro handles it. I've just never really considered anything else, and always assumed that it was 'the norm'. The one thing I do like about a 'media manager' approach is that you can sort all your images into folders, which makes it real easy to find old events.

As an example if I want to pull up all our photos from an event at one of the parks a couple of years ago, we've got it all sorted into things like:

Theme Parks > Epcot > Events > 2012 > Food and Wine Festival

That's the only real big bonus I find with the media manager approach. I had a heavily modified gallery setup on Pyro which could pick up all the images in one of the virtual directories and turn it into a nice image gallery.

That being said, from what I understand with Processwire it's not all that different, it's just instead of 'virtual folders' you have pages, so it'll hopefully not be an issue :)

Link to comment
Share on other sites

That being said, from what I understand with Processwire it's not all that different, it's just instead of 'virtual folders' you have pages, so it'll hopefully not be an issue :)

You're right, as all media is attached to the page it belongs to, you just need to look at this page. In addition do you find all other infos right there, too.

Link to comment
Share on other sites

Right I'm officially in love with ProcessWire.

I've been setting up all my templates and field types and wow....things like the repeater field type are amazing, and the level of customisation...just...wow!

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...