<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss version="2.0">
  <channel>
    <title>RailsLodge - Blog</title>
    <link>http://www.railslodge.com/blogs</link>
    <description>Recent blog posts</description>
    <language>en-uk</language>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/RailsLodgeBlog" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
      <title>Personalise Site - Now implicitly gain a users geo data</title>
      <description>&lt;p&gt;The second version of the Personalise Site plugin has just been released and now includes methods to implicitly gain a users geo data.
&lt;br/&gt;

&lt;br/&gt;
These additions are intended to be used to further customise and improve a users browsing experience. 
&lt;br/&gt;

&lt;br/&gt;
For example you may want to display content on a homepage that is relevant to a users location or you may want to automatically select the right country in a registration form to improve the signup experience.
&lt;br/&gt;

&lt;br/&gt;
Note. This plugin will currently return UK if in development mode.
&lt;br/&gt;

&lt;br/&gt;
This can be achieved in your views by making use of these methods:
&lt;br/&gt;

&lt;br/&gt;
Returns which country the user is in
&lt;br/&gt;
&lt;/p&gt;&lt;pre&gt;&lt;span class="punct"&gt;&amp;lt;%=&lt;/span&gt;&lt;span class="string"&gt; which_country %&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;
&lt;br/&gt;

&lt;br/&gt;
Returns which city the user is in
&lt;br/&gt;
&lt;/p&gt;&lt;pre&gt;&lt;span class="punct"&gt;&amp;lt;%=&lt;/span&gt;&lt;span class="string"&gt; which_city %&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;
&lt;br/&gt;

&lt;br/&gt;
The users geographical coordinates
&lt;br/&gt;
longitude: &lt;/p&gt;&lt;pre&gt;&lt;span class="punct"&gt;&amp;lt;%=&lt;/span&gt;&lt;span class="string"&gt; longitude_coordinate %&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;
&lt;br/&gt;
latitude: &lt;/p&gt;&lt;pre&gt;&lt;span class="punct"&gt;&amp;lt;%=&lt;/span&gt;&lt;span class="string"&gt; latitude_coordinate %&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;
&lt;br/&gt;

&lt;br/&gt;
As usual, if anyone has any suggestions on how to further improve this plugin, please send your comments over.
&lt;br/&gt;

&lt;br/&gt;
Homepage: http://www.railslodge.com/plugins/303-personalise-site
&lt;br/&gt;
SVN: http://svn.railslodge.com/svn/plugins/personalise_site/&lt;/p&gt;</description>
      <pubDate>Sat, 01 Dec 2007 23:41:26 +0000</pubDate>
      <link>http://www.railslodge.com/blogs/14</link>
      <guid>http://www.railslodge.com/blogs/14</guid>
    </item>
    <item>
      <title>New Plugin -  Personalise Site</title>
      <description>&lt;p&gt;This plugin provides helpers for your views that allow you to gain implicit data about the user browsing the site.
&lt;br/&gt;

&lt;br/&gt;
This is intended to be used to customise what the user see's, maybe to improve usability or for cross-browser issues
&lt;br/&gt;

&lt;br/&gt;
The following methods are available:
&lt;br/&gt;

&lt;br/&gt;
Returns the name of the browser the user is using
&lt;br/&gt;
&lt;/p&gt;&lt;pre&gt;&lt;span class="punct"&gt;&amp;lt;%=&lt;/span&gt;&lt;span class="string"&gt; which_browser %&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;
&lt;br/&gt;

&lt;br/&gt;
Returns the version number of the browser being used
&lt;br/&gt;
&lt;/p&gt;&lt;pre&gt;&lt;span class="punct"&gt;&amp;lt;%=&lt;/span&gt;&lt;span class="string"&gt; which_browser_version%&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;
&lt;br/&gt;

&lt;br/&gt;
Returns the name of the platform the user is using
&lt;br/&gt;
&lt;/p&gt;&lt;pre&gt;&lt;span class="punct"&gt;&amp;lt;%=&lt;/span&gt;&lt;span class="string"&gt; which_platform %&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;
&lt;br/&gt;

&lt;br/&gt;
Nil is always returned if the data is unavailable
&lt;br/&gt;

&lt;br/&gt;
==== Example usage
&lt;br/&gt;

&lt;br/&gt;
An example below looks at the platform and outputs the right command to install this plugin
&lt;br/&gt;
&lt;/p&gt;&lt;pre&gt;&lt;span class="punct"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="keyword"&gt;if&lt;/span&gt; &lt;span class="ident"&gt;which_platform?&lt;/span&gt; &lt;span class="punct"&gt;==&lt;/span&gt; &lt;span class="punct"&gt;'&lt;/span&gt;&lt;span class="string"&gt;Windows&lt;/span&gt;&lt;span class="punct"&gt;'&lt;/span&gt; &lt;span class="punct"&gt;-%&amp;gt;&lt;/span&gt;&lt;span class="string"&gt;
	ruby script/plugin install http://svn.railslodge.com/svn/plugins/personalise_site/
&amp;lt;% elsif which_platform? == 'Mac' -%&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;
	&lt;span class="punct"&gt;./&lt;/span&gt;&lt;span class="regex"&gt;script&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;plugin&lt;/span&gt; &lt;span class="ident"&gt;install&lt;/span&gt; &lt;span class="ident"&gt;http&lt;/span&gt;&lt;span class="punct"&gt;:/&lt;/span&gt;&lt;span class="regex"&gt;&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;svn&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;railslodge&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;com&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;svn&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;plugins&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;&lt;span class="ident"&gt;personalise_site&lt;/span&gt;&lt;span class="punct"&gt;/&lt;/span&gt;
&lt;span class="punct"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="keyword"&gt;else&lt;/span&gt; &lt;span class="punct"&gt;-%&amp;gt;&lt;/span&gt;&lt;span class="string"&gt;
	script/plugin install http://svn.railslodge.com/svn/plugins/personalise_site/
&amp;lt;% end -%&lt;/span&gt;&lt;span class="punct"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;</description>
      <pubDate>Sun, 30 Sep 2007 20:14:52 +0000</pubDate>
      <link>http://www.railslodge.com/blogs/13</link>
      <guid>http://www.railslodge.com/blogs/13</guid>
    </item>
    <item>
      <title>New Plugin - Text Formatter</title>
      <description>&lt;p&gt;TextFormatter plugin allows you filter user input, use the syntax gem, before it is saved to the database.
&lt;br/&gt;

&lt;br/&gt;
Install the plugin:
&lt;br/&gt;
&lt;/p&gt;&lt;pre class="terminal"&gt;ruby script\plugin install http://svn.railslodge.com/svn/plugins/text_formatter/&lt;/pre&gt;&lt;p&gt;
&lt;br/&gt;

&lt;br/&gt;
Install the following gems:
&lt;br/&gt;
&lt;/p&gt;&lt;pre class="terminal"&gt;gem install htmltokenizer
gem install syntax
gem install hpricot&lt;/pre&gt;&lt;p&gt;
&lt;br/&gt;

&lt;br/&gt;
If you are using the syntax highlighting method, copy the css from /vender/plugins/text_formatter/stylesheets/text_formatter.css into your css file.
&lt;br/&gt;

&lt;br/&gt;
The following methods can be used in your models:
&lt;br/&gt;

&lt;br/&gt;
===Remove HTML Tags
&lt;br/&gt;
Remove all html tags from the given fields
&lt;br/&gt;
&lt;/p&gt;&lt;pre&gt;&lt;span class="ident"&gt;tf_remove_html_tags&lt;/span&gt; &lt;span class="symbol"&gt;:fieldname&lt;/span&gt;
&lt;span class="comment"&gt;#e.g. tf_remove_html_tags :title, :post&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;
&lt;br/&gt;

&lt;br/&gt;

&lt;br/&gt;
===Escape HTML Characters
&lt;br/&gt;
Escape all tags and special characters
&lt;br/&gt;
&lt;/p&gt;&lt;pre&gt;&lt;span class="ident"&gt;tf_escape_html_characters&lt;/span&gt; &lt;span class="symbol"&gt;:fieldname&lt;/span&gt;
&lt;span class="comment"&gt;#e.g. tf_escape_all_html_characters :title, :post&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;
&lt;br/&gt;

&lt;br/&gt;

&lt;br/&gt;
===Escape Only Text Characters
&lt;br/&gt;
Escape all text except html tags
&lt;br/&gt;
&lt;/p&gt;&lt;pre&gt;&lt;span class="ident"&gt;tf_escape_text_characters&lt;/span&gt; &lt;span class="symbol"&gt;:fieldname&lt;/span&gt;
&lt;span class="comment"&gt;#e.g. tf_escape_text_characters :title, :post&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;
&lt;br/&gt;

