Difference between revisions of "RTFM"

From Request Tracker Wiki
Jump to navigation Jump to search
(→‎WikiText Custom Field for RTFM: Fixing linkage and wording)
 
Line 1: Line 1:
== More About RTFM ==
='''Cocktails - How To Garnish A Cocktail'''=


http://www.bestpractical.com/rtfm/


== RTFM Installation ==
For you to have a flavored '''[http://www.mymixeddrinks.com/ cocktails]''' you have to put something on it just like for example a garnish. Many cocktails are incomplete without a garnish, and a '''drink''' may only become specific, famous cocktail after it has been properly garnished.There are many kinds in garnishing a '''cocktail''' which can be place on a glass, floated on the drink, or merely placed in the drink, A certain artistry is involved in their preparation and placement. Most of the garnishes can be maybe bu using a knife. A larger knife will be needed for the larger fruits in preparing a garnishes.


Installation is a fairly straightforward process (this process assumes that you already have a fully functional instance of RT3 installed and that you are not upgrading a previous installation of RTFM) :
The '''[http://www.mymixeddrinks.com/ cocktails]''' recipe will usually call for a certain garnished, but this is not always the case. First thing you have to do is to decide what kinds of garnishes your going to use for your '''cocktail'''. Then prepared a rim of the empty glass, to coat the rim of the empty glass, first spread or mound the garnish ingredient on a small plate or tray, then briefly rub around the rim of the glass with something such as lemon. You have to prepare also the standard or simple garnishes of your '''cocktail'''. Prepare more elaborate or exotic garnishes then garnish the prepared cocktail.
 
cd /usr/local/src
wget http://download.bestpractical.com/pub/rt/release/RTFM-2.4.1.tar.gz
tar zxf RTFM-2.4.1.tar.gz
cd RTFM-2.4.1
perl Makefile.PL
make install
make initdb
 
Then edit your [[RT SiteConfig|RT_SiteConfig]] (or [[RT Config|RT_Config]]) to include this line:
 
Set(@Plugins,qw(RT::FM));
 
Finally, restart your web server:
 
/etc/init.d/httpd stop
/etc/init.d/httpd start
 
== WikiText Custom Field for RTFM ==
 
The following is my observation based on RTFM 2.0.4 and RT 3.4.0 - I posted this on the forum and received no responses so I am unsure if this is indeed a global issue or not. Please feel free to correct any of the below if you find your situation different. Hopefully this will reduce the amount of time for someone trying to format articles in RTFM. /
 
Included in the custom fields is a type = wikitext that generally uses standard wiki formatting with some exceptions.
 
Note that formatting rules in this full Wiki are NOT the same as the wikitext custom field in RTFM.
 
If you paste text into the RTFM wikitext field it will be autoformatted with internal wikilinks on any word with multiple capital letters. There are many cases where you will want to disable this on a word by word or block basis.
 
To disable creation of auto links enclose the word or section in <nowiki> </nowiki> tags. Simply putting an exclamation point in front of the word will not work here as in Kwiki.
 
[[ThisWordShouldBeWikified]]
 
<nowiki>ThisWordWillNotBeWikified</nowiki>
 
One other non-standard behavior is with hyperlinks. The wiki formatter does not automatically recognize links like http://www.bestpractical.com/ or email addresses such as [mailto:name@domain.com name@domain.com]. You will have to enclose any external links in square brackets or enclose in the normal HTML anchor tags <a href=></a> or they will be treated as regular text.
 
*I Think 'The enclose brackets for external links' is Ok. If someone adding an external link here - he MUST know how to work on this wiki. We don't want anyone just visit this page and add his 'Blog' here to get a link. Someone have 'Admin' Status on this Wiki, Please format and my text here or somewhere in this wiki you think perfect. *
 
Most other formatting conventions work as expected. (I have not found this to be the case, only the small subset listed in man Text::[[WikiFormat]] actually work. SG.)
 
See http://en.wikipedia.org/wiki/Help:Wikitext_examples for those conventions.
 
