Concept & Tutorial!: User Enhancements/plugins (Think FACEBOOK)
Upon some discussions I've passed about drupal, and how it's a development framework 1st then a CMS 2nd
I decided to look at a problem in a different light. How can I use drupal to develop a "CMS for my end users".
Who are my end users generally? (People with no knowledge of cms's and just expect things to work... {think myspaces users}
So, what this does is gives my site visitors the ability to "enhance" their profile feature set. (Think FACEBOOK).
This enhancement is: Image Upload (User may have their own image uploader, always at the same address, where they can add and delete images in 1 place).
Modules:
CCK
Imagefield
Filefield
IMCE
Wysiwyg compatible with IMCE
IMCE CCK
Pathauto
Create Quota
ImageCache (Optional)
ImageApi (Optional)
Filefield Paths (Optional)
Functionality & End User Experience:
Users with proper permissions can "ADD" image upload capabilities to their profile/account
This capability could be sold for userpoints or money using ubercart or e-commerce.
(This means per user "enhancements" without changing roles).
All images uploaded in 1 place, all images can be displayed on the same page as the uploader as file list, gallery, view, or slideshow. Can be used as a field in other content types (just like imagefield, without needing to upload again, you can just choose from those uploaded through the "uploader")
Setup:
Create Content Type: "Image Uploader"
- Set Creation quota to 1 (they only need 1 image uploader, thus 1 node)
You can remove the body field if you like.
Add an imagefield
- Put in some clear help text.
- Set to "NOT required" (incase they don't want to upload an image when they add the uploader).
- Set to "allow multiple", Limit 0 (Don't set a limit... unless you want to... $$ <- see note at bottom)
- Set File Upload Path to {uid}/ (or something that is unique to author/user. I SUGGEST the UID as it is always unique without questionable characters, but any of the user based options with -raw should work fine as well)
Save it: (Congrads you've now created an uploader "enhancement".
In path auto set the "image uploader" content type to show up under the user account for simplicity. example: user/%/{title-raw}
-----------------------------------------------------------------------------------------
Wysiwyg Use:
Set up your wysiwyg editor of choice (with imce support).
In IMCE settings
- set the access path to the same you used for the "uploader" ie: {uid}/u
- make sure to restrict to that folder and sub-folders, you can allow them to create new folders if you like.
- I suggest turning off uploads here, if a user uploads here, those images will not run through imagecache, and will not be added to the uploader set of images.
------------------------------------------------------------------------------------------
Image as Node Use:
If your like me and like making galleries with imagefield, views and cck, you'll probably be wondering how this works with that.
Well that's where a great module called Imce CCK Image comes in.
Create yourself another content type of your choice and slip that imce cck image field in there, and now you can select from any image in the uploader.
Save the node, and it works just like a node made with an imageuploaded via imagefield (*note here, the image chosen has already passed through image cache, so it will not go again).
-------------------------------------------------------------------------------------------
Now to allow a user to create an uploader give them a link to node/add/uploadertype and you're set.
I would suggest when they've added an uploader, have the menu item change to "Upload Image" and link to the
$$ -> technically you could create uploaders with different limits, thus allowing users to buy "10 images, 50 images, 100 images, etc"
This idea is extendible however you wish and using filefield you can make upload enhancements restricted however you wish.
Think: Image Uploader, Video Uploader, PDF Uploader.... all sold as seperate access without the user changing roles. All media uploaded through 1 interface, each to their own path accessible only by the uploader.
I spent alot of time on this idea, sorry that I did not go into extreme details, this is my first tutorial and it is for a completely new concept that even I am still building on.
I'm interested to see what other type of "interfaces", "enhancements" users can come up with.
In a drupal world where everything seems to be becoming a node, this gives a happy medium between images as nodes and images as files, and doesn't confuse the end user.
Let me know how you extend this, and your thoughts on the approach...
