<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Aktagon &raquo; We help you build better Internet services</title>
 <link href="http://aktagon.com/atom.xml" rel="self"/>
 <link href="http://aktagon.com"/>
 <updated>2011-07-30T00:00:02+03:00</updated>
 <id>http://aktagon.com</id>

 
 
 
 <entry>
   <title>Rails Sitemap Generator Plugin</title>
   <link href="http://aktagon.com/projects/rails/sitemap-generator/examples/index.html"/>
   <updated>2010-01-01T00:00:00+02:00</updated>
   <id>http://aktagon.com/projects/rails/sitemap-generator/examples/rails-sitemap-generator-examples</id>
   <content type="html">&lt;h1&gt;Rails Sitemap Generator Plugin&lt;/h1&gt;
&lt;div class=&quot;entry&quot;&gt;
  &lt;p&gt;
    For the latest documentation visit the &lt;a href=&quot;http://github.com/christianhellsten/sitemap-generator&quot; title=&quot;rails sitemap generator&quot;&gt;GitHub project page&lt;/a&gt;
  &lt;/p&gt;
  &lt;p&gt;The Rails Sitemap Generator plugin makes it very easy to generate sitemaps for your Rails app.&lt;/p&gt;
  &lt;p&gt;In addition to simplifying sitemap creation the plugin also includes the following features:&lt;/p&gt;


  &lt;ul&gt;
  &lt;li&gt;Sitemap validation. A sitemap can contain about 50 000 items and be no more than x MB.&lt;/li&gt;
          &lt;li&gt;Search engine ping. The plugin notifies search engines each time your sitemap is updated.&lt;/li&gt;
  &lt;/ul&gt;


  &lt;h2&gt;Installation&lt;/h2&gt;


  &lt;p&gt;Installation is done with the script/plugin script:&lt;/p&gt;


&lt;pre&gt;
  &lt;code&gt;
  $ script/plugin install  git://github.com/christianhellsten/sitemap-generator.git
  &lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;After installing the plugin you need to:&lt;/p&gt;

	&lt;ul&gt;
	&lt;li&gt;Configure the plugin (config/sitemap.yml)&lt;/li&gt;
		&lt;li&gt;Include a call to the &lt;strong&gt;sitemap&lt;/strong&gt; method from each model you want to include in the sitemap&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Configuring the plugin&lt;/h2&gt;


	&lt;p&gt;A configuration file (config/sitemap.yml) is automatically created by the installation script.&lt;/p&gt;


	&lt;p&gt;Below is a sample configuration file, which also contains the default values for the models:&lt;/p&gt;


&lt;pre&gt;
  &lt;code&gt;
  domain: aktagon.com

  limit: 5000
  priority: 1
  change_frequency: weekly
  &lt;/code&gt;

&lt;/pre&gt;

	&lt;p&gt;The options:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;domain: before using the sitemap generator you need to tell the plugin the domain where your application is deployed. This is because the sitemap must contain the full &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt;, not just the &lt;span class=&quot;caps&quot;&gt;URI&lt;/span&gt;, of all resources.&lt;/li&gt;
		&lt;li&gt;limit: specifies how many model instances you want to include in the sitemap&lt;/li&gt;

		&lt;li&gt;priority: specifies the priority of the model&lt;/li&gt;
		&lt;li&gt;change_frequency: specifies how often the data changes: always, hourly, daily, weekly, monthly, yearly or never&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;You can find a more comprehensive description of these concepts on the &lt;a href=&quot;http://en.wikipedia.org/wiki/Sitemaps&quot;&gt;Wikipedia page on sitemaps&lt;/a&gt;&lt;/p&gt;


	&lt;h2&gt;Configuring ActiveRecord models&lt;/h2&gt;


	&lt;p&gt;Each model you want included in the sitemap must call the &lt;strong&gt;sitemap(options)&lt;/strong&gt; method.&lt;/p&gt;


&lt;pre&gt;
  &lt;code&gt;
  class Post &amp;lt; ActiveRecord::Base
    sitemap 
  end
  &lt;/code&gt;

&lt;/pre&gt;

	&lt;p&gt;The default options for each model are taken from the configuration file (config/sitemap.yml). You&amp;#8217;ll most likely want each model to have a different priority and change_frequency. The plugin allows you to override the default options as shown in this example:&lt;/p&gt;


&lt;pre&gt;
  &lt;code&gt;
  class Post &amp;lt; ActiveRecord::Base
    sitemap :change_frequency =&amp;gt; :weekly, :limit =&amp;gt; 1000, :priority =&amp;gt; 0.5
  end
  &lt;/code&gt;

&lt;/pre&gt;

	&lt;h2&gt;Order&lt;/h2&gt;


	&lt;p&gt;The plugin will automatically order the data using the most appropriate Rails magic column, which is the first of the following columns it can find: updated_at, updated_on, created_at or created_on.&lt;/p&gt;


	&lt;p&gt;You can override this behavior when calling the sitemap method:&lt;/p&gt;


&lt;pre&gt;
  &lt;code&gt;
  class Post &amp;lt; ActiveRecord::Base
    sitemap :order =&amp;gt; 'points DESC'
  end
  &lt;/code&gt;
&lt;/pre&gt;

	&lt;h2&gt;Usage&lt;/h2&gt;


	&lt;p&gt;After configuring the plugin you can generate the sitemap with rake:&lt;/p&gt;


&lt;pre&gt;
  &lt;code&gt;
  $ rake sitemap:generate
  &lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;You can also generate the sitemap programatically like this:&lt;/p&gt;

&lt;pre&gt;
  &lt;code&gt;
  SitemapGenerator::Generator.run
  &lt;/code&gt;
&lt;/pre&gt;

	&lt;h2&gt;Scheduled updates with cron&lt;/h2&gt;


	&lt;p&gt;Open the cron configuration with the following command:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
$ sudo crontab -e
&lt;/code&gt;
&lt;/pre&gt;

	&lt;p&gt;Add the following:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
PATH=/usr/local/bin:/usr/bin:/bin
SHELL=/bin/bash

# m h  dom mon dow   command

# Update the sitemap every day at 24:00

00 00 * * * cd /var/www/xxx/current &amp;#38;&amp;#38; RAILS_ENV=production rake sitemap:generate

&lt;/code&gt;
&lt;/pre&gt;

	&lt;h2&gt;Author&lt;/h2&gt;


	&lt;p&gt;&lt;a href=&quot;http://christianhellsten.com&quot;&gt;Christian Hellsten&lt;/a&gt; (&lt;a href=&quot;http://aktagon.com&quot;&gt;Aktagon Ltd.&lt;/a&gt;)&lt;/p&gt;&lt;/div&gt;
</content>



 </entry>
 
 <entry>
   <title>jQuery in-place-edit Plugin</title>
   <link href="http://aktagon.com/projects/jquery/in-place-edit/index.html"/>
   <updated>2010-01-01T00:00:00+02:00</updated>
   <id>http://aktagon.com/projects/jquery/in-place-edit/jquery-in-place-edit-plugin</id>
   <content type="html">&lt;h1&gt;jQuery in-place-edit Plugin&lt;/h1&gt;
&lt;div class=&quot;entry&quot;&gt;&lt;p&gt;
The jQuery in-place-edit plugin is an easy-to-use and customizable in-place-edit plugin.  The plugin is easy to integrate with &lt;a href=&quot;http://rubyonrails.org&quot;&gt;Ruby on Rails&lt;/a&gt;, PHP, Java, and the kitchen sink.
&lt;/p&gt;

&lt;h2&gt;Examples&lt;/h2&gt;

&lt;p&gt;
To see the plugin in action &lt;a href=&quot;/projects/jquery/in-place-edit/examples&quot;&gt;click here&lt;/a&gt;.
&lt;/p&gt;

&lt;h2&gt;Source code&lt;/h2&gt;

&lt;p&gt;
The source code is hosted at &lt;a href=&quot;http://github.com/christianhellsten&quot;&gt;GitHub&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
The project can also be found at &lt;a href=&quot;http://plugins.jquery.com/project/jquery-in-place-edit&quot;&gt;plugins.jquery.com&lt;/a&gt;.

&lt;/p&gt;
&lt;/div&gt;
</content>



 </entry>
 
 <entry>
   <title>jQuery Google Analytics Plugin</title>
   <link href="http://aktagon.com/projects/jquery/google-analytics/index.html"/>
   <updated>2010-01-01T00:00:00+02:00</updated>
   <id>http://aktagon.com/projects/jquery/google-analytics/jquery-google-analytics-plugin</id>
   <content type="html">&lt;h1&gt;jQuery Google Analytics Plugin&lt;/h1&gt;
&lt;div class=&quot;entry&quot;&gt;
  &lt;p&gt;The jQuery Google Analytics plugin simplifies event and link tracking with Google Analytics.&lt;/p&gt;
  &lt;p&gt;Features:&lt;/p&gt;


  &lt;ul&gt;
  &lt;li&gt;Easy and extensible event and link tracking plugin for jQuery and Google Analytics&lt;/li&gt;
    &lt;li&gt;Automatic internal/external link detection. Default behavior is to skip tracking of internal links.&lt;/li&gt;
    &lt;li&gt;Configurable: skip internal link tracking, metadata extraction using callbacks.&lt;/li&gt;
    &lt;li&gt;Enforces that tracking of events is done only once.&lt;/li&gt;
  &lt;/ul&gt;

  &lt;p&gt;Links:&lt;/p&gt;

  &lt;ul&gt;
    &lt;li&gt;&lt;a href=&quot;http://aktagon.com/projects/jquery/google-analytics/&quot;&gt;Homepage&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://github.com/christianhellsten/jquery-google-analytics/tree/master&quot;&gt;Source &amp;#38; documentation&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://github.com/christianhellsten/jquery-google-analytics/tree/master/index.html&quot;&gt;Examples&lt;/a&gt;&lt;/li&gt;

    &lt;li&gt;&lt;a href=&quot;http://github.com/christianhellsten/jquery-google-analytics/raw/master/jquery.google-analytics.js&quot;&gt;Latest version&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

</content>



 </entry>
 
 
</feed>