[=man Text::[[WikiFormat]]] for a partial spec (on Debian Sarge at least).
 
----
 
Some RT idiosyncrasies (rt 3.4.1, rtfm 2.0.4). http://en.wikipedia.org/wiki/Help:Wikitext_examples is useful as a starting point but there are some differences.
 
'''bold'''
 
<nowiki>'''bold'''
</nowiki>
 
/italic/
 
<nowiki>''italic''
</nowiki>
 
/'''bold and italic'''/
 
<nowiki>'''''bold and italic'''''
</nowiki>
 
Those are single quotes.
 
Other ones I have been able to get to work, hopefully this will save some frustration. SG.
 
= Heading =
 
<nowiki>= Heading =
</nowiki>
 
== Sub Heading ==
 
<nowiki>== Sub Heading ==
</nowiki>
 
===== Sub-sub Heading =====
 
<nowiki>===== Sub-sub Heading =====
</nowiki>
 
'''Unnumbered Lists''' - Need to be <u>spaced in 4 or more spaces</u> (more than shown here)
 
<nowiki>* List
* Here
* How about here
</nowiki>
 
'''Numbered Lists''' - I haven't gotten these to work exactly right, the Subitems both show as 1 in my RTFM but hopefully this will get others a little closer to the right answer. SG.
 
1.    Item 1
2.    Item 2
      a.    Subitem 1
      b.    Subitem 2
3.    Item 3
 
'''Entering a URL''' use the [ ]
 
http://wiki.bestpractical.com
 
If you need [ or ] use html entities i.e. &amp;# 91; and &amp;# 93; — &amp; nbsp; could also be useful.
 
'''NB''': these entities are purposely broken so that this wiki won't mess with them, remove the space after the &amp; or the # to use.
 
== Custom Wiki Tags Kludge: ==
 
Editing the %tags and format_line definitions in [[WikiFormat]].pm allows for custom wiki tags. Some knowledge of perl regular expressions is necessary. I would much rather see this done within the RT source but hey it works.
 
Here is an example for adding warning text with style:
 
Add the following to the %tags declaration.
 
warn            =&gt; sub { "&lt;big&gt;&lt;u&gt;&lt;font color=#ff0000&gt;$_[0]&lt;/font&gt;&lt;/u&gt;&lt;/big&gt;" },
warn_tag        =&gt; qr/!(.+?)!/,
 
Add the following to the format_line definition.
 
$text =~ s!$tags-&gt;{warn_tag}!$tags-&gt;{warn}-&gt;($1, $opts)!eg;
Cory Oldford
 
----
 
== Add a Format Toolbar to the Wikitext Custom Field ==
 
(RT-2.65, RTFM-2.21) Wanted to integrate a toolbar to facilitate the wiki formatting to our users.
 
===== EditCustomFieldWikitext =====
 
Copy: /opt/rt3/share/html/Elements/[[EditCustomFieldWikitext]] to /opt/rt3/local/html/Elements/[[EditCustomFieldWikitext]]
 
Edit: /opt/rt3/local/html/Elements/[[EditCustomFieldWikitext]]
 
===== Add before "% while": =====
 
