I had an idea for my site, and I'm wondering on the process to (attempt) to implement it. In theory it seems easy, but...I'm a drupal novice...
When posting content to my site, I'd like a new drop down box, right next to the category pulldown, with 3 options in it: "Explicit", "Spoilers", and "Both". The user select whatever is appropriate for their post.
Now on the frontpage in the teaser listings, depending on what was selected in the drop down box, a small "explicit language" graphic or "spoiler" graphic will be seen right next to the title of the node.
It seems like it would be easy, perhaps a few lines of code here and there, (or an all-in-wonder module that I didn't find) but I don't know much of the programming side of drupal at all yet.
Thanks for any insight!
-Ben
Comments
I know I can find a way to
I know I can find a way to override the posting content pages, perhaps using cck fields and views? Perhaps? I'm not at all sure about how I could make a the corresponding graphics appear on the teaser titles though.
Can anyone lend a possible
Can anyone lend a possible solution, even if in theory?
Re: Check out the API docs
I don't know about a module that might make this easy. It sounds like something that would have some general interest but I'd guess you'd have gotten a response by now if there was a two minute approach.
I'm also new to Drupal. So, here's a grain of salt. And: if you might want to roll your own, have a look at api.drupal.org, the "node_example" module. That walks you through defining extra columns to associate with nodes, and shows you how to display them. I don't know about getting a graphic in, but it might be as easy as throwing the html tags into the hook_view function.
Basically, as I'd parse the problem, you'd create a table by hand in your database with two columns, the node id and the "rating". Then you'd write a new module (that you'd copy/modify from the node_example.module), which would let users select the rating from a dropdown list (there is an example of a dropdown list under the hook_form documentation). Then you'd figure out how to show the graphix, which might be no more than a switch statement and throw in the html to pull up the picture.
The example is at:
http://api.drupal.org/api/file/developer/examples/node_example.module/5
Explainfields
Thank you for the response!
I actually started messing around with cck modules, and I found one that comes really close to what I want
Explainfield module for cck, allows me to put up the warnings and have em post in the article however; there is no way to disable the text field rollout, because a trigger value is required. So, for now I'm forced to have an "Other Warnings" checkbox that users can use to describe what they want to warn about. Also, no clue on outputting a small graphic in place of the words.
I looked 5 times though the cck modules; does anyone know of a simple cck field module to create a couple check boxes, and it displays the values after submitting?
*As a couple of side notes, is there a universal command in the .module that I can use to display the values horizontally rather than vertically? In addition, what am I looking to edit to place the custom values after the title rather than below the catogory/author/time submitted line in a published article?