From Fedora Project Wiki

(Fix markup again)
(Some text cleanup)
Line 3: Line 3:
----
----


==What is Features?==
== What is the Features module? ==


We are using [http://drupal.org/project/features Features module]. We can build custom features with this module because "no need to programming, just click-click and done". We can organize the each part of our Insight page into one or more feature like a custom module. So I would suggest that, create a few new features like "Super Event Calendar".
The [http://drupal.org/project/features Features module] allows us to build custom features that don't involve programming by hand. We can organize the each part of our Insight page into one or more feature like a custom module. For instance, we could create a new feature like a "Super Event Calendar."


==How to do this? What is a workflow?==
== How does this work? ==


That is a good question. We have to figure it out how to do this easily. I suggest that we put our features into a git repository like Insight repository, which contains our features, for example "Super Event Calendar", "Awesome Podcast System".
A Feature itself (with a capital "F") is constructed out of exportables created by existing modules that the Features module understands (either intrinsically or because those modules support the Features API). This sounds a lot more complicated than it is.


We have to complete this section, have to speak about this. --[[User:Asrob|Asrob]] 18:01, 11 May 2011 (UTC)
For example, imagine that you want to create a capability on the Drupal 6 server that involves a few custom Views, and perhaps some custom CCK fields. You can gather these customizations (let's call them "exportables" here) together and give that collection a name using the Features module.  The Features module creates a set of custom code, which it can then ''export as a module''.  The code can then be managed through a SCM repository, allowing for change management.


==How to use Features?==
== How do you use Features? ==
 
Need to review this! --[[User:Asrob|Asrob]] 19:17, 11 May 2011 (UTC)


In general:
# Download the Features module from http://drupal.org/project/features
# Download the Features module from http://drupal.org/project/features
# Enable the module on http://example-domain/admin/build/modules page.
# Enable the module on http://example-domain/admin/build/modules page.
Line 22: Line 21:
# Create a custom feature on http://example-domain/admin/build/features/create page.
# Create a custom feature on http://example-domain/admin/build/features/create page.


If you want to create a custom super feature, you have to click _create feature_ link at the top on the create feature page, see step 4.
To create a custom super feature, click ''Create feature'' at the top on the create feature page. Fill out the requirements (Name, Description, Version) as desired, then select settings in the ''Edit components'' section. When finished, select ''Download feature''.
 
Fill those requirements(Name, Description, Version) as you like it, then select those settings at the _Edit components_ part. If you have done with this, just click the _Download feature_ button.
 
After this process, just upload your custom feature on the server into the "sites/all/modules" directory.


When you created a custom feature and you would like to use it, then you have to go on Features page, see step 3.
After this process, you can upload your custom feature on the server into the ''sites/all/modules'' directory.


If you want to enable a custom feature, you have to click a checkbox of the selected custom feature then click _save settings_ button.
To use a custom feature you've created, visit the Features page, select the checkbox for that selected custom feature, and select ''Save settings''.


==Using GIT with Features==
==Using Git with Features==


<ol><li>Clone our Features repository
<ol><li>Clone our Features repository

Revision as of 23:55, 17 May 2011

Important.png
This is a draft.

What is the Features module?

The Features module allows us to build custom features that don't involve programming by hand. We can organize the each part of our Insight page into one or more feature like a custom module. For instance, we could create a new feature like a "Super Event Calendar."

How does this work?

A Feature itself (with a capital "F") is constructed out of exportables created by existing modules that the Features module understands (either intrinsically or because those modules support the Features API). This sounds a lot more complicated than it is.

For example, imagine that you want to create a capability on the Drupal 6 server that involves a few custom Views, and perhaps some custom CCK fields. You can gather these customizations (let's call them "exportables" here) together and give that collection a name using the Features module. The Features module creates a set of custom code, which it can then export as a module. The code can then be managed through a SCM repository, allowing for change management.

How do you use Features?

In general:

  1. Download the Features module from http://drupal.org/project/features
  2. Enable the module on http://example-domain/admin/build/modules page.
  3. Manage the features on http://example-domain/admin/build/features page.
  4. Create a custom feature on http://example-domain/admin/build/features/create page.

To create a custom super feature, click Create feature at the top on the create feature page. Fill out the requirements (Name, Description, Version) as desired, then select settings in the Edit components section. When finished, select Download feature.

After this process, you can upload your custom feature on the server into the sites/all/modules directory.

To use a custom feature you've created, visit the Features page, select the checkbox for that selected custom feature, and select Save settings.

Using Git with Features

  1. Clone our Features repository
    git clone ssh://git.fedorahosted.org/git/fedora-insight-features.git
  2. Make a new branch for your work
    git checkout -b my-new-feature
  3. Change the directory
    cd fedora-insight-features
  4. Make a new directory
    mkdir my_awesome_feature
  5. Copy your feature files
    cp path/to/my/feature/* ./my_awesome_feature/
  6. Add the directory of feature
    git add my_awesome_feature/
  7. Commit your changes
    git commit -a -m "My awesome feature has been added"
  8. Push your changes
    git push ssh://git.fedorahosted.org/git/fedora-insight-features.git/ devel
    Note.png
    Use devel branch for pushing
    We use a different branch for the production status. Features under development are not pushed directly to that branch without being tested and approved by the team in some fashion.