/[drupal]/contributions/modules/freelinking/freelinking_casetracker/README.txt
ViewVC logotype

Diff of /contributions/modules/freelinking/freelinking_casetracker/README.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1 by grayside, Tue Nov 24 08:10:34 2009 UTC revision 1.1.2.1 by grayside, Tue Nov 24 08:10:34 2009 UTC
# Line 0  Line 1 
1    # Freelinking for Case Tracker
2    $Id$
3    
4    This module provides a Freelinking 3 plugin for the [Case Tracker]
5    (http:drupal.org/project/casetracker) module. Freelinks should be of the form
6    `case:<nid>`. Optionally, you might use `case:#<nid>`. As default, that would
7    be [[#77]].
8    
9    They are transformed as follows:
10    
11    ## Plugin Output
12    Let's follow the output of two freelinks that use this plugin, a model and an
13    issue from my tracker.
14    
15      [[case:NNN]]
16      [[case:291]]
17    
18    ### The Link Text
19      #NNN: Issue Title
20      #291: Styled Links for Case Tracker
21    
22    ### The URL (href)
23      node/NNN
24      node/291
25    
26    ### The CSS Classes
27      freelink freelink-casetracker casetracker-project-<pid>
28        casetracker-status-<label> casetracker-type-<label> casetracker-priority-<label>
29    
30      freelink freelink-casetracker casetracker-project-28
31        casetracker-status-resolved casetracker-type-feature-request casetracker-priority-normal
32    
33    ### The Title/Tooltip
34       #NNN: Status(<label>) - Type(<label>) - Priority(<label>)
35       #291: Status(open) - Type(feature-request) - Priority(normal)
36    
37    ## Link Styling
38    The classes attached to each link make it possible to style it in a variety of
39    ways so users can see an quick issue summary at a glance.
40    
41    If you check off "Wrap links in <span>" in your Freelinking settings, each
42    link will also be wrapped in a span tag with the same set of classes
43    described above. This is useful for advanced link styling, such as adding
44    icons before the link.
45    
46    Freelinking for Casetracker comes packaged with a stylesheet that
47    demonstrates some basic styling options for a default casetracker
48    installation. It applies standard styling patterns seen on Drupal.org and
49    elsewhere:
50    
51      1. An icon for issue Type,
52      2. Background color for Status,
53      3. Text color or style for Priority.
54    
55    If you do not want this styling included, just go to
56    admin/settings/freelinking and check on the casetracker setting "Ignore
57    Casetracker Link Theming". This will stop including the stylesheet.
58    
59    #### Theming Links by Project
60    If you would like to theme links based on project-id (the nid of the referenced
61    project), you may do that. This option was included to provide support for a
62    "featured project" having specially styled links.
63    
64    ## Tailoring Links to Suit You
65    Using hook_freelink_alter(), you may tailor your case tracker links even further.
66    
67    All the casetracker-specific information about the case may be accessed via
68    links['extra'] as follows:
69    
70      Array(
71        'pid' => <project id>
72        'status' => <issue status>
73        'type' => <issue type>
74        'priority' => <issue priority>
75      )
76    
77    To transform your casetracker links, such as by inserting the project title into
78    the tooltip, you would implement something like the following:
79    
80      function custom_module_freelink_alter(&$link, $target, $plugin_name, $plugin) {
81        switch($plugin_name) {
82          case 'casetracker':
83            $project = node_load($link['extra']['pid']);
84            $link[2]['attributes']['title'] .= '- Project(' . $node->title . ')';
85            break;
86        }
87      }
88    
89    ## Links
90    http://drupal.org/project/freelinking
91    http://drupal.org/project/casetracker
92    http://drupal.org/project/freelinking_casetracker
93    
94    ## Maintainers
95    Grayside (http://drupal.org/user/346868) {Original Creator}

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

  ViewVC Help
Powered by ViewVC 1.1.3