Please check http://blog.weshoes.com/iG_Syntax_Hilter_MANUAL.html#quicktags
textile syntax
The following code is the syntax sample for textile. The output is shown after the code
[code]h2{color:green}. This is a title
h3. This is a subhead
p{color:red}. This is some text of dubious character. Isn't the use of "quotes" just lazy writing -- and theft of 'intellectual property' besides? I think the time has come to see a block quote.
bq[fr]. This is a block quote. I'll admit it's not the most exciting block quote ever devised.
Simple list:
#{color:blue} one
# two
# three
Multi-level list:
# one
## aye
## bee
## see
# two
## x
## y
# three
Mixed list:
* Point one
* Point two
## Step 1
## Step 2
## Step 3
* Point three
** Sub point 1
** Sub point 2
Well, that went well. How about we insert an old-fashioned hypertext link? Will the quote marks in the tags get messed up? No!
"This is a link (optional title)":http://www.textism.com
table{border:1px solid black}.
|_. this|_. is|_. a|_. header|
<{background:gray}. |\2. this is|{background:red;width:200px}. a|^<>{height:200px}. row|
|this|<>{padding:10px}. is|^. another|(bob#bob). row|
An image:
!/common/textist.gif(optional alt text)!
# Librarians rule
# Yes they do
# But you knew that
Some more text of dubious character. Here is a noisome string of CAPITAL letters. Here is something we want to _emphasize_.
That was a linebreak. And something to indicate *strength*. Of course I could use my own HTML tags if I felt like it.
h3. Coding
This is some code, "isn't it". Watch those quote marks! Now for some preformatted text:
$text = str_replace("
%::%
","",$text);
$text = str_replace("%::%
","",$text);
$text = str_replace("%::%","",$text);
This isn't code.
So you see, my friends:
* The time is now
* The time is not later
* The time is not yesterday
* We must act[/code]
h2{color:green}. This is a title
h3. This is a subhead
p{color:red}. This is some text of dubious character. Isn’t the use of “quotes” just lazy writing — and theft of ‘intellectual property’ besides? I think the time has come to see a block quote.
bq[fr]. This is a block quote. I’ll admit it’s not the most exciting block quote ever devised.
Simple list:
#{color:blue} one
# two
# three
Multi-level list:
# one
## aye
## bee
## see
# two
## x
## y
# three
Mixed list:
* Point one
* Point two
## Step 1
## Step 2
## Step 3
* Point three
** Sub point 1
** Sub point 2
Well, that went well. How about we insert an old-fashioned hypertext link? Will the quote marks in the tags get messed up? No!
“This is a link (optional title)”:http://www.textism.com
table{border:1px solid black}.
|_. this|_. is|_. a|_. header|
<{background:gray}. |\2. this is|{background:red;width:200px}. a|^<>{height:200px}. row|
|this|<>{padding:10px}. is|^. another|(bob#bob). row|
An image:
!/wp-admin/images/notice.gif(optional alt text)!
# Librarians rule
# Yes they do
# But you knew that
Some more text of dubious character. Here is a noisome string of CAPITAL letters. Here is something we want to _emphasize_.
That was a linebreak. And something to indicate *strength*. Of course I could use my own HTML tags if I felt like it.
h3. Coding
This is some code, "isn't it". Watch those quote marks! Now for some preformatted text:
$text = str_replace("
%::%
","",$text);
$text = str_replace("%::%
","",$text);
$text = str_replace("%::%","",$text);
This isn’t code.
So you see, my friends:
* The time is now
* The time is not later
* The time is not yesterday
* We must act
tinymce and quicktags
One of the very first tasks I always perform on every new WordPress installation I do is to go into my user profile and turn off the visual WYSIWYG editor(e.g. tinymce). I prefer to handle all my formatting markup myself because it gives me more control over the final product. However, I do use quicktags to increase my productivity.
Do you use any formatting plugins for faster, easier, on-the-fly markup? If you use one of these plugins, why do you use that specific markup plugin? For instance, I use TextileWrapper on my own blog because I like how easy it is to add just a single character or two to a line or phrase to get the formatting I want. I originally used Text Control – and I still prefer – but it broke on a WordPress upgrade awhile back and is no longer being supported by the author, forcing me to find an alternative. TextileWrapper is an excellent plugin in its own right and continues to function well through each upgrade.
TinyMCE configuration
TinyMCE’s configuration is determined when the WordPress edit page is loaded and are controlled by options set in the TinyMCE initialization process. More documentation on the configuration options can be found in the TinyMCE Configuration Reference.
In the WordPress version of TinyMCE, these options are set in a file entitled tiny_mce_gzip.php, which can be found in %WordPress_root%/wp-includes/js/tinymce.
Rails and relative_url_root
And add a line at the end of config/environment.rb
ActionController::AbstractRequest.relative_url_root = "/netvibez"
What this does is change the Rails application to run starting with a netvibez in the first part of the URL. It is useful!!!
For example, we need this when we develop facebook application. It is the canvas_path (http://apps.facebook.com/netvibez)
How to Develop a Hit Facebook App with RoR (Ruby on Rails)
Here is a good article to talk about it
Facebook, RFacebook, Rails and url_for
It caused me trouble to use url_for when developing applications on facebook with RFacebook. After tracing the source code both in RFacebook and Rails; I found I didn’t configure facebook.yml correctly and didn’t use url_for(is aliased by url_for__RFACEBOOK) correctly. Please take a look at the source code lib/rfacebook_on_rails/controller_exceptions.rb in the following and pay attention to my comment(GOOD and BAD).
[ruby]
def url_for__RFACEBOOK(options={}, *parameters) # :nodoc:
# fix problems that some Rails installations had with sending nil options
options ||= {}
# use special URL rewriting when inside the canvas
# setting the full_callback option to true will override this
# and force usage of regular Rails rewriting
if options.is_a? Hash
if options[:mock_ajax]
RAILS_DEFAULT_LOGGER.info “** RFACEBOOK DEPRECATION WARNING: don’t use :mock_ajax => true in your link_to anymore. Instead, use :full_callback => true.”
end
fullCallback = (options[:full_callback] == true) ? true : false
options.delete(:full_callback)
end
if ((in_facebook_canvas? or in_mock_ajax? or in_ajax?) and !fullCallback) #TODO: do something separate for in_facebook_frame?
if options.is_a? Hash
options[:only_path] = true if options[:only_path].nil?
end
# try to get a regular URL
path = url_for__ALIASED(options, *parameters)
# replace anything that references the callback with the
# Facebook canvas equivalent (apps.facebook.com/*)
if path.starts_with?(self.facebook_callback_path)
#GOOD! Go to here if you set the right facebook.yml in the common case
path.sub!(self.facebook_callback_path, self.facebook_canvas_path)
path = “http://apps.facebook.com#{path}”
elsif “#{path}/”.starts_with?(self.facebook_callback_path)
path.sub!(self.facebook_callback_path.chop, self.facebook_canvas_path.chop)
path = “http://apps.facebook.com#{path}”
elsif (path.starts_with?(”http://www.facebook.com”) or path.starts_with?(”https://www.facebook.com”))
# be sure that URLs that go to some other Facebook service redirect back to the canvas
if path.include?(”?”)
path = “#{path}&canvas=true”
else
path = “#{path}?canvas=true”
end
elsif (!path.starts_with?(”http://”) and !path.starts_with?(”https://”))
#BAD! Go to here if you set the wrong facebook.yml
# default to a full URL (will link externally)
RAILS_DEFAULT_LOGGER.debug “** RFACEBOOK INFO: failed to get canvas-friendly URL (”+path+”) for ["+options.inspect+"], creating an external URL instead”
path = “#{request.protocol}#{request.host}:#{request.port}#{path}”
end
# full callback rewriting
elsif fullCallback
options[:only_path] = true
path = “#{request.protocol}#{request.host}:#{request.port}#{url_for__ALIASED(options, *parameters)}”
# regular Rails rewriting
else
path = url_for__ALIASED(options, *parameters)
end
return path
end[/ruby]
For instance, we configure facebook.yml in Rails config directory as the following. When we call url_for(:controller=>’facebook’, :action => ‘test’), it actually calls url_for__RFACEBOOK. url_for_RFACEBOOK will replace /facebook/test with /netvibez/test. However, if we call url_for(:controller=>’somethingelse’, :action=> ‘test’), url_for_RFACEBOOK will generate http://www.netvibez.com/facebook/test which is NOT canvas friendly URL.
p. p.s. However, url_for(:controller=>’facebook’,:action=>’index’) will return http://www.netvibez.com/facebook. This is NOT what I expect. The reason is url_for_RFACEBOOK will only replace /facebook/ with /netvibez/. The ’slash’ makes big difference. If anyone knows how to fix, please drop me a line.
[code]development:
key: xxxxxxxxxx
secret: xxxxxxxxxx
canvas_path: /netvibez
callback_path: /facebook[/code]