Saturday, December 4, 2010

Creating Content

After your site is up and running, it is time to add content to your site.
At this point, you might want to read The 11 Most Important Things To Do After You Install Drupal.

Content types

A content type defines the way in which content is collected and displayed. Content types are a container for all content with the same characteristics (e.g. a "Bio" might contain different kinds of information than an "Event"). Some fields are part of all content types (e.g., basic data such as a title, date, and author). Some modules create their own content types and some don't. Those that do can have unique fields defined in their content type (e.g., the Location module adds fields such as city, country, longitude, and latitude). Additional custom fields of many kinds can be added using the CCK module. Content types have settings that can be modified by editing the content type and managing the fields.

Examples of content types provided by core Drupal modules: 

Page

A page is a simple method for creating and displaying information that rarely changes, such as an "About us" section of a website. By default, a page entry does not allow visitor comments and is not featured on the site's initial home page.

Story

A story, similar in form to a page, is ideal for creating and displaying content that informs or engages website visitors. Press releases, site announcements, and informal blog-like entries may all be created with a story entry. By default, a story entry is automatically featured on the site's initial home page, and provides the ability to post comments.

Examples of content types provided by non-core (contributed) Drupal modules:

Webform

Create a new form or questionnaire accessible to users. Submission results and statistics are recorded and accessible to privileged users.

Image

An image (with thumbnail or other sizes). This is good for photos, art work or screen shots.

Create your own content type

You can define a content type to exactly meet your information needs. The easiest way is to start with a page. As you create your content, think about the menu as well. Another handbook section you may find useful is Creating new content.

Creating content

To create content: click Content management > Create content, then select the content type you want to create. There are usually one or more fields within each content type. We are providing an example of a page.
  • Title and Body fields are found in many content types. The Title is used by Drupal to create the page URL. Keep it concise.
  • Body is where you put the text for the page. "Input format" controls what code can go in the Body field. There are three (core) options: filtered HTML, PHP code, and full HTML. CCK allows you to change the name of this field; for example, you might call it "Product description."
  • Use the log message to provide information that might be useful to other authors who may edit your document later, or provide your rationale for making edits to your own or other people's content. The log message is not visible to users without the appropriate content editing rights.
  • Menu settings are used only if you are making this piece of content an item in one of your menus. It's the most efficient way to create menus. Another handbook section you may find useful is Working with the Menu.
  • Comment settings are probably best set at the site level (click Content management > Comments > Settings), but can be specified for an individual piece of content.
  • You can attach files to many content types. The "Upload" module must be enabled, and then the content type has to be set to allow this.
  • If you enabled the Path core module or added PathAuto, you'll have URL path settings next. You can enter a "normal" name here rather than being required to use "node/2" when you refer to it later on. PathAuto will automatically create a URL based on your page title.
  • Authoring sets the time stamp and creator information. The other use for this section is to control the page or story order when they are based on the time and date it was created.
  • Publishing options: only "Published" items show up on the website. You can also promote content to the front page and make the content item sticky to the top of lists.
The final step is to preview your content and to Submit your page.

For more information about Drupal Development, Drupal Expert, Drupal Developer and Drupal Programmer visit at http://www.dckap.com

Source: http://drupal.org/node/120635

Friday, December 3, 2010

Zend Studio Configuration for CVS

Configuring Zend Studio for Eclipse for Drupal CVS CLICK HERE

Configuring Zend Studio for Drupal CVS

First we need to configure Zend studio to work with CVS. For this document I am referencing Zend Studio Enterprize 5.5.0

Tools -> Preferences -> Source Control
  • Path to CVS should be something like:
    C:\Program Files\Zend\ZendStudio-5.5.0\bin\SourceControl\cvs\cvs.exe
  • CVS_RSH Environment Variable can be 'ssh' if you want to operate securely, or blank should be fine
  • set other options as desired
To CHECKOUT code (get code from the Drupal CVS repository)

Tools -> CVS -> Checkout
  • CVS Root for contrib: :pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal-contrib
  • CVS Root for Drupal: :pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal
  • Module Name: something like contributions/modules/module_name
  • Working Directory: Browse to the directory you want to hold the checked out files and directories
  • Revision: set to STICKY TAG from cvs.drupal.org
