CVS edit link for eatsleepdev
Hi,
I'm working on a module that allows users to "favorite" ("collect", "save", etc) media uploaded through cck filefields, and view all of the saved items in one place (views integration).
I looked around and didn't see any other module that could do this. The flag module is great, but it only allows the flagging of nodes, which is a problem when there are multiple media items on one page.
I'm an experienced web developer that just got into Drupal about 6 months ago. This is the only module I've planned so far, but I'm sure there will be more later on.
Thanks,
Michael
Comments
Comment #1
eatsleepdev commentedAttached is the module that I'm working on.
It doesn't work right now, but you can at least see my code and what I'm going for.
Comment #2
eatsleepdev commentedHere is an updated version that can now add/delete data from the database.
Comment #3
avpadernoHello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review the code, pointing out what it needs to be changed.
As per requirements, the motivation message should be expanded to contain more features of the proposed project. For themes, it should include also a screenshot of the theme, and (when possible) a link to a working demo site using the proposed theme; for modules, it should include also a comparison with the existing solutions.
Comment #4
eatsleepdev commentedThanks Alberto.
The purpose of this module is to allow users to favorite media that they would like to look back at later. I've looked around for possible solutions, and haven't been able to find any. The Flag module comes very close, but would only work for sites where each image/video/audio has its own node (flickr). For example, if you have a slideshow on a blog post and you'd like to favorite one image, the flag module doesn't work.
Let me walk you through it...
1. The install file sets up the database field for storing the file info
2. A variable is created to store "allowed content types"
3. The developer accesses the admin section, selects the allowed content types. If none is selected, it defaults to "page"
4. The function to generate "favorite links" needs to be set up manually in the template files. Below is an example:
OR you could do something like:
How the developer handles this is up to them. Obviously, the file fields will have to be set to hidden in the content type display field area.
5. This function will check to see if the user is logged in, then checks to see if the content type is allowed
6. If all is well, data is collected about the file and the database is queried to see if its been saved yet.
7. The correct link (remove or collect) is outputted for the user to click
8. Clicking the link queries the database, inserts or deletes data, and the current page is refreshed with an update link and message to let the user know what just happened ("Media saved to your favorites")
Features that will be added:
1. The link should be able to submit data via ajax
2. There should be an admin section to display save counts to the admin (eg: 20 users saves this specific file from node #)
3. I'm working on views integration so that the data can easily be manipulated / sorted / styled
4. I would like to make generating the links automatic for users that don't want to mess around with the code too much. Still working on a good solution for this.
I'm open to suggestions about other features. This module isn't anywhere near complete right now. I just wanted to get started, get a cvs account set up, and maybe get some feedback to help me get this to a point where its usable for most people that need the functionality.
Thanks for your time. I hope you can approve my application as I think this module would be useful to some people.
Comment #5
avpadernoComment #6
eatsleepdev commentedThe code has been updated a bit. Now works with ajax.
http://github.com/eatsleepdev/cckmediacollection for the latest
Comment #7
avpadernot().Why isn't the code using
l()?Comment #8
avpadernoI am closing this application due to lack of replies.
Comment #9
avpadernoPlease read the following links as this is very important information about CVS applications.