% my $wiki_textarea_value = $NamePrefix .$CustomField-&gt;id .'-Values';
% my $wiki_format_toolbar = qq(
% &lt;div&gt;
% &lt;input type="button" onclick="javascript:lbc(event,'$wiki_textarea_value','bold');" style="font-weight: bold;" value="B"&gt;
% &lt;input type="button" onclick="javascript:lbc(event,'$wiki_textarea_value','italic');" style="font-style: italic;" value="I"&gt;
% &lt;input type="button" onclick="javascript:lbc(event,'$wiki_textarea_value','bold_italic');" style="font-weight: bold;font-style: italic;" value="BI"&gt;
% &lt;input type="button" onclick="javascript:lbc(event,'$wiki_textarea_value','heading');" value="H1"&gt;
% &lt;input type="button" onclick="javascript:lbc(event,'$wiki_textarea_value','subheading');" value="H2"&gt;
% &lt;input type="button" onclick="javascript:lbc(event,'$wiki_textarea_value','subsubheading');" value="H3"&gt;
% &lt;input type="button" onclick="javascript:lbc(event,'$wiki_textarea_value','list');" value="List"&gt;
% &lt;input type="button" onclick="javascript:lbc(event,'$wiki_textarea_value','link');" value="Link"&gt;
% &lt;input type="button" onclick="javascript:lbc(event,'$wiki_textarea_value','highlight');" style="font-weight: bold;color: red;" value="!"&gt;
% &lt;input type=button onclick="javascript:lbc(event,'$wiki_textarea_value','code');" value="Code"&gt;
% &lt;input type=button onclick="javascript:lbc(event,'$wiki_textarea_value','image');" value="Image"&gt;
% &lt;/div&gt;
% );
% print $wiki_format_toolbar;
 
===== Add in both "textarea" tags: =====
 
&lt;textarea ... id="&lt;%$[[NamePrefix]]%&gt;&lt;%$[[CustomField]]-&gt;Id%&gt;-Values"...&lt;/textarea&gt;
 
===== Edit.html =====
 
Copy: /opt/rt3/share/html/RTFM/Article/Edit.html to /opt/rt3/local/html/RTFM/Article/Edit.html
 
Edit: /opt/rt3/local/html/RTFM/Article/Edit.html
 
===== Add before "form": =====
 
<nowiki>&lt;script type="text/javascript"&gt;
function lbc(e, objname, theTag) {
var el = document.getElementById(objname);
var enclosingTag;
var spaceTag = '\ ';
if(theTag == 'bold'){
        startTag = '\'\'\'';
        endTag = '\'\'\'';
        spaceTag = '';
}
if(theTag == 'italic'){
        startTag = '\'\'';
        endTag = '\'\'';
        spaceTag = '';
}
if(theTag == 'bold_italic'){
        startTag = '\'\'\'\'\'';
        endTag = '\'\'\'\'\'';
        spaceTag = '';
}
if(theTag == 'heading'){
        startTag = '=';
        endTag = '=';
}
if(theTag == 'subheading'){
        startTag = '==';
        endTag = '==';
}
if(theTag == 'subsubheading'){
        startTag = '=====';
        endTag = '=====';
}
if(theTag == 'link'){
        startTag = '[';
        endTag = ']';
}
if(theTag == 'list'){
        startTag = '\ \ \ \ *\ ';
        endTag = '';
}
if(theTag == 'highlight'){
        startTag = '!';
        endTag = '!';
        spaceTag = '';
}
if(theTag == 'code'){
        startTag = '%code%';
        endTag = '%/code%';
}
if(theTag == 'image'){
        startTag = '%image%';
        endTag = '%/image%';
}
if (el.setSelectionRange) {
//Mozilla or FireFox Code
        var st = el.scrollTop;
        var ss = el.selectionStart;
        var se = e.selectionEnd;
        el.value = el.value.substring(0,el.selectionStart) + startTag + spaceTag + el.value.substring(el.selectionStart,el.selectionEnd) + spaceTag + endTag + el.value.substring(el.selectionEnd,el.value.length);
        el.selectionStart = ss;
        el.selectionEnd = ss;
        el.scrollTop = st;
}
else if (document.selection &amp;&amp; document.selection.createRange) {
        //Internet Explorer Code
        el.focus(); //Makes sure tags are being added to the textarea
        var range = document.selection.createRange();
        range.text = startTag + spaceTag + range.text + spaceTag + endTag; //Adds beginning and end tags.
}
el.focus();
</nowiki>
 
}
 
&lt;/script&gt;
 
Edit: /path/to/perl/libraries/[[WikiFormat]].pm
 
Add the following to the %tags declaration:
 