To COMMIT code
  • You must use a Drupal CVS username/pass instead of anonymous:anonymous above
  • CVS commands are only available from the Project space, so you must create a new project: Project -> New Project
  • Enter a Project Name
  • Click Next and Add Path to select your working directory
  • Click Finish
  • Now from the project tab you should see your working directory
  • CVS commands are now available by right clicking a file in the project window and going to the CVS menu
For more information about Drupal Development, Drupal Expert, Drupal Developer and Drupal Programmer visit at http://www.dckap.com

Source: http://drupal.org/node/216096

Thursday, December 2, 2010

Working with content types and fields (Drupal 6 and earlier)

The Content Construction Kit allows you to add custom fields to custom content types using a web interface. In Drupal 5.x, custom content types can be created in Drupal core, and the Content Construction Kit allows you to add custom fields to any content type. In Drupal 7 and later, most of the functionality of CCK has been absorbed into Drupal core. For more information on fields in core, see Working with Fields (Drupal 7 and later)
Documentation and instructions are available in the separate CCK Handbook.

Summary and purpose of CCK?

Drupal comes with core content types like story and blog. For such a content type, go to 'Create content' and submit a new story or blog. That's sufficient for pages of pure text and with or without attachments.
But what if your users want to be able to submit reviews of their favorite aardvark? That would be a new content type, but I want to be able to display other stuff as well as a chunk of text for every node of that type, and I don't want it to be just attached file links.
My options: I could hack the story.module, OR I could see if someone has already created an aardvark.module for the exact type of content I want, OR using CCK I could create a new content type called Aardvark Review.
Using CCK, I can create a content type that has exactly the fields I need, no more or less. My Aardvark Review for instance might have:
  • text field (comments on the aardvark)
  • dropdown menu (aardvark color)
  • audio file (recording of the aardvark's grunting)
  • image (photo of aardvark)
The CCK admin interface for creating these new content types is nice and easy: just create your new type and then click through, adding the type of fields you want it to have and what their parameters will be (how much text for the review? which colors in the dropdown menu?). There are many add-ons available in the downloads section under CCK that add new kinds of fields to your options (video field, audio field, calculated values and vastly more complicated ones).
From the users' perspective, they'll just click on Create content > Aardvark Review and get a form that asks them to submit their review, the aardvark's color, a recording, and picture.

For more information about Drupal Development, Drupal Expert, Drupal Developer and Drupal Programmer visit at http://www.dckap.com

Source: http://drupal.org/handbook/modules/cck

Wednesday, December 1, 2010

Decisions: Advanced Voting and Decision-making

Decisions allows for several different types of advanced voting methods.

Simple Plurality
The most common voting method is Simple Plurality, where each voter gets to make one choice, and the candidate with the most votes wins.

Approval
Approval Voting is a system where voters can give a yes or no vote for each candidate on the ballot. The winner is the candidate with the most approval votes. So if you like 2 out of 3 candidates, then you vote for 2 out of 3 candidates.

Ranked Choice - Instant-Runoff
In Ranked Choice Voting, voters can select candidates in order, by ranking their choices as first, second, third, etc. One type of Ranked Choice Voting is Instant-Runoff. The idea is that when votes are being counted, you gradually drop out the candidates with the least votes until there is one candidate with a majority of votes. If your first candidate is dropped out because of too few votes, then your ballot goes to your second choice. You can vote for multiple candidates in the order you prefer, and don't have to worry that you might accidentally help elect your least favorite candidate.

Ranked Choice - Borda Count
Another type of Ranked Choice Voting is Borda Count, where a certain number of points are awarded to the candidates based on voters' ranking preferences.

Ranked Choice - Condorcet
You can also do Condorcet style Ranked Choice Voting. The main point here is that the winner is determined by seeing which candidate performs best in heads-up matchups against the other candidates.
Because of all the advanced voting options, Decisions is an awesome tool for group decision-making. See also Advanced Voting with the Decisions Drupal Module.

For more information about Drupal Development, Drupal Expert, Drupal Developer and Drupal Programmer visit at http://www.dckap.com

Source: http://drupal.org/node/985692