Revision history for SmartyPants


Revision [23361]

Last edited on 2016-05-20 07:38:47 by MasinAlDujaili [Replaces old-style internal links with new pipe-split links.]
Additions:
~-[[ThirdPartyIntegration | Experimental 3rd party software integration in wikka]]
~-[[Docs:ThirdPartyInfo | 3rdparty software officially bundled with wikka]]
[[http://www.michelf.com/projects/php-smartypants/ | PHP SmartyPants]] is a port to PHP (written by [[http://www.michelf.com/ | Michel Fortin]]) of the original [[http://daringfireball.net/projects/smartypants/ | SmartyPants]] written in Perl by John Gruber. SmartyPants is a free web publishing tool that translates plain ASCII punctuation characters into "smart" typographic punctuation HTML entities. SmartyPants can perform the following transformations:
==3. Modify the [[Docs:ConfigurationOptions | Wikka configuration file]]==
Deletions:
~-[[ThirdPartyIntegration Experimental 3rd party software integration in wikka]]
~-[[Docs:ThirdPartyInfo 3rdparty software officially bundled with wikka]]
[[http://www.michelf.com/projects/php-smartypants/ PHP SmartyPants]] is a port to PHP (written by [[http://www.michelf.com/ Michel Fortin]]) of the original [[http://daringfireball.net/projects/smartypants/ SmartyPants]] written in Perl by John Gruber. SmartyPants is a free web publishing tool that translates plain ASCII punctuation characters into "smart" typographic punctuation HTML entities. SmartyPants can perform the following transformations:
==3. Modify the [[Docs:ConfigurationOptions Wikka configuration file]]==


Revision [20006]

Edited on 2008-06-04 07:16:17 by MasinAlDujaili [working versions]
Additions:
>>Working for 1.1.6.0 to 1.1.6.4
~&On large pages with some more than just a few comments, you might exceed PHP's available memory. Try setting the wikka.config.php option to 0, then. --MasinAlDujaili>>
~-Straight quotes ( " and ' ) and backticks-style quotes (`` ""''"") into curly quote HTML entities: “doublequotes” and ‘singlequotes’ ;
~-Dashes (##--## and ##""---""##) into en- and em-dash entities: – and — ;
~-Three consecutive dots (##...##) into an ellipsis entity (…).
’Twas the night before Christmas.
Deletions:
~-Straight quotes ( " and ' ) and backticks-style quotes (`` ""''"") into curly quote HTML entities: “doublequotes” and ‘singlequotes’ ;
~-Dashes (##--## and ##""---""##) into en- and em-dash entities: – and — ;
~-Three consecutive dots (##...##) into an ellipsis entity (…).
’Twas the night before Christmas.


Revision [19345]

Edited on 2008-01-28 00:15:25 by DavePreston [Modified links pointing to docs server]
Additions:
~-[[Docs:ThirdPartyInfo 3rdparty software officially bundled with wikka]]
==3. Modify the [[Docs:ConfigurationOptions Wikka configuration file]]==
Deletions:
~-[[ThirdPartyInfo 3rdparty software officially bundled with wikka]]
==3. Modify the [[ConfigurationOptions Wikka configuration file]]==


Revision [17458]

Edited on 2007-09-01 15:06:18 by DavePreston [Modified links pointing to docs server]
Additions:
~-Straight quotes ( " and ' ) and backticks-style quotes (`` ""''"") into curly quote HTML entities: “doublequotes” and ‘singlequotes’ ;
~-Dashes (##--## and ##""---""##) into en- and em-dash entities: – and — ;
~-Three consecutive dots (##...##) into an ellipsis entity (…).
SmartyPants does not modify characters within ##<pre>##, ##<code>##, ##<kbd>##, or ##<script>## tag blocks. Typically, these tags are used to display text where smart quotes and other "smart punctuation" would not be appropriate, such as source code or example markup.
==Known issues==
(from: http://daringfireball.net/projects/smartypants/)
One situation in which quotes will get curled the wrong way is when apostrophes are used at the start of leading contractions. For example:
’Twas the night before Christmas.
In the case above, SmartyPants will turn the apostrophe into an opening single-quote, when in fact it should be a closing one. I don't think this problem can be solved in the general case - every word processor I've tried gets this wrong as well. In such cases, it's best to use the proper HTML entity for closing single-quotes by hand.
Installing SmartyPants in Wikka is straightforward and it only requires setting some configuration options in the original code.
===The steps===
==1. Get the code==
Download the latest version of [[http://www.michelf.com/projects/php-smartypants/]]
==2. Copy it in the wikka directory==
Unzip the SmartyPants folder and move it into ##/3rdparty/plugins##
==3. Modify the [[ConfigurationOptions Wikka configuration file]]==
Add the following lines to ##wikka.config.php##:
%%(php)
"typography" => "1",
"smartypants_path" => "3rdparty/plugins/smartypants",
%%
Make sure the smartypants path matches the path to the folder in which ##smartypants.php## can be found.
==4. Create a ##Typography()## method ==
Add the following function in ##wikka.php##, for example right after the ##GeSHi_Highlight()## function:
%%(php)
function Typography($text)
{
if (($this->GetConfigValue('typography') == 1) && file_exists($this->GetConfigValue('smartypants_path').'/smartypants.php'))
{
include_once($this->GetConfigValue('smartypants_path').'/smartypants.php');
$text = SmartyPants($text);
}
return $text;
}
%%
==5. Modify the formatter ==
Open ##./formatter/wakka.php##, scroll to the end of the file and add the following line, immediately before ##echo $text;##
%%(php)
$text = $this->Typography($text);
%%
==6. Set SmartyPants configuration options ==
In order to make SmartyPants consistently work with Wikka, you should set the following options in:
##3rdparty/plugins/smartypants/smartypants.php##
%%(php;27)
# Globals:
$sp_tags_to_skip = '<(/?)(?:pre|code|kbd|script|math|form)[\s>]';
%%
Make sure the ##$sp_tags_to_skip## pattern contains ##form## if you don't want punctuation to be parsed within forms. This is needed in case your Wikka runs beta extensions like GrabCodeHandler or MySkin, WikkaSkinEditor or WikkaSkinSelector.
//That's all folks...//
----
CategoryDevelopment3rdParty CategoryDevelopmentFormatters
Deletions:
~-Straight quotes (


Revision [17456]

Edited on 2007-09-01 13:08:15 by PweR47 [Modified links pointing to docs server]
Additions:
~-Straight quotes (
Deletions:
~-Straight quotes ( " and ' ) and backticks-style quotes (`` ""''"") into curly quote HTML entities: “doublequotes” and ‘singlequotes’ ;
~-Dashes (##--## and ##""---""##) into en- and em-dash entities: – and — ;
~-Three consecutive dots (##...##) into an ellipsis entity (…).
SmartyPants does not modify characters within ##<pre>##, ##<code>##, ##<kbd>##, or ##<script>## tag blocks. Typically, these tags are used to display text where smart quotes and other "smart punctuation" would not be appropriate, such as source code or example markup.
==Known issues==
(from: http://daringfireball.net/projects/smartypants/)
One situation in which quotes will get curled the wrong way is when apostrophes are used at the start of leading contractions. For example:
’Twas the night before Christmas.
In the case above, SmartyPants will turn the apostrophe into an opening single-quote, when in fact it should be a closing one. I don't think this problem can be solved in the general case - every word processor I've tried gets this wrong as well. In such cases, it's best to use the proper HTML entity for closing single-quotes by hand.
Installing SmartyPants in Wikka is straightforward and it only requires setting some configuration options in the original code.
===The steps===
==1. Get the code==
Download the latest version of [[http://www.michelf.com/projects/php-smartypants/]]
==2. Copy it in the wikka directory==
Unzip the SmartyPants folder and move it into ##/3rdparty/plugins##
==3. Modify the [[ConfigurationOptions Wikka configuration file]]==
Add the following lines to ##wikka.config.php##:
%%(php)
"typography" => "1",
"smartypants_path" => "3rdparty/plugins/smartypants",
%%
Make sure the smartypants path matches the path to the folder in which ##smartypants.php## can be found.
==4. Create a ##Typography()## method ==
Add the following function in ##wikka.php##, for example right after the ##GeSHi_Highlight()## function:
%%(php)
function Typography($text)
{
if (($this->GetConfigValue('typography') == 1) && file_exists($this->GetConfigValue('smartypants_path').'/smartypants.php'))
{
include_once($this->GetConfigValue('smartypants_path').'/smartypants.php');
$text = SmartyPants($text);
}
return $text;
}
%%
==5. Modify the formatter ==
Open ##./formatter/wakka.php##, scroll to the end of the file and add the following line, immediately before ##echo $text;##
%%(php)
$text = $this->Typography($text);
%%
==6. Set SmartyPants configuration options ==
In order to make SmartyPants consistently work with Wikka, you should set the following options in:
##3rdparty/plugins/smartypants/smartypants.php##
%%(php;27)
# Globals:
$sp_tags_to_skip = '<(/?)(?:pre|code|kbd|script|math|form)[\s>]';
%%
Make sure the ##$sp_tags_to_skip## pattern contains ##form## if you don't want punctuation to be parsed within forms. This is needed in case your Wikka runs beta extensions like GrabCodeHandler or MySkin, WikkaSkinEditor or WikkaSkinSelector.
//That's all folks...//
----
CategoryDevelopment3rdParty CategoryDevelopmentFormatters


Revision [17011]

Edited on 2007-05-31 23:27:41 by MasinAlDujaili [Reverted]
Additions:
~-Straight quotes ( " and ' ) and backticks-style quotes (`` ""''"") into curly quote HTML entities: “doublequotes” and ‘singlequotes’ ;
~-Dashes (##--## and ##""---""##) into en- and em-dash entities: – and — ;
~-Three consecutive dots (##...##) into an ellipsis entity (…).
SmartyPants does not modify characters within ##<pre>##, ##<code>##, ##<kbd>##, or ##<script>## tag blocks. Typically, these tags are used to display text where smart quotes and other "smart punctuation" would not be appropriate, such as source code or example markup.
==Known issues==
(from: http://daringfireball.net/projects/smartypants/)
One situation in which quotes will get curled the wrong way is when apostrophes are used at the start of leading contractions. For example:
’Twas the night before Christmas.
In the case above, SmartyPants will turn the apostrophe into an opening single-quote, when in fact it should be a closing one. I don't think this problem can be solved in the general case - every word processor I've tried gets this wrong as well. In such cases, it's best to use the proper HTML entity for closing single-quotes by hand.
Installing SmartyPants in Wikka is straightforward and it only requires setting some configuration options in the original code.
===The steps===
==1. Get the code==
Download the latest version of [[http://www.michelf.com/projects/php-smartypants/]]
==2. Copy it in the wikka directory==
Unzip the SmartyPants folder and move it into ##/3rdparty/plugins##
==3. Modify the [[ConfigurationOptions Wikka configuration file]]==
Add the following lines to ##wikka.config.php##:
%%(php)
"typography" => "1",
"smartypants_path" => "3rdparty/plugins/smartypants",
%%
Make sure the smartypants path matches the path to the folder in which ##smartypants.php## can be found.
==4. Create a ##Typography()## method ==
Add the following function in ##wikka.php##, for example right after the ##GeSHi_Highlight()## function:
%%(php)
function Typography($text)
{
if (($this->GetConfigValue('typography') == 1) && file_exists($this->GetConfigValue('smartypants_path').'/smartypants.php'))
{
include_once($this->GetConfigValue('smartypants_path').'/smartypants.php');
$text = SmartyPants($text);
}
return $text;
}
%%
==5. Modify the formatter ==
Open ##./formatter/wakka.php##, scroll to the end of the file and add the following line, immediately before ##echo $text;##
%%(php)
$text = $this->Typography($text);
%%
==6. Set SmartyPants configuration options ==
In order to make SmartyPants consistently work with Wikka, you should set the following options in:
##3rdparty/plugins/smartypants/smartypants.php##
%%(php;27)
# Globals:
$sp_tags_to_skip = '<(/?)(?:pre|code|kbd|script|math|form)[\s>]';
%%
Make sure the ##$sp_tags_to_skip## pattern contains ##form## if you don't want punctuation to be parsed within forms. This is needed in case your Wikka runs beta extensions like GrabCodeHandler or MySkin, WikkaSkinEditor or WikkaSkinSelector.
//That's all folks...//
----
CategoryDevelopment3rdParty CategoryDevelopmentFormatters
Deletions:
~-Straight quotes (


Revision [16810]

Edited on 2007-05-31 10:50:06 by PweR47 [Reverted]
Additions:
~-Straight quotes (
Deletions:
~-Straight quotes ( " and ' ) and backticks-style quotes (`` ""''"") into curly quote HTML entities: “doublequotes” and ‘singlequotes’ ;
~-Dashes (##--## and ##""---""##) into en- and em-dash entities: – and — ;
~-Three consecutive dots (##...##) into an ellipsis entity (…).
SmartyPants does not modify characters within ##<pre>##, ##<code>##, ##<kbd>##, or ##<script>## tag blocks. Typically, these tags are used to display text where smart quotes and other "smart punctuation" would not be appropriate, such as source code or example markup.
==Known issues==
(from: http://daringfireball.net/projects/smartypants/)
One situation in which quotes will get curled the wrong way is when apostrophes are used at the start of leading contractions. For example:
’Twas the night before Christmas.
In the case above, SmartyPants will turn the apostrophe into an opening single-quote, when in fact it should be a closing one. I don't think this problem can be solved in the general case - every word processor I've tried gets this wrong as well. In such cases, it's best to use the proper HTML entity for closing single-quotes by hand.
Installing SmartyPants in Wikka is straightforward and it only requires setting some configuration options in the original code.
===The steps===
==1. Get the code==
Download the latest version of [[http://www.michelf.com/projects/php-smartypants/]]
==2. Copy it in the wikka directory==
Unzip the SmartyPants folder and move it into ##/3rdparty/plugins##
==3. Modify the [[ConfigurationOptions Wikka configuration file]]==
Add the following lines to ##wikka.config.php##:
%%(php)
"typography" => "1",
"smartypants_path" => "3rdparty/plugins/smartypants",
%%
Make sure the smartypants path matches the path to the folder in which ##smartypants.php## can be found.
==4. Create a ##Typography()## method ==
Add the following function in ##wikka.php##, for example right after the ##GeSHi_Highlight()## function:
%%(php)
function Typography($text)
{
if (($this->GetConfigValue('typography') == 1) && file_exists($this->GetConfigValue('smartypants_path').'/smartypants.php'))
{
include_once($this->GetConfigValue('smartypants_path').'/smartypants.php');
$text = SmartyPants($text);
}
return $text;
}
%%
==5. Modify the formatter ==
Open ##./formatter/wakka.php##, scroll to the end of the file and add the following line, immediately before ##echo $text;##
%%(php)
$text = $this->Typography($text);
%%
==6. Set SmartyPants configuration options ==
In order to make SmartyPants consistently work with Wikka, you should set the following options in:
##3rdparty/plugins/smartypants/smartypants.php##
%%(php;27)
# Globals:
$sp_tags_to_skip = '<(/?)(?:pre|code|kbd|script|math|form)[\s>]';
%%
Make sure the ##$sp_tags_to_skip## pattern contains ##form## if you don't want punctuation to be parsed within forms. This is needed in case your Wikka runs beta extensions like GrabCodeHandler or MySkin, WikkaSkinEditor or WikkaSkinSelector.
//That's all folks...//
----
CategoryDevelopment3rdParty CategoryDevelopmentFormatters


Revision [16618]

Edited on 2007-05-21 04:14:36 by MasinAlDujaili [just applied coding guidelines]
Additions:
function Typography($text)
{
if (($this->GetConfigValue('typography') == 1) && file_exists($this->GetConfigValue('smartypants_path').'/smartypants.php'))
{
Deletions:
function Typography($text){
if (($this->GetConfigValue('typography') == 1) && file_exists($this->GetConfigValue('smartypants_path').'/smartypants.php')){


Revision [9925]

Edited on 2005-07-10 10:29:52 by DarTar [adding see also box]
Deletions:
>>
::c::


Revision [9924]

Edited on 2005-07-10 10:29:42 by DarTar [adding see also box]
Additions:
~-[[ThirdPartyIntegration Experimental 3rd party software integration in wikka]]
~-[[ThirdPartyInfo 3rdparty software officially bundled with wikka]]
>>::c::
Deletions:
~-ThirdPartyIntegration


Revision [9858]

Edited on 2005-07-05 18:05:51 by DarTar [fixed title]
Additions:
~-UnderDevelopment


Revision [9857]

Edited on 2005-07-05 18:05:31 by DarTar [fixed title]
Additions:
===== Smarty Pants: Smart typographic punctuation =====
//This page provides instructions on how to install a 3rd party formatting engine for smart typographic punctuation in WikkaWiki//
Deletions:
===== Smarty Pants: Smart typographic punctuations =====
//This page provides instructions on how to install a 3rd party formatting engine for smart typographic punctuations in WikkaWiki//


Revision [8913]

Edited on 2005-06-07 12:09:05 by DarTar [adding SP config option to prevent parsing in forms]
Additions:
Installing SmartyPants in Wikka is straightforward and it only requires setting some configuration options in the original code.
==6. Set SmartyPants configuration options ==
In order to make SmartyPants consistently work with Wikka, you should set the following options in:
##3rdparty/plugins/smartypants/smartypants.php##
%%(php;27)
# Globals:
$sp_tags_to_skip = '<(/?)(?:pre|code|kbd|script|math|form)[\s>]';
Make sure the ##$sp_tags_to_skip## pattern contains ##form## if you don't want punctuation to be parsed within forms. This is needed in case your Wikka runs beta extensions like GrabCodeHandler or MySkin, WikkaSkinEditor or WikkaSkinSelector.
Deletions:
Installing SmartyPants in Wikka is straightforward and requires no specific modification to the original code.


Revision [8873]

Edited on 2005-06-06 12:24:49 by DarTar [New page]
Additions:
[[http://www.michelf.com/projects/php-smartypants/ PHP SmartyPants]] is a port to PHP (written by [[http://www.michelf.com/ Michel Fortin]]) of the original [[http://daringfireball.net/projects/smartypants/ SmartyPants]] written in Perl by John Gruber. SmartyPants is a free web publishing tool that translates plain ASCII punctuation characters into "smart" typographic punctuation HTML entities. SmartyPants can perform the following transformations:
Deletions:
[[http://www.michelf.com/projects/php-smartypants/ PHP SmartyPants]] is a port to PHP of the original [[http://daringfireball.net/projects/smartypants/ SmartyPants]] written in Perl by John Gruber. SmartyPants is a free web publishing tool that translates plain ASCII punctuation characters into "smart" typographic punctuation HTML entities. SmartyPants can perform the following transformations:


Revision [8872]

Edited on 2005-06-06 12:13:01 by DarTar [New page]
Additions:
Make sure the smartypants path matches the path to the folder in which ##smartypants.php## can be found.
Deletions:
Make sure the smartypants path matches the name of the folder in which the code is contained.


Revision [8871]

Edited on 2005-06-06 12:11:55 by DarTar [New page]
Additions:
Unzip the SmartyPants folder and move it into ##/3rdparty/plugins##
==3. Modify the [[ConfigurationOptions Wikka configuration file]]==
Deletions:
Unzip the SmartyPants folder and move into ##/3rdparty/plugins##
==3. Update the [[ConfigurationOptions Wikka configuration file]]==


Revision [8870]

Edited on 2005-06-06 12:11:20 by DarTar [New page]
Additions:
Unzip the SmartyPants folder and move into ##/3rdparty/plugins##
Make sure the smartypants path matches the name of the folder in which the code is contained.
Deletions:
Move the SmartyPants folder into ##/3rdparty/plugins##
Make sure the smartypants path matches the name of the folder in which you have saved the code.


Revision [8869]

Edited on 2005-06-06 12:10:12 by DarTar [New page]

No Differences

Revision [8868]

Edited on 2005-06-06 12:09:47 by DarTar [New page]
Additions:
In the case above, SmartyPants will turn the apostrophe into an opening single-quote, when in fact it should be a closing one. I don't think this problem can be solved in the general case - every word processor I've tried gets this wrong as well. In such cases, it's best to use the proper HTML entity for closing single-quotes by hand.
Deletions:
In the case above, SmartyPants will turn the apostrophe into an opening single-quote, when in fact it should be a closing one. I don't think this problem can be solved in the general case — every word processor I've tried gets this wrong as well. In such cases, it's best to use the proper HTML entity for closing single-quotes by hand.


Revision [8867]

Edited on 2005-06-06 12:09:18 by DarTar [New page]
Additions:
=== The functionality ===
SmartyPants does not modify characters within ##<pre>##, ##<code>##, ##<kbd>##, or ##<script>## tag blocks. Typically, these tags are used to display text where smart quotes and other "smart punctuation" would not be appropriate, such as source code or example markup.
==Known issues==
(from: http://daringfireball.net/projects/smartypants/)
One situation in which quotes will get curled the wrong way is when apostrophes are used at the start of leading contractions. For example:
’Twas the night before Christmas.
In the case above, SmartyPants will turn the apostrophe into an opening single-quote, when in fact it should be a closing one. I don't think this problem can be solved in the general case — every word processor I've tried gets this wrong as well. In such cases, it's best to use the proper HTML entity for closing single-quotes by hand.


Revision [8866]

Edited on 2005-06-06 12:04:27 by DarTar [New page]
Additions:
//This page provides instructions on how to install a 3rd party formatting engine for smart typographic punctuations in WikkaWiki//
~-WantedFormatters
~-PreFormatter
~-ThirdPartyIntegration
Deletions:
//This page gives instructions on how to install a 3rd party formatting engine for smart typographic punctuations in WikkaWiki//
WantedFormatters
PreFormatter
ThirdPartyIntegration


Revision [8864]

Edited on 2005-06-06 12:00:22 by DarTar [New page]
Additions:
[[http://www.michelf.com/projects/php-smartypants/ PHP SmartyPants]] is a port to PHP of the original [[http://daringfireball.net/projects/smartypants/ SmartyPants]] written in Perl by John Gruber. SmartyPants is a free web publishing tool that translates plain ASCII punctuation characters into "smart" typographic punctuation HTML entities. SmartyPants can perform the following transformations:
Deletions:
[[http://www.michelf.com/projects/php-smartypants/ PHP SmartyPants]] is a port to PHP of the original SmartyPants written in Perl by John Gruber. SmartyPants is a free web publishing tool that translates plain ASCII punctuation characters into "smart" typographic punctuation HTML entities. SmartyPants can perform the following transformations:


Revision [8863]

Edited on 2005-06-06 11:59:20 by DarTar [New page]
Additions:
~-Straight quotes ( " and ' ) and backticks-style quotes (`` ""''"") into curly quote HTML entities: “doublequotes” and ‘singlequotes’ ;
~-Dashes (##--## and ##""---""##) into en- and em-dash entities: – and — ;
~-Three consecutive dots (##...##) into an ellipsis entity (…).
Deletions:
~-Straight quotes ( " and ' ) and backticks-style quotes (`` ""''"") into curly quote HTML entities: “doublequotes” and ‘singlequotes’
~-Dashes (##--## and ##""---""##) into en- and em-dash entities: – and —
~-Three consecutive dots (##...##) into an ellipsis entity (…)


Revision [8862]

Edited on 2005-06-06 11:58:40 by DarTar [New page]
Additions:
~-Straight quotes ( " and ' ) and backticks-style quotes (`` ""''"") into curly quote HTML entities: “doublequotes” and ‘singlequotes’
Deletions:
~-Straight quotes ( " and ' ) and backticks-style quotes into curly quote HTML entities: “doublequotes” and ‘singlequotes’


Revision [8861]

Edited on 2005-06-06 11:57:21 by DarTar [New page]
Additions:
//This page gives instructions on how to install a 3rd party formatting engine for smart typographic punctuations in WikkaWiki//
>>**See also**
Deletions:
//This page gives instructions on how to install a 3rd party formatting engine for smart typographic punctuations in WikkaWiki//>>**See also**


Revision [8860]

The oldest known version of this page was created on 2005-06-06 11:56:52 by DarTar [New page]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki