<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nerdpress.org &#187; Silverstripe</title>
	<atom:link href="http://www.nerdpress.org/tag/silverstripe/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nerdpress.org</link>
	<description>^__^</description>
	<lastBuildDate>Thu, 03 May 2012 15:03:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Silverstripe Profilable module</title>
		<link>http://www.nerdpress.org/2012/05/03/silverstripe-profilable-module/</link>
		<comments>http://www.nerdpress.org/2012/05/03/silverstripe-profilable-module/#comments</comments>
		<pubDate>Thu, 03 May 2012 15:03:19 +0000</pubDate>
		<dc:creator>Ivo Bathke</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[Silverstripe]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nerdpress.org/?p=2172</guid>
		<description><![CDATA[This is a reoccuring requirement: you need a profile for some object in your project. FE you have a company, a member or a location that should get an address, a marker on the map, an icon, homepage etc. So I created a small silverstripe module that adds a profile tab to any object you [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>This is a reoccuring requirement: you need a profile for some object in your project.<br />
FE you have a company, a member or a location that should get an address, a marker on the map, an icon, homepage etc.</p>
<p>So I created a small <a href="https://github.com/ivoba/silverstripe-profileable" title="silverstripe-profileable">silverstripe module that adds a profile tab</a> to any object you choose in your Silverstripe CMS backend.</p>
<p><a href="http://nerdpress.org/wp-content/uploads/2012/05/silverstripe-profilable.png" rel="lightbox[post-2172]" title=""><img src="http://nerdpress.org/wp-content/uploads/2012/05/silverstripe-profilable-300x129.png" alt="Silverstripe-profilable-300x129 in " width="300" height="129" class="alignnone size-medium wp-image-2174" /></a><br />
<span id="more-2172"></span><br />
It basically extends the very handy <a href="https://github.com/ajshort/silverstripe-addressable" title="silverstripe-addressable">addressable module</a> and inherits all functionality from it like automatic geocoding, regex field to validate postcodes, set allowed countries and rendering of a static google map.<br />
If you just need an Address I recommend to use the addressable module.</p>
<p>Install it easy by:<br />
Simply extend your Object in your _config.php:</p>
<pre class="brush: php; title: ; notranslate">Object::add_extension('myObject', 'Profileable');</pre>
<p>To add the automatic geocoding add:</p>
<pre class="brush: php; title: ; notranslate">Object::add_extension('myObject', 'Geocodable');</pre>
<p>and of course run: <em>dev/build?flush=all</em></p>
<p>It also renders the profile in semantic hContact mircroformat markup, just place <em>$getFullProfileHTML</em> in your template and style it.<br />
If you want to render the Profile different just copy the <em>Profile.ss</em> over to your theme and start editing.</p>
<p>Read more in the readme&#8217;s :)</p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.nerdpress.org/2012/05/03/silverstripe-profilable-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>how to add placeholder attributes in Silverstripe Userforms Module</title>
		<link>http://www.nerdpress.org/2012/04/19/how-to-add-placeholder-attributes-in-silverstripe-userforms-module/</link>
		<comments>http://www.nerdpress.org/2012/04/19/how-to-add-placeholder-attributes-in-silverstripe-userforms-module/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 04:32:28 +0000</pubDate>
		<dc:creator>Max Girkens</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[Silverstripe]]></category>
		<category><![CDATA[placeholder]]></category>
		<category><![CDATA[UserForm]]></category>

		<guid isPermaLink="false">http://nerdpress.org/?p=2160</guid>
		<description><![CDATA[to be honest i didn&#8217;t find a clean way yet, but i thought this workaround might be worth sharing. &#8230;since Silverstripes&#8216; Userforms Module Uses jQuery for Validation you can put these lines of code in your UserDefinedForm.ss Template: This will iterate over the labels in the form , build placeholder attributes from each one and [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>to be honest i didn&#8217;t find a clean way yet, but i thought this workaround might be worth sharing.</p>
<p>&#8230;since <a href="http://www.silverstripe.org/">Silverstripes</a>&#8216; <a href="http://www.silverstripe.org/user-forms-module/">Userforms Module</a> Uses jQuery for Validation you can put these lines of code in your UserDefinedForm.ss Template:<span id="more-2160"></span></p>
<pre class="brush: jscript; title: ; notranslate">
jQuery(document).ready(function(){
    jQuery('form label').each(function(){
      jQuery(this).parent().find('input, textarea').attr('placeholder', jQuery(this).html());
      jQuery(this).remove();
    })
  });
</pre>
<p>This will iterate over the labels in the form , build placeholder attributes from each one and then remove it.</p>
<p>If anyone knows a way how to do this in PHP, i&#8217;d appreciate a comment :)</p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.nerdpress.org/2012/04/19/how-to-add-placeholder-attributes-in-silverstripe-userforms-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverstripe &#8211; has_many- and many_many-relations when duplicating pages</title>
		<link>http://www.nerdpress.org/2012/03/07/silverstripe-has-many-and-many-many-relations-when-duplicating-pages/</link>
		<comments>http://www.nerdpress.org/2012/03/07/silverstripe-has-many-and-many-many-relations-when-duplicating-pages/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 03:48:03 +0000</pubDate>
		<dc:creator>Max Girkens</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[Silverstripe]]></category>
		<category><![CDATA[duplicate pages]]></category>
		<category><![CDATA[has_many]]></category>
		<category><![CDATA[many_many]]></category>

		<guid isPermaLink="false">http://nerdpress.org/?p=2087</guid>
		<description><![CDATA[When you duplicate a page in the Silverstripe Sitetree, related &#8220;has_one&#8221; Items are automatically copied, which is nice. But if you have, lets say, multiple related images on that Page, those are not copied when you duplicate that Page. After reading this discussion, i found out that it&#8217;s actually pretty easy to &#8220;fix&#8221; this. This [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>When you duplicate a page in the <a href="http://www.silverstripe.org/">Silverstripe</a> Sitetree, related &#8220;has_one&#8221; Items are automatically copied, which is nice.</p>
<p>But if you have, lets say, multiple related images on that Page, those are not copied when you duplicate that Page.<span id="more-2087"></span></p>
<p>After reading <a href="http://www.silverstripe.org/data-model-questions/show/17342?start=8">this discussion</a>, i found out that it&#8217;s actually pretty easy to &#8220;fix&#8221; this.</p>
<p>This what i ended up with and seems to be working fine:</p>
<pre class="brush: php; title: ; notranslate">
//assuming your page has the following related Dataobjects

public static $has_many = array(
'Images' =&gt; 'MyImageDataObject'
);

public static $many_many = array(
'Something' =&gt; 'AnotherPageTypeOrWhatever

);
</pre>
<p>The following code would automatically duplicate the has_many related DataObjects<br />
and just set the relation to the many_many Objects on the created page:</p>
<pre><div id="gist-2014023" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="cp">&lt;?php</span> </div><div class='line' id='LC2'><br/></div><div class='line' id='LC3'><span class="k">public</span> <span class="k">function</span> <span class="nf">duplicate</span><span class="p">()</span> <span class="p">{</span></div><div class='line' id='LC4'>&nbsp;</div><div class='line' id='LC5'>&nbsp;&nbsp;<span class="nv">$items_to_duplicate</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span></div><div class='line' id='LC6'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="s1">&#39;Images&#39;</span><span class="p">,</span></div><div class='line' id='LC7'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="s1">&#39;Somehting&#39;</span></div><div class='line' id='LC8'>&nbsp;&nbsp;<span class="p">);</span></div><div class='line' id='LC9'>&nbsp;</div><div class='line' id='LC10'>&nbsp;&nbsp;<span class="nv">$page</span> <span class="o">=</span> <span class="k">parent</span><span class="o">::</span><span class="na">duplicate</span><span class="p">();</span></div><div class='line' id='LC11'>&nbsp;</div><div class='line' id='LC12'>&nbsp;&nbsp;<span class="c1">//duplicate has many items</span></div><div class='line' id='LC13'>&nbsp;&nbsp;<span class="k">foreach</span> <span class="p">(</span><span class="nv">$this</span><span class="o">-&gt;</span><span class="na">has_many</span><span class="p">()</span> <span class="k">as</span> <span class="nv">$key</span> <span class="o">=&gt;</span> <span class="nv">$className</span><span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC14'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="p">(</span><span class="nb">in_array</span><span class="p">(</span><span class="nv">$key</span><span class="p">,</span> <span class="nv">$items_to_duplicate</span><span class="p">))</span> <span class="p">{</span></div><div class='line' id='LC15'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">foreach</span> <span class="p">(</span><span class="nv">$this</span><span class="o">-&gt;</span><span class="p">{</span><span class="nv">$key</span><span class="p">}()</span> <span class="k">as</span> <span class="nv">$item</span><span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC16'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">$newField</span> <span class="o">=</span> <span class="nv">$item</span><span class="o">-&gt;</span><span class="na">duplicate</span><span class="p">();</span></div><div class='line' id='LC17'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">$id</span> <span class="o">=</span> <span class="nb">get_class</span><span class="p">(</span><span class="nv">$this</span><span class="p">)</span> <span class="o">.</span> <span class="s1">&#39;ID&#39;</span><span class="p">;</span></div><div class='line' id='LC18'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">$newField</span><span class="o">-&gt;</span><span class="p">{</span><span class="nv">$id</span><span class="p">}</span> <span class="o">=</span> <span class="nv">$page</span><span class="o">-&gt;</span><span class="na">ID</span><span class="p">;</span></div><div class='line' id='LC19'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">$newField</span><span class="o">-&gt;</span><span class="na">write</span><span class="p">();</span></div><div class='line' id='LC20'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="p">}</span></div><div class='line' id='LC21'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="p">}</span></div><div class='line' id='LC22'>&nbsp;&nbsp;<span class="p">}</span></div><div class='line' id='LC23'>&nbsp;</div><div class='line' id='LC24'>&nbsp;&nbsp;<span class="c1">//set the relation to many_many items on created page</span></div><div class='line' id='LC25'>&nbsp;&nbsp;<span class="k">foreach</span> <span class="p">(</span><span class="nv">$this</span><span class="o">-&gt;</span><span class="na">many_many</span><span class="p">()</span> <span class="k">as</span> <span class="nv">$key</span> <span class="o">=&gt;</span> <span class="nv">$className</span><span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC26'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="p">(</span><span class="nb">in_array</span><span class="p">(</span><span class="nv">$key</span><span class="p">,</span> <span class="nv">$items_to_duplicate</span><span class="p">))</span> <span class="p">{</span></div><div class='line' id='LC27'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">$page</span><span class="o">-&gt;</span><span class="p">{</span><span class="nv">$key</span><span class="p">}()</span><span class="o">-&gt;</span><span class="na">addMany</span><span class="p">(</span><span class="nv">$this</span><span class="o">-&gt;</span><span class="p">{</span><span class="nv">$key</span><span class="p">}()</span><span class="o">-&gt;</span><span class="na">getIdList</span><span class="p">());</span></div><div class='line' id='LC28'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="p">}</span></div><div class='line' id='LC29'>&nbsp;&nbsp;<span class="p">}</span></div><div class='line' id='LC30'>&nbsp;</div><div class='line' id='LC31'>&nbsp;&nbsp;<span class="k">return</span> <span class="nv">$page</span><span class="p">;</span></div><div class='line' id='LC32'><span class="p">}</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/2014023/9d77984e4827c16032bcc39eb270ee8be5f69c90/silverstripe_duplicate_relations.php" style="float:right;">view raw</a>
            <a href="https://gist.github.com/2014023#file_silverstripe_duplicate_relations.php" style="float:right;margin-right:10px;color:#666">silverstripe_duplicate_relations.php</a>
            <a href="https://gist.github.com/2014023">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>
</pre>
<p>..as already suggested <a href="http://www.silverstripe.org/data-model-questions/show/17342?start=8">in the forum</a>, i still think this would make a handy core feature, wouldn&#8217;t it?<br />
Would be cool to globally specify relations to duplicate in the page-config with something like</p>
<pre class="brush: php; title: ; notranslate">
public static $relations_to_copy = array(
 'Images',
 'Somehting'
);
</pre>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.nerdpress.org/2012/03/07/silverstripe-has-many-and-many-many-relations-when-duplicating-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverstripe Setup Script</title>
		<link>http://www.nerdpress.org/2012/02/09/silverstripe-setup-script/</link>
		<comments>http://www.nerdpress.org/2012/02/09/silverstripe-setup-script/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 09:30:42 +0000</pubDate>
		<dc:creator>Ivo Bathke</dc:creator>
				<category><![CDATA[Project Setup]]></category>
		<category><![CDATA[Silverstripe]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Setup]]></category>

		<guid isPermaLink="false">http://nerdpress.org/?p=2041</guid>
		<description><![CDATA[We thought we had to improve our SilverStripe setup script for our development environment. So Max and me rewrote it to add submodules and some other improvements. Just run: and you have silverstripe project folder structure the tutorial theme a already filled git repository sapphire as submodule cms as submodule Uploadify as submodule DataObjectManager as [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>We thought we had to improve our <a href="http://nerdpress.org/2011/09/11/install-silverstripe-with-some-modules-from-git/">SilverStripe setup script</a> for our development environment.<br />
So <a href="http://web-development.cc">Max</a> and me rewrote it to add submodules and some other improvements.</p>
<p>Just run:</p>
<pre class="brush: bash; title: ; notranslate">
./install_silverstripe.sh mynewproject tags/2.4.7
</pre>
<p>and you have</p>
<ul>
<li>silverstripe project folder structure</li>
<li>the tutorial theme</li>
<li>a already filled git repository</li>
<li>sapphire as submodule</li>
<li>cms as submodule</li>
<li>Uploadify as submodule</li>
<li>DataObjectManager as submodule</li>
<li>UserForms as submodule</li>
</ul>
<p><span id="more-2041"></span></p>
<p>What you then still need to do is:</p>
<ul>
<li>create the database</li>
<li>setup a local vhost</li>
<li>open your project url and run the install process</li>
<li>start to code</li>
</ul>
<p>So here it is:<br />
<div id="gist-1768946" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="c"># install silverstripe + common modules from github</span></div><div class='line' id='LC2'><span class="c"># usage sh install_silverstripe.sh &lt;folder_name&gt; &lt;tag/branch&gt;</span></div><div class='line' id='LC3'><span class="c"># examples: </span></div><div class='line' id='LC4'><span class="c"># sh install_silverstripe.sh some_folder tags/2.4.5</span></div><div class='line' id='LC5'><span class="c"># sh install_silverstripe.sh some_folder master</span></div><div class='line' id='LC6'><br/></div><div class='line' id='LC7'><span class="c">#set up project base folder</span></div><div class='line' id='LC8'>git clone git@github.com:silverstripe/silverstripe-installer.git <span class="nv">$1</span></div><div class='line' id='LC9'><span class="nb">cd</span> <span class="nv">$1</span></div><div class='line' id='LC10'>git checkout <span class="nv">$2</span></div><div class='line' id='LC11'><span class="c">#we kill the .git because we want this repo just as starter and init our own repository (instead of export)</span></div><div class='line' id='LC12'>rm -rf .git</div><div class='line' id='LC13'><br/></div><div class='line' id='LC14'><span class="c">#set permissions for install</span></div><div class='line' id='LC15'>chmod 0777 assets assets/*</div><div class='line' id='LC16'>chmod 0666 .htaccess mysite/_config.php assets/*/*</div><div class='line' id='LC17'><br/></div><div class='line' id='LC18'>git init</div><div class='line' id='LC19'><br/></div><div class='line' id='LC20'>git submodule add git@github.com:silverstripe/silverstripe-cms.git cms</div><div class='line' id='LC21'><span class="nb">cd </span>cms</div><div class='line' id='LC22'>git checkout <span class="nv">$2</span></div><div class='line' id='LC23'><span class="nb">cd</span> ..</div><div class='line' id='LC24'>git add cms</div><div class='line' id='LC25'>git commit -m <span class="s2">&quot;checked out submodule cms to $2&quot;</span></div><div class='line' id='LC26'><br/></div><div class='line' id='LC27'>git submodule add git@github.com:silverstripe/sapphire.git sapphire</div><div class='line' id='LC28'><span class="nb">cd </span>sapphire</div><div class='line' id='LC29'>git checkout <span class="nv">$2</span></div><div class='line' id='LC30'><span class="nb">cd</span> ..</div><div class='line' id='LC31'>git add sapphire</div><div class='line' id='LC32'>git commit -m <span class="s2">&quot;checked out submodule sapphire to $2&quot;</span></div><div class='line' id='LC33'><br/></div><div class='line' id='LC34'><span class="c"># add common modules</span></div><div class='line' id='LC35'>git submodule add git://github.com/unclecheese/Uploadify.git uploadify</div><div class='line' id='LC36'>git submodule add git://github.com/unclecheese/DataObjectManager.git dataobject_manager</div><div class='line' id='LC37'>git submodule add git://github.com/silverstripe/silverstripe-userforms.git userform</div><div class='line' id='LC38'><br/></div><div class='line' id='LC39'>git submodule init</div><div class='line' id='LC40'>git submodule update</div><div class='line' id='LC41'><br/></div><div class='line' id='LC42'>git add .</div><div class='line' id='LC43'>git commit -m <span class="s2">&quot;Initial Commit&quot;</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1768946/a9878317a52800cee895671270530714013192f5/install_silverstripe.sh" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1768946#file_install_silverstripe.sh" style="float:right;margin-right:10px;color:#666">install_silverstripe.sh</a>
            <a href="https://gist.github.com/1768946">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>
</p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.nerdpress.org/2012/02/09/silverstripe-setup-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>extend SilverStripe memberprofile module</title>
		<link>http://www.nerdpress.org/2012/01/16/extend-silverstripe-memberprofile-module/</link>
		<comments>http://www.nerdpress.org/2012/01/16/extend-silverstripe-memberprofile-module/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 09:50:42 +0000</pubDate>
		<dc:creator>Ivo Bathke</dc:creator>
				<category><![CDATA[Silverstripe]]></category>

		<guid isPermaLink="false">http://nerdpress.org/?p=2021</guid>
		<description><![CDATA[Alright, SilverStripe again, still our CMS of choice. Today i&#8217;d like to promote a very helpful module that provides Register and Profile Pages for Members for the Frontend. The memberprofiles module. It comes with a lot of features and customize options for nearly everthing you might need for Frontend Member Handling. Further it is fully [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Alright, <a href="http://www.silverstripe.org/">SilverStripe</a> again, still our CMS of choice.<br />
Today i&#8217;d like to promote a very helpful module that provides Register and Profile Pages for Members for the Frontend.<br />
The <a href="https://github.com/ajshort/silverstripe-memberprofiles">memberprofiles module</a>.<br />
It comes with a lot of features and customize options for nearly everthing you might need for Frontend Member Handling.<br />
Further it is fully extendible to customize it even more.</p>
<p>For a starter tutorial i recommend a very <a href="http://deadlytechnology.com/silverstripe/membership-module/">good post</a> by deadlytechnology.<br />
I would like to describe how you extend it.</p>
<p>First lets install it (with the <em>orderable module</em> dependency):</p>
<p><span id="more-2021"></span></p>
<pre class="brush: bash; title: ; notranslate">
cd my_silverstripe_project
git clone https://github.com/ajshort/silverstripe-orderable.git
mv silverstripe-orderable/ orderable
git clone http://github.com/ajshort/silverstripe-memberprofiles.git
mv silverstripe-memberprofiles/ memberprofiles
</pre>
<p>Run <em>/dev/build?flush=all</em></p>
<p>At this point i like to skip the further setup, for this, go read the post recommended above.</p>
<p>So now lets extend f.e. the Register Page for the Member to provide a custom template for a custom member, say: Customer, and some additional logic.</p>
<p>Just make a new file <em>mysite/code/CustomerRegisterPage.php</em>:</p>
<pre class="brush: php; title: ; notranslate">
class CustomerRegisterPage extends MemberProfilePage {
 ...
}

class CustomerRegisterPage_Controller extends MemberProfilePage_Controller {
 ...
}
</pre>
<p>and a template: <em>themes/mytheme/CustomerRegisterPage.ss</em><br />
In this template you can now add your markup and include the MemberProfileForm via $RegisterForm.<br />
Or make your own Form by overwriting the RegisterForm in the Controller or make a complete new Form.</p>
<p>To register the template with the extended Page we have to overwrite the index method in the controller.</p>
<pre class="brush: php; title: ; notranslate">
public function index() {
        if (isset($_GET['BackURL'])) {
            Session::set('MemberProfile.REDIRECT', $_GET['BackURL']);
        }
        return $this-&gt;renderWith(array('CustomerRegisterPage', 'Page'));
}
</pre>
<p>Now we overwrite the register method to add some additional logic, f.e. to add a custom DataObject from a many_many relation from the customer Member.</p>
<pre class="brush: php; title: ; notranslate">
public function register($data, Form $form) {
        if ($member = $this-&gt;addMember($form)) {
            if (isset($data['OptionsID'])) {
                foreach ($data['OptionsID'] as $key =&gt; $value) {
                    $member-&gt;Options()-&gt;setByIDList($data['OptionsID']);
                }
            }
            return $this-&gt;redirect($this-&gt;Link('afterregistration'));
        } else {
            return $this-&gt;redirectBack();
        }
}
</pre>
<p>Thats it!<br />
Now create a new CustomerRegisterPage in the backend and do as you learned from deadlytechnology.</p>
<p><a href="http://nerdpress.org/wp-content/uploads/2012/01/silverstripe_memberprofiles.png" rel="lightbox[post-2021]" title=""><img class="alignnone size-medium wp-image-2023" src="http://nerdpress.org/wp-content/uploads/2012/01/silverstripe_memberprofiles-300x104.png" alt="Silverstripe Memberprofiles-300x104 in " width="300" height="104" /></a></p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.nerdpress.org/2012/01/16/extend-silverstripe-memberprofile-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>install silverstripe with some modules from GIT</title>
		<link>http://www.nerdpress.org/2011/09/11/install-silverstripe-with-some-modules-from-git/</link>
		<comments>http://www.nerdpress.org/2011/09/11/install-silverstripe-with-some-modules-from-git/#comments</comments>
		<pubDate>Sun, 11 Sep 2011 12:53:22 +0000</pubDate>
		<dc:creator>Max Girkens</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Silverstripe]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[installer]]></category>

		<guid isPermaLink="false">http://nerdpress.org/?p=1634</guid>
		<description><![CDATA[This is a small shell script to set up silverstripe CMS along with some modules i often use (as seen in ivo&#8217;s post) The script has two parameters: - the folder to clone the whole thing into - the branch/tag to checkout afterwards As Silverstripe itself is split up in 3 repositories (the installer/base folder, [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>This is a small shell script to set up <a href="http://www.silverstripe.org/">silverstripe CMS</a><br />
along with some modules i often use (as seen in <a href="http://nerdpress.org/2011/06/06/silverstripe-image-gallery-installation/">ivo&#8217;s post</a>)</p>
<p>The script has two parameters:<br />
- the folder to clone the whole thing into<br />
- the branch/tag to checkout afterwards</p>
<pre class="brush: bash; title: ; notranslate">
# install silverstripe + common modules from github
# usage sh install_silverstripe.sh &lt;folder_name&gt; &lt;tag/branch&gt;
# examples:
# sh install_silverstripe.sh some_folder tags/2.4.5
# sh install_silverstripe.sh some_folder master
</pre>
<p><span id="more-1634"></span></p>
<p>As Silverstripe itself is split up in 3 repositories<br />
(the installer/base folder, the cms and the sapphire framework itself)<br />
we fetch the base folder first:</p>
<pre class="brush: bash; title: ; notranslate">
#set up project base folder
git clone git@github.com:silverstripe/silverstripe-installer.git $1
cd $1
git checkout $2
</pre>
<p>Get the cms</p>
<pre class="brush: bash; title: ; notranslate">
#setup cms
git clone git@github.com:silverstripe/silverstripe-cms.git cms
cd cms
git checkout $2
cd ..
</pre>
<p>Get sapphire &#8230;</p>
<pre class="brush: bash; title: ; notranslate">
#setup framework
git clone git@github.com:silverstripe/sapphire.git sapphire
cd sapphire
git checkout $2
cd ..
</pre>
<p>Setup some permissions for the web installer.</p>
<pre class="brush: bash; title: ; notranslate">
#set permissions for install
chmod 0777 assets assets/*
chmod 0666 .htaccess mysite/_config.php assets/*/*
</pre>
<p>Fetch the blackcandy theme from a fourth repository.<br />
Backup the tutorial theme in case we need it.</p>
<pre class="brush: bash; title: ; notranslate">
#install blackcandy theme
mv themes/tutorial ./
rm -rf themes
git clone https://github.com/silverstripe-themes/silverstripe-blackcandy.git themes
cd themes
git checkout $2
cd ..
mv tutorial themes
</pre>
<p>Install some modules</p>
<pre class="brush: bash; title: ; notranslate">
# install common modules
git clone https://github.com/unclecheese/Uploadify.git uploadify
git clone https://github.com/unclecheese/DataObjectManager.git dataobject_manager
git clone https://github.com/silverstripe/silverstripe-userforms.git userforms
</pre>
<p><strong>iIput the script <a href="https://gist.github.com/1209496">on github</a></strong><br />
&#8230;in case you might wanna use it or add something i&#8217;ve missed.</p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.nerdpress.org/2011/09/11/install-silverstripe-with-some-modules-from-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SilverStripe Image Gallery installation</title>
		<link>http://www.nerdpress.org/2011/06/06/silverstripe-image-gallery-installation/</link>
		<comments>http://www.nerdpress.org/2011/06/06/silverstripe-image-gallery-installation/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 10:33:01 +0000</pubDate>
		<dc:creator>Ivo Bathke</dc:creator>
				<category><![CDATA[Silverstripe]]></category>

		<guid isPermaLink="false">http://nerdpress.org/?p=1511</guid>
		<description><![CDATA[Theres a lot of old, deprecated and now wrong installation guides for the SilverStripe Image Gallery Module on the web that will lead you to where you dont want to. Dont trust them! Unclecheese made some changes to the module dependencies and also moved to git, some time ago. He now uses the new Uploadify [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Theres a lot of old, deprecated and now wrong installation guides for the SilverStripe Image Gallery Module on the web that will lead you to where you dont want to. Dont trust them!</p>
<p><a href="http://www.leftandmain.com/">Unclecheese</a> made some changes to the module dependencies and also moved to git, some time ago. He now uses the new <a href="https://github.com/unclecheese/Uploadify">Uploadify</a> module instead of the <a href="http://silverstripe.org/swfuploadfield-module/">SwfFileUpload</a> module.</p>
<p>So a working installation of the image-gallery for git-people is to:</p>
<p><span id="more-1511"></span></p>
<p>install silverstripe 2.4.* (latest)</p>
<p>get the modules via git:</p>
<pre class="brush: bash; title: ; notranslate">
cd mysproject
git clone https://github.com/unclecheese/ImageGallery.git image_gallery
git clone https://github.com/unclecheese/Uploadify.git uploadify
git clone https://github.com/unclecheese/DataObjectManager.git dataobject_manager
</pre>
<p>login as admin<br />
run:</p>
<p>http://project.local/dev/build?flush=1</p>
<p>Done!</p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.nerdpress.org/2011/06/06/silverstripe-image-gallery-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SilverStripe 3 UI Vorschau</title>
		<link>http://www.nerdpress.org/2011/03/08/silverstripe-3-ui-vorschau/</link>
		<comments>http://www.nerdpress.org/2011/03/08/silverstripe-3-ui-vorschau/#comments</comments>
		<pubDate>Tue, 08 Mar 2011 09:58:24 +0000</pubDate>
		<dc:creator>Ivo Bathke</dc:creator>
				<category><![CDATA[Silverstripe]]></category>

		<guid isPermaLink="false">http://nerdpress.org/?p=1408</guid>
		<description><![CDATA[Wie im SilverStripe Blog gelesen kann man die Entwicklung der neuen SilverStripe 3 UI auf github verfolgen. Außerdem gibts hier ein Interview mit dem Hauptdesigner. &#8230; und wenn man möchte kann man in der Google Group seine Vorschläge loswerden. Ganz interessante Einblicke, wie ich finde.]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Wie im SilverStripe <a href="http://silverstripe.org/picturing-what-3-0-will-look-like/">Blog</a> gelesen kann man die Entwicklung der neuen SilverStripe 3 UI auf <a href="https://github.com/silverstripe/silverstripe-design">github</a> verfolgen.</p>
<p>Außerdem gibts <a href="http://www.ssbits.com/blog/2011/an-interview-with-felipe-skroski-designing-silverstripe-3-ui-development-and-the-future-of-content-management/">hier</a> ein Interview mit dem Hauptdesigner.</p>
<p>&#8230; und wenn man möchte kann man in der <a href="http://groups.google.com/group/silverstripe-dev/">Google Group</a> seine Vorschläge loswerden.</p>
<p>Ganz interessante Einblicke, wie ich finde.</p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.nerdpress.org/2011/03/08/silverstripe-3-ui-vorschau/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>i18n-fieldtypes module für Silverstripe</title>
		<link>http://www.nerdpress.org/2011/02/28/i18n-fieldtypes-module-fur-silverstripe/</link>
		<comments>http://www.nerdpress.org/2011/02/28/i18n-fieldtypes-module-fur-silverstripe/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 14:15:19 +0000</pubDate>
		<dc:creator>Ivo Bathke</dc:creator>
				<category><![CDATA[Silverstripe]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[sapphire]]></category>

		<guid isPermaLink="false">http://nerdpress.org/?p=1380</guid>
		<description><![CDATA[Heute möchte ich mal ein Silverstripe Modul von mir vorstellen: silverstripe-i18n-fieldtypes Es ist eigentlich eher ein Work-around für fehlenden oder ungenügenden I18n Support in sapphire. Eigentlich sind wir hier alle Fans von Silverstripe, da es für Coder einfach anzupassen ist, aber speziell beim Umgang mit Datums und Currency Typen in Silverstripe merkt man, dass da [...]]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Heute möchte ich mal ein Silverstripe Modul von mir vorstellen: <a href="http://code.google.com/p/silverstripe-i18n-fieldtypes/">silverstripe-i18n-fieldtypes</a><br />
Es ist eigentlich eher ein Work-around für fehlenden oder ungenügenden I18n Support in sapphire.<br />
Eigentlich sind wir hier alle Fans von Silverstripe, da es für Coder einfach anzupassen ist, aber<br />
speziell beim Umgang mit Datums und Currency Typen in Silverstripe merkt man, dass da noch was fehlt.<br />
Es kann gut sein, dass die nächste Version von sapphire das Modul obsolet machen -ich hoffe es sogar-<br />
aber bis dahin, soll dieses Modul helfen.</p>
<p>Für Datum Werte mit deutscher Formatierung muss man zB überall in den templates folgendes machen</p>
<pre class="brush: php; title: ; notranslate">
$Datetime.FormatI18N(%e. %B %G).
</pre>
<p>Es reicht nicht einfach sowas in der config anzugeben:</p>
<pre class="brush: php; title: ; notranslate">
i18n::set_locale('de_DE');
</pre>
<p>Und das ist schon ganz schön nervig.<br />
Aber hier hilft dann das Modul.</p>
<p>Sapphire kennt verschiedene Wege zur Formatierung, die in Zukunft wahrscheinlich noch vereinheitlicht werden.<br />
Im Groben sind das:</p>
<p><span id="more-1380"></span></p>
<ul>
<li>- PHP setlocale for LC_TIME</li>
<li>- Zend Date</li>
<li>- sapphire Money Class based on Zend Currency</li>
<li>- sapphire deprecated Currency class for compatibility</li>
</ul>
<p><br/><br />
Da muss man dann schauen was für einen passt, das Modul unterstützt auf jeden Fall alle diese.</p>
<p>Installiert wird es, wie alle Silverstripe Module, einfach in die Root-ebene des Projects kopieren und fertig.</p>
<p>In der <em>mysite/_config.php</em> muss man dann einfach die jeweilige Datums oder Currency Klasse<br />
mit der Subklasse des Moduls ersetzen und schon hat man den vollen Zugriff auf zB die <a href="http://framework.zend.com/manual/en/zend.date.html">ZEND Datums Klasse</a></p>
<pre class="brush: php; title: ; notranslate">
i18n::set_default_locale('de_DE');
Object::useCustomClass('SS_Datetime','ZendDate',true);
</pre>
<p>Will man kein Zend benutzen, kann der PHP Weg über die locale gegangen werden.<br />
Die Formatierungen finden sich im lang file des Moduls, können aber auch explizit angegeben werden.</p>
<p>Alle Möglichkeiten sind in der <em>_config.php</em> erklärt:</p>
<pre class="brush: php; title: ; notranslate">
//Date Formating -the PHP way-
//Object::useCustomClass('SS_Datetime','I18nDatetime', true);
//values then come from the lang file
//if you want to use custom formating then set also:
//I18nDatetime::setFormatNice('%e. %B %G');

//Date Formating -the Zend way-
//Object::useCustomClass('SS_Datetime','ZendDate', true);
//values then come from the lang file
//if you want to use custom formating then set also:
//ZendDate::setFormatNice('j. F Y, G:i');

//Money Formating -the SS Currency Way-
//Object::useCustomClass('Currency','I18nCurrency', true)
//values then come from the lang file
//if you want to use custom formating then set also:
//I18nCurrency::setDecimalDelimiter(',');
//I18nCurrency::setThousandDelimiter('.'); 

//Money Formating -the Money / Zend way -
//Object::useCustomClass('Money','CustomMoney', true);
//@see http://framework.zend.com/manual/en/zend.currency.options.html
//CustomMoney::setOptions(array('display' =&gt; Zend_Currency::USE_SHORTNAME,
//                                                        'position' =&gt; Zend_Currency::RIGHT));
</pre>
<p>Auf meiner TODO stehen dann noch weitere Sprachfiles, sowie ein paar UnitTests.<br />
Probierts mal aus und über feedback freut man sich natürlich.</p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.nerdpress.org/2011/02/28/i18n-fieldtypes-module-fur-silverstripe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverstripe 2.4 release!</title>
		<link>http://www.nerdpress.org/2010/05/05/silverstripe-2-4-release/</link>
		<comments>http://www.nerdpress.org/2010/05/05/silverstripe-2-4-release/#comments</comments>
		<pubDate>Wed, 05 May 2010 16:11:31 +0000</pubDate>
		<dc:creator>Max Girkens</dc:creator>
				<category><![CDATA[Silverstripe]]></category>
		<category><![CDATA[cms]]></category>

		<guid isPermaLink="false">http://nerdpress.org/?p=978</guid>
		<description><![CDATA[Juhu: http://silverstripe.org/silverstripe-2-4-release-a-significant-step-forward/]]></description>
			<content:encoded><![CDATA[
<!-- google_ad_section_start -->
<p>Juhu:<br />
<a href="http://silverstripe.org/silverstripe-2-4-release-a-significant-step-forward/">http://silverstripe.org/silverstripe-2-4-release-a-significant-step-forward/</a></p>
<!-- google_ad_section_end -->
]]></content:encoded>
			<wfw:commentRss>http://www.nerdpress.org/2010/05/05/silverstripe-2-4-release/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

