| 1 |
/**
|
| 2 |
* $Id:$
|
| 3 |
* @package CCK_Taxonomy_SSU
|
| 4 |
* @category NeighborForge
|
| 5 |
*/
|
| 6 |
This module adds the ability to have several different membership types, each collecting different
|
| 7 |
data from the user for registration by using custom content types and the combination of nodeprofile
|
| 8 |
and pageroute modules. The accounttypes module is recommended but not required.
|
| 9 |
|
| 10 |
--CONTENTS--
|
| 11 |
REQUIREMENTS
|
| 12 |
INSTALL/SETUP
|
| 13 |
FEATURES
|
| 14 |
USAGE (Example)
|
| 15 |
UNINSTALL
|
| 16 |
CREDITS
|
| 17 |
HELP
|
| 18 |
|
| 19 |
--REQUIREMENTS--
|
| 20 |
CCK - The CCK module must be installed and enabled. There are no submodule dependencies.
|
| 21 |
Taxonomy - The Core module Taxonomy must be installed and enabled as well.
|
| 22 |
|
| 23 |
--INSTALL/SETUP
|
| 24 |
Install this module through the standard Drupal means; copy the files to a folder in your modules
|
| 25 |
folder, then enable the module in the administration section of your site. CCK will construct the
|
| 26 |
required tables.
|
| 27 |
|
| 28 |
--FEATURES--
|
| 29 |
1) The primary feature is a hierarchical listing of your taxonomy with a checkbox next to each to allow
|
| 30 |
multiple selection.
|
| 31 |
2) Heirarchical freetagging (a first for Drupal). When this feature is enabled, each branch will have a
|
| 32 |
textfield where the user can enter in a new term. The page must be saved before the new term(s) become
|
| 33 |
available for selection.
|
| 34 |
3) Selection of branch terms. An option has been provided to allow users to select branch terms. This
|
| 35 |
is most important if you have allowed freetagging as terms that were once leaf terms may become branches.
|
| 36 |
Not allowing branch term selection would therefore leave some nodes with terms that are no longer leaf
|
| 37 |
terms and no way to later deselect them. Allowing branch term selection also implies that all child terms
|
| 38 |
apply, though how you might use that information in your module is beyond the scope of this module.
|
| 39 |
4) Hidden, CCK terms. Normally, the terms checked by the user will be stored only in a CCK-built table
|
| 40 |
for that purpose. This renders the terms invisible to the taxonomy module, though they will appear as
|
| 41 |
content in a list in the node itself.
|
| 42 |
5) Tags. An option is provided to include the selected terms as regular tags so the taxonomy module can
|
| 43 |
see them as well. This means the terms can be used just like other taxonomy tags and links will appear
|
| 44 |
at the bottom of nodes, etc.
|
| 45 |
6) Psuedo-alphabetized. I think there is an issue with the top-most level where leaf terms are mixed with
|
| 46 |
branch terms, but all children should follow the following behavior:
|
| 47 |
- Branch terms (if enabled as checkable) will be listed first and in bold letters.
|
| 48 |
- Leaf terms will be listed alphabetically after the parent branch term.
|
| 49 |
- Child branch terms will be listed after leaf terms and will be alphabetized themselves.
|
| 50 |
|
| 51 |
NOTE: Please take screen shots of any problems you see with the alphabetizing. The firefox plugin
|
| 52 |
ScreenGrab! is great and allows you to do entire pages (including what you'd have to scroll to see).
|
| 53 |
|
| 54 |
7) Ratings. You may allow users to rate the terms. You must use your imagination here. The ratings are tied
|
| 55 |
to the node, not the vocabulary. You can use the ratings as like/dislike, skill level, movie rating, or
|
| 56 |
whatever. This was designed for a specific use case, so if you don't need it, don't use it.
|
| 57 |
|
| 58 |
--USAGE--
|
| 59 |
1) You must first create a vocabulary in the usual way, via the categories administrative menu. Please see
|
| 60 |
the handbook at Drupal.org for more information. One thing to note that is REQUIRED at this point, you MUST
|
| 61 |
allow multiple values for the vocabulary!!! The reason is that the radio button side of this module is not
|
| 62 |
completely working, so single selections are not allowed and will throw error messages all over the place.
|
| 63 |
2) Once the vocabulary is made, do NOT associate it with the content types you want to use this module with
|
| 64 |
as this will simply enable the regular taxonomy interface. And since you are installing this module, you
|
| 65 |
don't want that. You can use the vocabulary with other content types however you wish.
|
| 66 |
3) Create or edit a content type with CCK. You must have the content module enabled.
|
| 67 |
4) Add a field to the content type. You will see a listing of "Taxonomy vocabulary (super select ultra)" as
|
| 68 |
a field type. Below it, you will see a list of the vocabularies you have defined. Yes, you can use any
|
| 69 |
vocabulary. So if you use vocabulary Aardvark in one content type in the usual way, you can also use the
|
| 70 |
same vocabulary in another content type with this module in any way you wish. Select one of the vocabs and
|
| 71 |
name the field. Then save it.
|
| 72 |
5) Notice on the settings page that the 'widget' is fixed. You must destroy and recreate a field in order to
|
| 73 |
change the vocabulary, so choose correctly the first time.
|
| 74 |
6) The other 'Widget settings' are standard. Adjust as you see fit.
|
| 75 |
7) Require the field or not, it's your choice.
|
| 76 |
8) Notice that the multiple values field is determined by the setting from your vocabulary. You SHOULD HAVE
|
| 77 |
allowed multiple values. See step 1 above for why.
|
| 78 |
9) "Display parent terms as selectable form items" is what feature 3 above is talking about. Use it as you
|
| 79 |
wish.
|
| 80 |
10) "Add used terms as node tags?" is what feature 5 above is talking about. Use it as you wish.
|
| 81 |
11) "Term ratings" is what feature 7 above is talking about. The selections have good descriptions, so fill
|
| 82 |
them out as you wish.
|
| 83 |
12) Save the settings.
|
| 84 |
13) Create a test node of that type to see it in action.
|
| 85 |
|
| 86 |
--UNINSTALL--
|
| 87 |
Deactivation and uninstallation are both done in the normal Drupal way.
|
| 88 |
|
| 89 |
--CREDITS--
|
| 90 |
This module was put together by Ryan Constantine (Drupal.org ID rconstantine) but was based on two other modules.
|
| 91 |
The first module this one is based on is cck_taxonomy. See that project's page for details on its authorship.
|
| 92 |
The second module this one is based on is taxonomy_super_select. Again, see that project's page for details.
|
| 93 |
This module's author added quite a lot, most particularly infinite depth for the vocabulary.
|
| 94 |
|
| 95 |
--HELP--
|
| 96 |
I bet you thought I was going to tell you how you can get help. Actually, I'm asking for help from you. I haven't
|
| 97 |
had time to get the radio button (single term selection) side of this module working yet. Any help there would be
|
| 98 |
great. Also, anyone interested in rethemeing this, please do and post your results. For example, the vertical
|
| 99 |
spacing between terms could probably be smaller so the whole taxonomy doesn't spread out so much. Also, "Parent"
|
| 100 |
and "Add a term" could probably be placed on the same line or otherwise more closely joined. The problem I had
|
| 101 |
there was the length of the description for the parent selector. Also with the themeing, perhaps nested branches
|
| 102 |
could alternate background colors or something, similar to table entries.
|
| 103 |
|
| 104 |
As for you getting help, post an issue to the issue queue per the regular Drupal way.
|