<?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>SwiftLizard Interactive {Design, Development} &#187; php</title>
	<atom:link href="http://www.swift-lizard.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.swift-lizard.com</link>
	<description>all about a it - freelancers life</description>
	<lastBuildDate>Thu, 18 Mar 2010 09:10:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Forcing indexed search to display the title you want.</title>
		<link>http://www.swift-lizard.com/2009/11/19/forcing-the-indexed-search-to-display-the-result-title-you-want/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.swift-lizard.com/2009/11/19/forcing-the-indexed-search-to-display-the-result-title-you-want/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 21:03:20 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[typo3]]></category>

		<guid isPermaLink="false">http://www.swift-lizard.com/?p=143</guid>
		<description><![CDATA[Today I spent about 3 hours searching for solution to get our beloved friend the indexed search engine of Typo3 to take the title of my variant of the a21glossary_advanced_output as the title displayed in its results page. This is because I altered that extension to just display a list of names on the first [...]]]></description>
			<content:encoded><![CDATA[<p>Today I spent about 3 hours searching for solution to get our beloved friend the indexed search engine of Typo3 to take the title of my variant of the a21glossary_advanced_output as the title displayed in its results page.<span id="more-143"></span> This is because I altered that extension to just display a list of names on the first page, and afterwards the description of the glossary entry, a real good wish/suggestion of a customer of mine in a current project from the usability point of view.</p>
<p>So after asking uncle google for several hours, and some more trail an error, I stumbled across this little line:</p>
<pre name="code"  class="php">  $GLOBALS['TSFE']-&gt;indexedDocTitle = "Here the title to display";</pre>
<p>Honestly, this is not mentioned in the documentation of the indexed search or in any other documentation I have found. Searching for &#8220;indexed_search page title&#8221; does not return everything near this, nor did &#8220;index_search result title&#8221; do the magic.</p>
<p>The developer I am, really frustrated, I took a look in the source of the indexed search engine and found the magic line. Asking uncle google about &#8220;indexedDocTitle&#8221; and how it has to be used returned the solution.</p>
<p>So guys and girls to save you some time, and nerves here ist a little extension for you that is configured via typoscript:</p>
<p><a href="http://www.swift-lizard.com/wp-content/uploads/2009/11/T3X_sl_indexedsearch_result_title-1_0_0-z-200911192123.t3x#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">T3X_sl_indexedsearch_result_title-1_0_0-z-200911192123</a></p>
<p>Typoscript for your page is quite easy:</p>
<pre name="code"  class="php"> plugin.tx_slindexedsearchresulttitle_pi1{
	indexedSearchResultTitle = COA
	indexedSearchResultTitle{
			5 = TEXT
			5.value = Hello 

			10 = TEXT
			10.value = World

			wrap = Test Title: |
	 }
  }

  page.999 &lt; plugin.tx_slindexedsearchresulttitle_pi1</pre>
<p>After those lines the extension is included in every page, and depending on what you have configured in TypoScript ( in this case  &#8220;Test Title: Hello World&#8221; ) will be shown in the results of the indexed search.</p>
<p>I hope this saves you some time. By the time I have found some time to write a little manual for the extension, I promise I will upload this to the TER, but until then you will find it here. Just because me myself I hate extensions that come without any manual if there is something to configure.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swift-lizard.com/2009/11/19/forcing-the-indexed-search-to-display-the-result-title-you-want/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The blessings of an Autoloader</title>
		<link>http://www.swift-lizard.com/2009/11/15/the-blessings-of-an-autoloader/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.swift-lizard.com/2009/11/15/the-blessings-of-an-autoloader/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 21:31:25 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[zend]]></category>
		<category><![CDATA[zendFramework]]></category>

		<guid isPermaLink="false">http://swift-lizard.com/?p=80</guid>
		<description><![CDATA[Lately I came across the nice little autoloader provided by the Zend Framework. So I like to share some experiences. First of all, like I mentioned in the &#8220;About&#8221; section of my page, to me Zend is more like a new PEAR, but not like a framework to build websites. This is why I use [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I came across the nice little autoloader provided by the Zend Framework. So I like to share some experiences. First of all, like I mentioned in the &#8220;About&#8221; section of my page, to me Zend is more like a new PEAR, but not like a framework to build websites. This is why I use it together with some other php frameworks and CM-Systems.</p>
<p>But back to the topic of this post,.. I came across the new Autoloader Class provided with the Zend Framework, studied some of  the documentation. <span id="more-80"></span>And Failed,.. perhaps I over-read something but where does the documentation mention that your class has to be prefixed with the name of the namespace one registers ?</p>
<p>But one by one, if you like to use the autoloader either with your extension to the CM-System of your choice (in my case this would be Typo3 at 90% of the projects I work on), or within some php-code you write for a customer, you will have to  start wit something like this:</p>
<pre name="code" class="php">  set_include_path ( '.' . PATH_SEPARATOR . 'path/to/Zend_Framework/' );

  require_once 'Zend/Loader/Autoloader.php';
  $autoloader = Zend_Loader_Autoloader::getInstance ();
  $autoloader-&gt;setFallbackAutoloader ( true );
  $autoloader-&gt;registerNamespace ( 'nameOfYourNameSpace' );</pre>
<p>This was how far I got with the documentation. Because I know some other languages like JAVA, I knew that I would have to create a nice little sub folder called &#8220;nameOfYourNameSpace&#8221; in the directory for a SOAP &#8211; Client I  lately wrote for a customer of mine.  I went on creating the class file I needed:</p>
<pre name="code" class="php">  class myClass
  {
     public function __construct()
     {
        // here the code Starts
     }
  }</pre>
<p>Like I said I am used to the conventions of other languages when it comes to namspaces, so I called the file myClass.php. Now in my imprudence I thought something like this would work right from the Start, as well as I am getting rid of those require_once statements:</p>
<pre name="code" class="php">  $o_myObject = new nameOfYourNameSpace_myClass();</pre>
<p>Hhmmm,&#8230; nope it doesen`t,&#8230; turns out that the class within the file has to be prefixed by the name of the namespace it self. So I had to change the php class to this:</p>
<pre name="code" class="php">  class nameOfYourNameSpace_myClass
  {
     public function __construct()
     {
        // here the code Starts
     }
  }</pre>
<p>After that, the first code segment worked fine for me, and I had a nice little autoloader to load my models. Is it just me, or would you too have expected that it should be enough to create the folder structure registered in the first snippet and call the class just like the file name ?</p>
<p>Perhaps this was a little help for you getting to know the Zend_Loader_Autoloader.<br />
Drop me some thoughts if you like.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swift-lizard.com/2009/11/15/the-blessings-of-an-autoloader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