code_html_start =&gt; sub { "&lt;table width=\"90%\" cellspacing=\"1\" cellpadding=\"3\" border=\"0\" align=\"center\"&gt;&lt;tr&gt;&lt;td&gt;&lt;span style=\"font-size : 11px;\"&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=\"font-family: Courier, \'Courier New\', sans-serif; font-size: 11px; color: #006600;background-color: #FAFAFA; border: #D1D7DC; border-style: solid;border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px;\"&gt;&lt;code&gt;$_[0]" },
 
code_html_end =&gt; sub { "$_[0]&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;" },
 
code_tag_start        =&gt; qr/\%code\%(.*?)/,
code_tag_end        =&gt; qr/(.*?)\%\/code\%/,
image_html_start =&gt; sub { "&lt;img src=\"$_[0]" },
image_html_end =&gt; sub { "$_[0]\" alt=\"Uploaded Image\" border=\"0\" /&gt;" },
 
image_tag_start        =&gt; qr/\%image\%(.*?)/,
image_tag_end        =&gt; qr/(.*?)\%\/image\%/,
 
Add the following to the format_line definition:
 
$text =~ s!$tags-&gt;{code_tag_start}!$tags-&gt;{code_html_start}-&gt;($1, $opts)!eg;
$text =~ s!$tags-&gt;{code_tag_end}!$tags-&gt;{code_html_end}-&gt;($1, $opts)!eg;
$text =~ s!$tags-&gt;{image_tag_start}!$tags-&gt;{image_html_start}-&gt;($1, $opts)!eg;
$text =~ s!$tags-&gt;{image_tag_end}!$tags-&gt;{image_html_end}-&gt;($1, $opts)!eg;
 
----
 
Miguel A. Rivera
 
===== RT 3.8.2 and RT-FM 2.4.1 =====
 
* Use /opt/rt3/local/plugins/RT-FM/html/Elements/[[EditCustomFieldWikitext]] instead of /opt/rt3/local/html/Elements/[[EditCustomFieldWikitext]]
* Edit /opt/rt3/local/plugins/RT-FM/html/RTFM/Article/Edit.html instead of /opt/rt3/local/html/RTFM/Article/Edit.html
 
----
 
reaktor
 
===== Enable Inline images and HTML in RTFM Articles =====
 
Ubuntu 9.10 RT 3.8.4 / RTFM 2.4.2
 
* Edit this file:
 
/usr/share/request-tracker3.8/html/Elements/[[ShowCustomFieldWikitext]]
 
And comment out this line:
 
% $content = $m-&gt;comp('/Elements/[[ScrubHTML]]', Content =&gt; $content);
 
so now it looks like this:
 
%# $content = $m-&gt;comp('/Elements/[[ScrubHTML]]', Content =&gt; $content);
 
* Save that file, and then restart apache with sudo /etc/init.d/apache2 restart
 
=== Rename RTFM keyword on all pages ===
 
If you doesn't like the RTFM acronym, you can change it by something else rather quickly [[RenameRTFM]]
 
----
 
[[DanFarst]]
 
tc3driver - removed spam

Revision as of 11:11, 19 January 2011

Cocktails - How To Garnish A Cocktail

For you to have a flavored cocktails you have to put something on it just like for example a garnish. Many cocktails are incomplete without a garnish, and a drink may only become specific, famous cocktail after it has been properly garnished.There are many kinds in garnishing a cocktail which can be place on a glass, floated on the drink, or merely placed in the drink, A certain artistry is involved in their preparation and placement. Most of the garnishes can be maybe bu using a knife. A larger knife will be needed for the larger fruits in preparing a garnishes.

The cocktails recipe will usually call for a certain garnished, but this is not always the case. First thing you have to do is to decide what kinds of garnishes your going to use for your cocktail. Then prepared a rim of the empty glass, to coat the rim of the empty glass, first spread or mound the garnish ingredient on a small plate or tray, then briefly rub around the rim of the glass with something such as lemon. You have to prepare also the standard or simple garnishes of your cocktail. Prepare more elaborate or exotic garnishes then garnish the prepared cocktail.