Adding Fields With CCK
This video shows how to add extra fields to existing content types (such as blog posts) using the Content Construction Kit (CCK) module in Drupal 6.
- learnbythedrop's blog
- Login to post comments
- 52695 reads
Thank you for visiting Learn By The Drop. Since this site is no longer being updated it's important to let you know that comments are closed and contact form submissions will not be answered. Please feel free to enjoy the content that is here for as long as it is valid.
This video shows how to add extra fields to existing content types (such as blog posts) using the Content Construction Kit (CCK) module in Drupal 6.
Comments
text next to videos
How can i put text on the left(or right) of the video, without using tables? I can use a simple table with one line and two rows, but in the table menu, you can't take out the outlines of the table and i want content to be added by non-programmers, so i'm asking a way to do this without the need for users to mess around with code.
Thank you and continue with the good work.
Great Screen Cast
Great Screen Cast, but everything is left justified. If I add an extra field, how can I set it so that it appears in the middle or to the right of the page for example?
Thanks, keep up the good work.
Theming CCK Fields
You can theme content types using a variety of methods. A popular method is to use the Contemplate module. I suggest that you check out http://drupal.org/project/contemplate.
The embed code never appears.
The embed code never appears.
I have embeded the code which
I have embeded the code which I know works as i'm tried it on simple html.
But on the page I just see the embeded text no movie.
Do I need a patch or anything? what am i missing?
Embedding Video
I assume that you're trying to embed this video. Is that right? It all depends what type of editor you are using and what the input format is. For Drupal you should be using the full html format and you should not be using a rich text editor since rich text editors just wipe out the embed code. The embedded media field module is a good choice for making video embeds very easy within Drupal. http://drupal.org/project/emfield
embedding video
Hmm still can't see it.
I can see a picture of puzzle in the embed code and have this code in the source.
I know the video is in the right place as I also use the download video URL the same.
I downloaded the emfield but don't see how that is required to play through windows media player. Sorry I feel I'm missing something really stupid but can't see it.
I can“t see the videos
I have explorer and see the video interface but it wont start
It's either a browser version
It's either a browser version or QuickTime version issue. Upgrading to the latest version of QuickTime should help.
Can I use this in teasers?
Is there any way I could use embedded videos in teaser view? I want to scale down videos for teasers and display them in normal size for full node view. How to do this?
Display CCK in Teaser
You can display an embedded video in the teaser. Using the "blog" content type as an example. If you add a field to that content type for storing an embed code, you can then go to /admin/content/node-type/blog/display/basic and select whether or not you want that field to display in the teaser or not.
How are CCK fields stored?
Hi there :)
I'm just wondering if you know how CCK fields are stored? I'm editing the input fields of a module (Biblio) and am trying to figure out if Biblio is updated (for example) if the CCK fields will just disappear, or are they stored with the particular content type etc? Also, is there some way of searching by newly created CCK fields?
Thank you for making your videos :) They've helped me many times :)
cheers,
Josh
Storing CCK Fields
CCK fields are always related to a content type. So step 1 is to select the content type you want to add to or create a new content type. Then you would engage in the process of adding different types of fields, like and image field, a url field or a date field to name a few. Those fields are essentially placeholders for content. While the specific field types may have restrictions as to the type of content place in them you will also choose whether or not they are required and whether or not the field can have multiple values to name two choices. The fields you add should only disappear if you specifically choose to either delete them or delete the whole content type. I'm not sure what you mean by searching CCK fields. I usually manage the fields one content type at a time.
I just want to say a hearty -
I just want to say a hearty - THANK YOU! - Man, I wish I could sit down with you for one afternoon, and have you teach me some things. I appreciate your videos a LOT - but I could use you to slow-down a bit. I'm not as knowledgeable as most of your viewers, more a 'newbie', and you cover so much as though we should already know all of this - HOWEVER - THANK YOU!!! I appreciate what you do!
God Bless!
Lee
I've created new fields, but
I've created new fields, but I just can see them, when I'm logged in.
What did I wrong?
CCK Fields
When you say you can't see them do you mean you can't see them when you're creating a node? Or do you mean that you can't see them after a node is published?
contemplate module
Hi... I want the user to have only specific fields while creating content. For example, while creating a book page my users see a lot of fields- title, menu, tags, body, input format, notifications, comments settings and blah blah... I've added the attach image/video/document field using cck. But I want to make it simple for them by having just a title, tag, body, book weight, attach image/video/document and language fields.I hear the contemplate module helps. But since I'm a newbie and a non-programmer, I can't understand how to use it. Would you include a video on working with the contemplate module? I
Controlling Fields Users See
Contemplate is for altering what people see after a node is published. What you want to do is alter the user permissions so that only certain fields are seen when they are publishing. To do that you first need to create a role specifically for publishers on your site. The default role for people signed in is "authenticated user." The permissions you're interested in are the ones in the "node module" section. If you uncheck "administer nodes" then the users will not see all the node admin stuff. They will still be able to see CCK fields you add to the submission form if you grant those users permissions in the "content_permissions module" section.
Controlling fields users see
Thanks.. its working... and now, contemplate module also seems fascinating :) could you help me understand it? would you include a video on that?
'Word' Style Interface
This may be a very dumb question, but where can I find a module that will give me that 'Word' style interface you have on your body field in the video? This is what I badly need for my users, they will weep with recognition.
WYSIWYG
That's called a What You See Is What You Get (WYSIWYG) editor. Please see http://learnbythedrop.com/drop/144.
separate the embed_code from the video content
This was my first video on learn by the drop and I'm certain I will see more. Huge thanks for sharing !
The question I pose myself is how can I separate the presentation from the content. Currently in the embed_code both the video URI and code to display that video is in the same field. The URI is even duplicated into the download field. This does seem like the best design in my opinion.
Ideally I would be able to only provide the video URI (uploaded somewhere. The presentation details should be separated out I think. In case I want a different embedded player, I would not have to change each embedded code on each page.
Likely a totally different subject:
How could one best propose different delivery methods depending on the client and for instance the availability or not of Flash on the client.
Presenting Embedded Video
When you ask, "...how can I separate the presentation from the content." I'm not exactly what you are trying to do. In this cased we have a link (or URI) to download a QuickTime video file and also an embed code that will display a flash player that is designed for viewing in the browser. Since I enter the embed code each time I create a post I can have a different flash player every time I write a post. So in my mind it seems to me that I've showed a way to do what you're asking. Perhaps you could clarify in a reply.
The second question is quite complicated because it requires you to have two copies of the video file on the server. And you need a player that can enforce a set of rules which will allow it to use one media type or the other. That's something a little too complicated for me to offer much advice on. Since something like 98% of browsers support flash it shouldn't really be a problem. Perhaps the easiest way to solve it is to offer a Quicktime download link as I do so that people can click on that if the flash player doesn't load.
separate the presentation from the content
Hi Rob,
The same video is presented in 3 ways in the node:
1 : Flash
2 : Download as low quality quicktime
3 : Pay and download in high quality
I'm new to Drupal, so I don't know what is possible, but ideally I would only have to provide the high quality movie as input and let Drupal figure out all the rest, including the creation of a low quality movie file and cache it somewhere on the filesystem. The definition of the default player(s), flash, java, activeX and their default values (e.g. size) should be centralized, but with possibility to override these settings on each post. If I have a site with hundreds of video posts, and suddenly there is an issue (e.g. security) with the flashplayer, I only need to change the embed code in one place instead of changing those hundreds individual nodes. This is what I call "separation of presentation from the content".
Many photo sharing sites use such architecture: one only uploads the full size pictures, the thumbnails are generated on demand and the settings of their size defined in the presentation preferences, and at each upload of a picture (in each node). Changing the size of the thumbnails or quality on a photo library would otherwise require editing each picture's setting individually (potentially millions).
I hope this explains my question better. And please, remember I'm quite new to Drupal.
Thanks for the sharing !
Peter
Drupal and Video
I think that it's important to separate functions that a system like Drupal can handle from those that require a different program altogether. In general, Drupal is not the best choice for something like encoding media using complex rules. Because while Drupal is a content management system it is not a media processing application. So modules, like ImageCache for example, can perform basic processing on images. But when you start talking about processing video then you need a lot more intelligence and processing power.
There are modules that offer options for transcoding though. They usually require either another server side program like FFMPEG or a connection to a 3rd party service that charges you to process video. The level of integration and customization varies. If you haven't already you should take a look at the following three modules to see if they might offer what you're looking for.
http://drupal.org/project/flashvideo
http://drupal.org/project/bd_video
http://drupal.org/project/kaltura
Re: Drupal and Video
I am in the process of choosing a platform to build a referrer social site. What do you mean by 'processing video'.
If we host the video - what considerations should we take? If we go with a third party service like vimeo.com, youtube.com or one that charges, what consideration would you recommend we consider?
Thanks, JP
Re: Drupal and Video
The phrase "processing video" refers to the conversion from your uploaded format (like Windows Media or Quicktime) to a format that is easily streamed and embedded such as Flash. In the future HTML 5 should allow automatic embedding and streaming but we're not there yet. If you have the money and or technical expertise you can invest in a video hosting and processing server that is separate from Drupal. If you're on a tight budget and don't have a web video expert on your team then I recommend using a 3rd party service. Which one you use depends on who will be uploading the videos. If the "commununity" will be uploading you'll want to look at something like Kaltura. If your editors will be doing the uploading then Blip.tv, Youtube or Vimeo would work.
Use field in body?
How can I reference the custom CCK fields in the body? Say I created a CCK field "nickname" and I want to be able to reference that in multiple spots in the body.
For example how would I do something like the following if I created a CCK field called "nickname":
----------
People call me $nickname. $nickname is kind of cheesy but I like people saying "Hey $nickname"......
Signed $nickname
----------
Thanks for the killer tutorials!
Referencing CCK Fields
You might be able to do this with the Token module. http://drupal.org/project/token Token will allow you to reference a particular CCK field that you have created. I'm not sure if it works fully for the node body yet though. There is a discussion in the Token issue queue that might be helpful. Another approach would be to use the Contemplate module (http://drupal.org/project/contemplate) which would allow you to enter the text into a template for the field and include a php print comment that would create the dynamic portion of the sentence. See Drupal.org (http://drupal.org/handbook/customization/php-snippets) for more info on using code snippets.
Re: Adding Fields With CCK
Hi learnbythedrop,
Like Keith. I too want to display certain CCK fields in the body after the content is created.
The fields would be
File Upload:(file_field) --> field_filefield
Platform:(Hierarchy Select) --> field_platform
Model:(Hierarchy Select) --> field_platform
Submit(button) --> button code invoking a script
I installed token. Then what needs to be done. Can you please stress more on it clearly.
Using CCK with Taxonomy
Sorry if this question is too basic. I'm building a site with six categories of content: people, places, things, etc. Each category will have a menu and 6-12 sub-categories (types of people, places, etc.) The resulting database will be quite large with profiles and posts.
I'm having difficulty determining the plan of attack. My initial impression was to create the categories and sub-cats with taxonomy and use them in CCK fields with the custom fields for each type of profile. Is this the best approach and will it require the Content Taxonomy module? Just don't want to overlook anything basic. Any recommendations would be greatly appreciated!
Re: Using CCK with Taxonomy
I always say that the best plan of attack is to have a plan of attack. :) So I think you're off to a good start. I may have told you via email that I'm not familiar with Content Taxonomy but it might work for you. I always recommend doing a small experiment to see if something will work for you prior to going live with it. If you go the straight taxonomy route I recommend planning it out in a spreadsheet or document outline. Also, if you have an extensive list of categories consider trying out the Taxonomy Manager module. http://drupal.org/project/taxonomy_manager
How to create a review form
Hi There,
First of all thanks for having such a helpful video on adding fields with CCK. Great job !!
I'm new to Drupal and am developing a site for books. Now, my client wants one feature like his visitor (mostly students) should be able to submit their reviews and they don't need to log in before submitting their reviews. Am using UberCart module to add products (books information), I have also CCK moudle installed. But, I could not find the way to do this task. I want to allow visitors to submit their reviews when they see the Bookk's Information page and then have to display list of all the reviews submitted by visitors on a specific page sorted date wise.
Could you please suggest me what steps need to take in order to complete this "Review" feature for books.
Thanks in advance !!
Cheers,
Vickyb
Re: How to create a review form
I think that you want something like a node that is associated with the book. Seems like you would need some custom version of comments. Take a look at the node comments module. http://drupal.org/project/nodecomment
Re: Adding Fields With CCK
LBTD,
I know that this is not related, but I have been having problems getting a cck module to work correctly, and was hoping to find some help.
I have a subsonic server setup, and would like to try and get it in an iframe in drupal.
I have tried several modules to try and get this to work, and it almost works. If you open the page, you will see the frame load quickly, then switch to it as though it were a clicked link.
Not sure if you can help me out.
Thanks,
onoitsono
Re: Adding Fields With CCK
I don't know about a subsonic server. I do know that if you want an iframe to work within a CCK field you may need to adjust your input format for that field to Full HTML. See more about input formats in Drupal at http://learnbythedrop.com/drop/78.
Re: Adding Fields With CCK
This maybe a quick solution using conditional fields, just am not able to apply enough brains. Below is a scenario I'm stuck at:
I'm creating a website which gives certificates (renewed every year) to members. So I'm creating structure like this below:
1. Certificate type: Dropdown list with 4 values (Cert A, Cert B, Cert C, Cert D)
2. I need to ask for valid date range (From and To) for each certificate. (This range is controlled by Certificate Type)
Requirement: Users can apply for all 1 or 4 certificates or can leave blank if not applying for certificates. So after 1st certificate is created, I need an option so that user can add another certificate with a new date range.
I tried to explain best I could. If there are any questions, I'll respond immediately. I am sure this might be simple, I'm just missing something.
Re: Adding Fields With CCK
That's a little to complicated for me at the moment. I wish you luck in getting the process worked out though.
Re: Adding Fields With CCK
Thank you so much for making these videos. You help people like me understand things in a much better way!
After a 2-week crash course in Drupal 6, Views 2, embedding videos and images, lightboxes, taxonomy and more (with success), I am now on the cusp of "Tokens." And I need them, especially for using in-text & building URLs! Now, I stare blankly at the screen and read the documentation in despair. After watching this great video on creating fields with CCK, I wonder if you would have the time to go a step further and simply walk through creating a token for a portion of the the CCK field you created for the "purchase" link. Applied here in the spirit of URL building might be:
http://yoursite.com/shop/product/node/49
or with token:
[partial_purchase_link]/node/49
A short video would be a Godsend to fill in the blanks of misunderstanding :)
Re: Adding Fields With CCK
I definitely don't claim to be a token expert so I'm afraid I don't have too much info to offer you on the subject. My understanding is that tokens are made available by different modules for use in creating urls. Tokens (or Replacement patterns) are used to create url aliases at admin/build/path/pathauto. That's where I've used them the most. I've also used tokens in Views when creating links. For example, when adding a Node: Title field to a view you get the option to Rewrite the output of this field and if you select that option then the possible replacement tokens are listed. It sounds like you need to use that particular feature to get where you're trying to go.
I can't guide any further than that because I don't fully understand the outcome that you're seeking to achieve. What is the purpose of the "partial purchase" link?
Re: Adding Fields With CCK
Certificate type: Dropdown list with 4 values (Cert A, Cert B, Cert C, Cert.I need to ask for valid date range (From and To) for each certificate. (This range is controlled by Certificate Type)
I tried to explain best I could. If there are any questions, I'll respond immediately. I am sure this might be simple, I'm just missing something.
Re: Adding Fields With CCK
I have two problems I'm facing.
I'm using Drupal 6.2, with CCK 6.x-2.9.
I am trying do an addition field on my content type file_download called Genre. It isn't showing.
The second problem I am having is I want it to be a required check box, with six options; Action Games, Adventure Games, Role Playing Games, Simulation Games, Strategy Games, and Miscellaneous Items.
Am I missing where an explanation of this is?
Re: Adding Fields With CCK
When does the field not appear: on the publishing form or on the published node?
Re: Adding Fields With CCK
Hello, I am trying to get an IFrame into my page, and I have moved CCK and Iframe over into the sites modules, and I have enabled them there. I added a new type of content type and added Iframe to that as a new field. It doesn't show up in my edit tab of the node. I also installed Wysiwyg and enabled it, and it doesn't show in the edit tab of the node either. I don't know if this is because I am working in a newer version of Drupal than is in your videos, or because I am working in a theme or what. Thanks a lot, Mary