&lt;br/&gt;

&lt;br/&gt;
===Syntax Highlighting
&lt;br/&gt;
Add syntax highlighting to all text within pre tags
&lt;br/&gt;
&lt;/p&gt;&lt;pre&gt;&lt;span class="ident"&gt;tf_syntax_highlighting&lt;/span&gt; &lt;span class="symbol"&gt;:fieldname&lt;/span&gt;
&lt;span class="comment"&gt;#e.g. tf_syntax_highlighting :title, :post&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;
&lt;br/&gt;

&lt;br/&gt;

&lt;br/&gt;
===Simple Text Markup
&lt;br/&gt;
Apply SimpleTextMarkup
&lt;br/&gt;
&lt;/p&gt;&lt;pre&gt;&lt;span class="ident"&gt;tf_simple_text_markup&lt;/span&gt; &lt;span class="symbol"&gt;:fieldname&lt;/span&gt;
&lt;span class="comment"&gt;#e.g. tf_simple_text_markup :title, :post&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;
&lt;br/&gt;

&lt;br/&gt;

&lt;br/&gt;
===Content Formatter
&lt;br/&gt;
Remove all html tags, SimpleTextMarkup, encode tags within html tags, syntax highlighting
&lt;br/&gt;
&lt;/p&gt;&lt;pre&gt;&lt;span class="ident"&gt;tf_content_formatter&lt;/span&gt; &lt;span class="symbol"&gt;:fieldname&lt;/span&gt;
&lt;span class="comment"&gt;#e.g. tf_content_formatter :title, :post&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;
&lt;br/&gt;

&lt;br/&gt;

&lt;br/&gt;
===Basic Formatter
&lt;br/&gt;
Remove all html tags, SimpleTextMarkup, encode tags within html tags
&lt;br/&gt;
&lt;/p&gt;&lt;pre&gt;&lt;span class="ident"&gt;tf_basic_formatter&lt;/span&gt; &lt;span class="symbol"&gt;:fieldname&lt;/span&gt;
&lt;span class="comment"&gt;#e.g. tf_basic_formatter :title, :post&lt;/span&gt;&lt;/pre&gt;</description>
      <pubDate>Mon, 10 Sep 2007 23:57:12 +0000</pubDate>
      <link>http://www.railslodge.com/blogs/12</link>
      <guid>http://www.railslodge.com/blogs/12</guid>
    </item>
    <item>
      <title>New Plugin - Nofollow Links</title>
      <description>&lt;p&gt;This is a simple plugin that will add a before_save callback to add nofollow to all links within the given fields.
&lt;br/&gt;

&lt;br/&gt;
Example use:
&lt;br/&gt;

&lt;br/&gt;
Install the plugin:
&lt;br/&gt;
&lt;/p&gt;&lt;pre class="terminal"&gt;ruby script\plugin install http://svn.railslodge.com/svn/plugins/nofollow_links/&lt;/pre&gt;&lt;p&gt;
&lt;br/&gt;
    
&lt;br/&gt;
Simply add this to the required fields
&lt;br/&gt;

&lt;br/&gt;
e.g. Example model:
&lt;br/&gt;
&lt;/p&gt;&lt;pre&gt;&lt;span class="keyword"&gt;class &lt;/span&gt;&lt;span class="class"&gt;Plugin&lt;/span&gt; &lt;span class="punct"&gt;&amp;lt;&lt;/span&gt; &lt;span class="constant"&gt;ActiveRecord&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;Base&lt;/span&gt;
    &lt;span class="comment"&gt;#plugins&lt;/span&gt;
    &lt;span class="ident"&gt;nofollow_links&lt;/span&gt; &lt;span class="symbol"&gt;:content&lt;/span&gt;&lt;span class="punct"&gt;,&lt;/span&gt; &lt;span class="symbol"&gt;:title&lt;/span&gt;
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;
&lt;br/&gt;

&lt;br/&gt;
See http://www.railslodge.com/plugins/106-nofollow-links for further details.&lt;/p&gt;</description>
      <pubDate>Sat, 08 Sep 2007 19:26:16 +0000</pubDate>
      <link>http://www.railslodge.com/blogs/11</link>
      <guid>http://www.railslodge.com/blogs/11</guid>
    </item>
  </channel>
</rss>
