Jump to content

ProcessWire to build an ImageBoard?


JMartin
 Share

Recommended Posts

Hi.

I'm totally new.  Have never used PW before, but have wanted to for years!  I've just never been able to wrap my head around how it works, so I always (somewhat begrudgingly) go back to Expression Engine.

But anyway...  I have a new client who wants to make an Image Board site for full time RVers and live aboard boaters.

They want something similar to 4chan, but without anonymous posting. And they want it to be more modern looking – kinda like NodeBB. So a regular Image Board script won’t work because they don’t seem to support memberships. And a vBulletin-type forum would require a tonnn of hacking to make it right.

I could definitely build it with EE, but I'm wondering if PW might be a suitable (and more scalable) alternative?

Requirements would be:

  • Front end member registration, password retrieval, etc.
  • Front end thread creation by all members  (I assume each new thread would be a separate "page")
  • Front end member profile editing
  • Picture upload required to create each new thread
  • Picture upload optional on all subsequent comments inside a thread
  • Front end post and comment uploads restricted to images only – .jpg, .gif, .png
  • Appropriate security to prevent uploading malicious files disguised as images
  • Optional tagging of each thread as it's being created
  • Automatic SEF urls created based on the thread title ( e.g. http://site.com/forum/title-of-my-thread-12345  -or-  http://site.com/forum/12345/this-is-title-of-my-thread  )
  • Sitewide search feature

This client has existing sites with nearly 120,000 members combined.  When they launch this thing, the number of pages could grow very quickly as this audience loves to share travel pictures, etc.

Can PW do it?

Of the stated requirements, what is PW missing and/or what would need to be crafted from scratch?

Thank you!

Link to comment
Share on other sites

Hi,

It can definitely be crafted with ProcessWire, but your requirements are a bit tough for a starter, I guess. Anyway, if you have the time and take the challenge, I would start by taking a look at this:

As far as I know most of its UI features are implemented for the admin area, but it is possible to "let regular members" work in the admin, rather than implementing "custom frontend" interface for them. Lots of PW developers opted for this path already.

I recommend searching the forum for more info, like: https://www.google.hu/search?as_sitesearch=processwire.com%2Ftalk&as_q=migrate#q=form+api+site:processwire.com/talk

One more tip: ImageMagick. You will probably need a server with this as GD chokes on big files.

  • Like 1
Link to comment
Share on other sites

Hi,

absolutely possible.
My thoughts about your points - just some recommendations and very rough ideas:

 

  • Front end member registration, password retrieval, etc.

You may want to check out this: http://modules.processwire.com/modules/frontend-user/ Though I have never used it before.
It is quite easy to build your own registration process (once you get the idea how PW works)
Regarding this, and regarding everything else, this is a must read I think: 

Also:

  • Front end thread creation by all members  (I assume each new thread would be a separate "page")

I would add something like a user role "member". These users are allowed to create threads and post.
Then, I think I would only go with one datatype (template) for all the posts. Give them a page-reference field "reply_to". If the field is empty - it is the beginning of a thread. Otherwise you will have a handy reference to the preceding post.
Also a page reference like "initial_thread_post" which always references the beginning of a thread could be handy to easily group the posts in threads.

Some inspiration:

<?php

// get the beginning of a thrad
$pages->get("template=post, initial_thread_post=$threadNameOrId, reply_to=''");

// find all items of a thread
$pages->find("template=post, initial_thread_post=$threadNameOrId");

 

  • Front end member profile editing

Yep. Just a page / template with that ability. See "Create simple forms using API".

  • Picture upload required to create each new thread

About picture upload: Google it, I think it has been asked here before.
"required" - absolutely possible.

  • Picture upload optional on all subsequent comments inside a thread

Sure. :)

  • Front end post and comment uploads restricted to images only – .jpg, .gif, .png

Sure. :)

  • Appropriate security to prevent uploading malicious files disguised as images

Hm - complex topic I guess, not necessarily related to processwire?
https://www.owasp.org/index.php/Unrestricted_File_Upload

  • Optional tagging of each thread as it's being created

Already kinda processwires default! : )
You also can change the name of a page (will be the url name) to anything you like.
See "Create Pages using API"

  • Sitewide search feature

Look it up here in the forums / on the site. There is at least one thread and / or one tutorial!

 

Happy coding :)

  • Like 4
Link to comment
Share on other sites

Can it be done? Absolutely.

Is this an ideal first PW project? Hmmm... $64,000 question.

It really depends on your level of front end development experience. I don't even say PHP here because you could use almost any front end - I assume nodebb uses node.js and AFAIK there isn't anything to stop you doing that if you really wanted to (but you'd really have to want to) and just use PHP for template files.

My thoughts -

  • Front end member registration, password retrieval, etc.

Absolutely - simple (and not so simple) forms are easy with just html - no need for the API - just always use sanitizer. (There are a couple of modules for emailing users and forcing new passwords that might help, however.)

  • Front end thread creation by all members  (I assume each new thread would be a separate "page")
<?php
if($user->hasRole('member')){
	echo "<form class='createNewThread'>.....</form>";
}

You'll need to expand on the <form>, and server side check $user->hasRole() again for security, but that's pretty much all there is to it.

  • Front end member profile editing

See my answer re registration.

  • Picture upload required to create each new thread

This works lovely with PW (I'm just using it on a project.), for example. Handling the PW side is made much easier by reference to Soma's gist (which has become the de facto method as far as I'm concerned, at least). (Bonus hint - loads of other good stuff there, too.)

  • Picture upload optional on all subsequent comments inside a thread

See above.

  • Front end post and comment uploads restricted to images only – .jpg, .gif, .png

Because code referred to above uses WireUpload class, that's easy.

  • Appropriate security to prevent uploading malicious files disguised as images

See above, but with any security issue, take care.

  • Optional tagging of each thread as it's being created

Just search the forum/modules directory.

Already built-in, as others have said.

  • Sitewide search feature

You'll need to roll your own, but it's not hard. The search page from Ryan's skyscrapers profile is a good source of ideas.

I know much of the above duplicates what others have said, but it surely doesn't hurt to have a bit of confirmation. :rolleyes:

 

  • Like 4
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...