<?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>Blog for the Web Programmers</title>
	<atom:link href="http://blog.chandanweb.com/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.chandanweb.com</link>
	<description>A useful blog with code assitance on Typo3, Drupal, PHP, Apache, OpenSSL and PHP Frameworks</description>
	<lastBuildDate>Thu, 13 Jun 2013 04:33:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>TYPO3 FAL (file abstraction layer) in Extbase/Fluid extension</title>
		<link>http://blog.chandanweb.com/typo3/typo3-fal-file-abstraction-layer-in-extbasefluid-extension</link>
		<comments>http://blog.chandanweb.com/typo3/typo3-fal-file-abstraction-layer-in-extbasefluid-extension#comments</comments>
		<pubDate>Wed, 12 Jun 2013 09:18:13 +0000</pubDate>
		<dc:creator>Ganybhat</dc:creator>
				<category><![CDATA[Typo3]]></category>
		<category><![CDATA[extbase]]></category>
		<category><![CDATA[fluid]]></category>

		<guid isPermaLink="false">http://blog.chandanweb.com/?p=593</guid>
		<description><![CDATA[Recently I came across to implement extbase plugin having multiple file upload FE form. My Typo3 version was 6.1 The extension was created using Extension Builder File ext_tables.sql CREATE TABLE tx_clientside_domain_model_orderitems ( : files int(11) unsigned DEFAULT &#8217;0&#8242; NOT NULL, : ); File Configuration/TCA/OrderItems.php $TCA['tx_clientside_domain_model_orderitems'] = array( //&#8230;&#8230; removed code &#8216;files&#8217; =&#62; array( &#8216;exclude&#8217; =&#62; 1, &#8216;label&#8217; [...]]]></description>
				<content:encoded><![CDATA[<p>Recently I came across to implement extbase plugin having multiple file upload FE form.</p>
<p>My Typo3 version was 6.1<br />
The extension was created using Extension Builder</p>
<p><strong>File ext_tables.sql</strong></p>
<blockquote>
<p style="text-align: left">CREATE TABLE tx_clientside_domain_model_orderitems (<br />
:<br />
files int(11) unsigned DEFAULT &#8217;0&#8242; NOT NULL,<br />
:</p>
<p>);</p></blockquote>
<p>File Configuration/TCA/OrderItems.php</p>
<blockquote><p>$TCA['tx_clientside_domain_model_orderitems'] = array(<br />
//&#8230;&#8230; removed code</p>
<p>&#8216;files&#8217; =&gt; array(<br />
&#8216;exclude&#8217; =&gt; 1,<br />
&#8216;label&#8217; =&gt; &#8216;Files&#8217;,<br />
&#8216;config&#8217; =&gt; \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(&#8216;files&#8217;, array(<br />
&#8216;appearance&#8217; =&gt; array(<br />
&#8216;createNewRelationLinkTitle&#8217; =&gt; &#8216;LLL:EXT:cms/locallang_ttc.xlf:images.addFileReference&#8217;<br />
),<br />
), $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']),<br />
),</p>
<p>//&#8230;..</p>
<p>);</p></blockquote>
<p><strong>File Classes/Domain/Model/OrderItems.php</strong></p>
<blockquote><p>class OrderItems extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {</p>
<p>/**<br />
* Files<br />
*<br />
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage&lt;\TYPO3\CMS\Extbase\Domain\Model\FileReference&gt;<br />
*/<br />
protected $files;</p>
<p>/**<br />
* __construct<br />
*<br />
* @return AbstractObject<br />
*/<br />
public function __construct() {<br />
$this-&gt;files = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();<br />
}<br />
/**<br />
* Returns the files<br />
*<br />
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<br />
*/<br />
public function getFiles() {<br />
return $this-&gt;files;<br />
}</p>
<p>}</p></blockquote>
<p>I have not used function setFiles here.</p>
<p><strong>File Classes/Controller/OrderItemsController.php</strong></p>
<blockquote><p>class OrderItemsController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {</p>
<p>/**<br />
* orderItemsRepository<br />
*<br />
* @var \TYPO3\Clientside\Domain\Repository\OrderItemsRepository<br />
* @inject<br />
*/<br />
protected $orderItemsRepository;</p>
<p>/**<br />
* action create<br />
*<br />
* @param \TYPO3\Clientside\Domain\Model\OrderItems $newOrderItems<br />
* @dontvalidate $newOrderItems<br />
* @return void<br />
*/<br />
public function createAction(\TYPO3\Clientside\Domain\Model\OrderItems $newOrderItems) {</p>
<p>$this-&gt;orderItemsRepository-&gt;add($newOrderItems);</p>
<p>$persistenceManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(&#8216;Tx_Extbase_Persistence_Manager&#8217;);<br />
$persistenceManager-&gt;persistAll();<br />
$uidNew = $newOrderItems-&gt;getUid();</p>
<p>if ($_FILES['tx_clientside_orderitems']) {<br />
for ($i = 0; $i &lt; count($_FILES['tx_clientside_orderitems']['name']['myfiles']); $i++) {<br />
$file = array();<br />
$file['name'] = $_FILES['tx_clientside_orderitems']['name']['myfiles'][$i];<br />
$file['type'] = $_FILES['tx_clientside_orderitems']['type']['myfiles'][$i];<br />
$file['tmp_name'] = $_FILES['tx_clientside_orderitems']['tmp_name']['myfiles'][$i];<br />
$file['size'] = $_FILES['tx_clientside_orderitems']['size']['myfiles'][$i];<br />
if ($file['name']) {<br />
$files = $this-&gt;uploadFile($file['name'], $file['type'], $file['tmp_name'], $file['size']);<br />
$sysFileCreate = $this-&gt;orderItemsRepository-&gt;myFileOperationsFal($files, $file['type'], $file['size'], $uidNew);<br />
}<br />
}<br />
}</p>
<p>$this-&gt;flashMessageContainer-&gt;add(&#8216;Your new OrderItems was created.&#8217;);<br />
$this-&gt;redirect(&#8216;list&#8217;);<br />
}</p>
<p>protected function uploadFile($name, $type, $temp, $size) {<br />
if($size &gt; 0) {<br />
$basicFileFunctions = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(&#8216;t3lib_basicFileFunctions&#8217;);</p>
<p>$name = $basicFileFunctions-&gt;cleanFileName($name);<br />
$uploadPath = $basicFileFunctions-&gt;cleanDirectoryName(&#8216;fileadmin/user_upload/&#8217;);<br />
$uniqueFileName = $basicFileFunctions-&gt;getUniqueName($name, $uploadPath);<br />
$fileStored = move_uploaded_file($temp, $uniqueFileName);</p>
<p>$returnValue = basename($uniqueFileName);<br />
}</p>
<p>return $returnValue;<br />
}</p>
<p>}</p></blockquote>
<p>&nbsp;</p>
<p><strong>File Classes/Romain/Repository/OrderItemsRepository.php</strong></p>
<blockquote><p>class OrderItemsRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {</p>
<p>public function myFileOperationsFal($filename, $filetype, $filesize, $uidNew){</p>
<p>$newSysFields = array(<br />
&#8216;pid&#8217; =&gt; 0,<br />
&#8216;identifier&#8217; =&gt;&#8217;/user_upload/&#8217;.$filename,<br />
&#8216;mime_type&#8217; =&gt; $filetype,<br />
&#8216;name&#8217; =&gt; $filename,<br />
&#8216;size&#8217; =&gt; $filesize,<br />
&#8216;storage&#8217; =&gt; 1,<br />
&#8216;crdate&#8217; =&gt; $GLOBALS['EXEC_TIME'],<br />
&#8216;tstamp&#8217; =&gt; $GLOBALS['EXEC_TIME']<br />
);</p>
<p>$newSysRes = $GLOBALS['TYPO3_DB']-&gt;exec_INSERTquery(&#8216;sys_file&#8217;, $newSysFields);</p>
<p>$uid_local = $GLOBALS['TYPO3_DB']-&gt;sql_insert_id($newSysRes);<br />
$newRefFields = array(<br />
&#8216;pid&#8217; =&gt; 88,<br />
&#8216;tablenames&#8217; =&gt; &#8216;tx_clientside_domain_model_orderitems&#8217;,<br />
&#8216;uid_foreign&#8217; =&gt; $uidNew,<br />
&#8216;uid_local&#8217; =&gt; $uid_local,<br />
&#8216;table_local&#8217; =&gt; &#8216;sys_file&#8217;,<br />
&#8216;fieldname&#8217; =&gt; &#8216;files&#8217;,<br />
&#8216;crdate&#8217; =&gt; $GLOBALS['EXEC_TIME'],<br />
&#8216;tstamp&#8217; =&gt; $GLOBALS['EXEC_TIME']<br />
);</p>
<p>$GLOBALS['TYPO3_DB']-&gt;exec_INSERTquery(&#8216;sys_file_reference&#8217;, $newRefFields);<br />
}</p>
<p>}</p></blockquote>
<p>Here I am writing custom File operation function, that creates new entry in table sys_file and mm relation to table sys_file_reference.<br />
I have searched google for any other good way, without success <img src='http://blog.chandanweb.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Suggestions are welcome <img src='http://blog.chandanweb.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>File Resources/Private/Templates/Root/New.html</strong></p>
<blockquote><p>&lt;f:form action=&#8221;create&#8221; enctype=&#8221;multipart/form-data&#8221; name=&#8221;newOrderItems&#8221; object=&#8221;{newOrderItems}&#8221; &gt;<br />
&lt;input name=&#8221;tx_clientside_orderitems[myfiles][]&#8221; type=&#8221;file&#8221; /&gt;&lt;br /&gt;<br />
&lt;input name=&#8221;tx_clientside_orderitems[myfiles][]&#8221; type=&#8221;file&#8221; /&gt;&lt;br /&gt;<br />
&lt;f:form.submit value=&#8221;Create new&#8221; /&gt;&lt;/f:form&gt;</p></blockquote>
<p>&nbsp;</p>
<p>Here is how to dispaly that images in frontend</p>
<p><strong>File Resources/Private/Templates/Root/Show.htm</strong>l</p>
<blockquote><p>&lt;f:for each=&#8221;{orderItems.files}&#8221; as=&#8221;file&#8221;&gt;<br />
&lt;f:image src=&#8221;{file.uid}&#8221; alt=&#8221;" width=&#8217;101&#8242; height=&#8221;67&#8243; treatIdAsReference=&#8221;1&#8243;/&gt;<br />
&lt;/f:for&gt;</p></blockquote>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chandanweb.com/typo3/typo3-fal-file-abstraction-layer-in-extbasefluid-extension/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Open Graph Tags example for use with Facebook</title>
		<link>http://blog.chandanweb.com/typo3/open-graph-tags-example-for-use-with-facebook</link>
		<comments>http://blog.chandanweb.com/typo3/open-graph-tags-example-for-use-with-facebook#comments</comments>
		<pubDate>Mon, 10 Jun 2013 09:01:37 +0000</pubDate>
		<dc:creator>spabhat</dc:creator>
				<category><![CDATA[Typo3]]></category>
		<category><![CDATA[typoscript]]></category>
		<category><![CDATA[andWhere]]></category>
		<category><![CDATA[cObjNum]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[pidInList]]></category>
		<category><![CDATA[renderObj]]></category>
		<category><![CDATA[selectFields]]></category>
		<category><![CDATA[split]]></category>
		<category><![CDATA[stdWrap.split]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://blog.chandanweb.com/?p=589</guid>
		<description><![CDATA[page.headerData.120 = COA page.headerData.120 { 10 = TEXT 10 { typolink.parameter.data = TSFE:id typolink.forceAbsoluteUrl = 1 typolink.returnLast = url typolink.additionalParams.cObject = COA typolink.additionalParams.cObject { 10 = TEXT 10.dataWrap = &#38;tx_ttnews[tt_news]={GP:tx_ttnews&#124;tt_news} 10.if.isTrue.data = GP:tx_ttnews&#124;tt_news 20 = TEXT 20.dataWrap = &#38;tx_ttnews[cat]={GP:tx_ttnews&#124;cat} 20.if.isTrue.data = GP:tx_ttnews&#124;cat } wrap = &#60;meta property=&#8221;og:url&#8221; content=&#8221;&#124;&#8221;/&#62; } 20 &#60; page.headerData.1 20 { wrap [...]]]></description>
				<content:encoded><![CDATA[<p>page.headerData.120 = COA<br />
page.headerData.120 {<br />
10 = TEXT<br />
10 {<br />
typolink.parameter.data = TSFE:id<br />
typolink.forceAbsoluteUrl = 1<br />
typolink.returnLast = url<br />
typolink.additionalParams.cObject = COA<br />
typolink.additionalParams.cObject {<br />
10 = TEXT<br />
10.dataWrap = &amp;tx_ttnews[tt_news]={GP:tx_ttnews|tt_news}<br />
10.if.isTrue.data = GP:tx_ttnews|tt_news<br />
20 = TEXT<br />
20.dataWrap = &amp;tx_ttnews[cat]={GP:tx_ttnews|cat}<br />
20.if.isTrue.data = GP:tx_ttnews|cat<br />
}<br />
wrap = &lt;meta property=&#8221;og:url&#8221; content=&#8221;|&#8221;/&gt;<br />
}<br />
20 &lt; page.headerData.1<br />
20 {<br />
wrap = &lt;meta property=&#8221;og:title&#8221; content=&#8221;| {$siteTitle}&#8221;/&gt;<br />
}</p>
<p>30 = TEXT<br />
30.value =<br />
30.wrap = &lt;meta property=&#8221;og:site_name&#8221; content=&#8221;|{$siteTitle}&#8221;/&gt;</p>
<p>40 = TEXT<br />
40.value = &lt;meta property=&#8221;og:description&#8221; content=&#8221;" /&gt;<br />
40.wrap = &lt;meta property=&#8221;og:type&#8221; content=&#8221;website&#8221; /&gt;|</p>
<p>}</p>
<p>In additions to the above, we can also set the og:image property on a news detail page like given below:<br />
This new updated Code also includes a default image when news has no image.</p>
<p>page.headerData.120.50 = COA<br />
page.headerData.120.50 {<br />
20 = CONTENT<br />
20 {<br />
table = tt_news<br />
select {<br />
pidInList = 18<br />
andWhere = uid={GP:tx_ttnews|tt_news}<br />
andWhere.insertData =1<br />
selectFields = uid,pid,image<br />
}<br />
renderObj = COA<br />
renderObj {<br />
10 = TEXT<br />
10.value =&lt;meta property=&#8221;og:image&#8221; content=&#8221;http://www.mydomain.com/uploads/pics/<br />
20 = TEXT<br />
20 {<br />
field = image<br />
split {<br />
token = ,<br />
max = 1<br />
cObjNum = 1<br />
1.current = 1<br />
}<br />
ifEmpty.cObject = TEXT<br />
ifEmpty.cObject {<br />
value = alt-image.jpg<br />
}</p>
<p>}<br />
30 = TEXT<br />
30.value = &#8221; /&gt;<br />
}<br />
}<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chandanweb.com/typo3/open-graph-tags-example-for-use-with-facebook/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Typoscript snippet for getting parent title, based on selected Templavoila Template Object</title>
		<link>http://blog.chandanweb.com/typo3/typoscript-snippet-for-getting-parent-title-based-on-selected-templavoila-template-object</link>
		<comments>http://blog.chandanweb.com/typo3/typoscript-snippet-for-getting-parent-title-based-on-selected-templavoila-template-object#comments</comments>
		<pubDate>Tue, 28 May 2013 13:42:57 +0000</pubDate>
		<dc:creator>spabhat</dc:creator>
				<category><![CDATA[TemplaVoila]]></category>
		<category><![CDATA[Typo3]]></category>
		<category><![CDATA[typoscript]]></category>

		<guid isPermaLink="false">http://blog.chandanweb.com/?p=585</guid>
		<description><![CDATA[&#160; 5 = TEXT 5 { #first check with tx_templavoila_to ifEmpty.cObject = TEXT ifEmpty.cObject { data = leveltitle:-2 stdWrap.case = upper if { value = 34 isInList.data = levelfield:-1, tx_templavoila_to, slide } } #then check with tx_templavoila_next_to ifEmpty.ifEmpty.cObject &#60; .ifEmpty.cObject ifEmpty.ifEmpty.cObject = TEXT ifEmpty.ifEmpty.cObject.if.isInList.data = levelfield:-1, tx_templavoila_next_to, slide noTrimWrap = &#124;&#124; &#8211; &#124; }]]></description>
				<content:encoded><![CDATA[<p>&nbsp;</p>
<p>5 = TEXT<br />
5 {<br />
#first check with tx_templavoila_to<br />
ifEmpty.cObject = TEXT<br />
ifEmpty.cObject {<br />
data = leveltitle:-2<br />
stdWrap.case = upper<br />
if {<br />
value = 34<br />
isInList.data = levelfield:-1, tx_templavoila_to, slide<br />
}<br />
}<br />
#then check with tx_templavoila_next_to<br />
ifEmpty.ifEmpty.cObject &lt; .ifEmpty.cObject<br />
ifEmpty.ifEmpty.cObject = TEXT<br />
ifEmpty.ifEmpty.cObject.if.isInList.data = levelfield:-1, tx_templavoila_next_to, slide</p>
<p>noTrimWrap = || &#8211; |<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chandanweb.com/typo3/typoscript-snippet-for-getting-parent-title-based-on-selected-templavoila-template-object/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running a SQL Query using TypoScript</title>
		<link>http://blog.chandanweb.com/typo3/running-a-sql-query-using-typoscript</link>
		<comments>http://blog.chandanweb.com/typo3/running-a-sql-query-using-typoscript#comments</comments>
		<pubDate>Tue, 23 Apr 2013 06:47:02 +0000</pubDate>
		<dc:creator>spabhat</dc:creator>
				<category><![CDATA[Tesseract]]></category>
		<category><![CDATA[Typo3]]></category>
		<category><![CDATA[typoscript]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[renderObj]]></category>
		<category><![CDATA[select]]></category>
		<category><![CDATA[TEXT]]></category>
		<category><![CDATA[tt_news]]></category>

		<guid isPermaLink="false">http://blog.chandanweb.com/?p=580</guid>
		<description><![CDATA[Well, after using this feature for quite long time, I though I should post this info:Consider the following Query: SELECT DISTINCT FROM_UNIXTIME(`datetime`, &#8216;%Y&#8217;) AS `year` FROM tt_news where pid=113 order by datetime limit 1 My main goal was to get the latest year from the tt_news records, that is then going to be pushed to [...]]]></description>
				<content:encoded><![CDATA[<p>Well, after using this feature for quite long time, I though I should post this info:Consider the following Query:</p>
<p>SELECT DISTINCT FROM_UNIXTIME(`datetime`, &#8216;%Y&#8217;) AS `year` FROM tt_news where pid=113 order by datetime limit 1</p>
<p>My main goal was to get the latest year from the tt_news records, that is then going to be pushed to Tesseract filter.</p>
<p>Soln:</p>
<p>20 = CONTENT<br />
20 {<br />
table = tt_news<br />
select {<br />
selectFields = FROM_UNIXTIME(`datetime`, &#8216;%Y&#8217;) AS year<br />
orderBy = datetime desc<br />
pidInList = 113<br />
max = 1<br />
}<br />
renderObj = TEXT<br />
renderObj.field = year<br />
}</p>
<p>Reference: http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.5.0/view/1/5/#id2621093</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chandanweb.com/typo3/running-a-sql-query-using-typoscript/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Allowed memory size of &#8230; bytes exhausted</title>
		<link>http://blog.chandanweb.com/php/allowed-memory-size-of-bytes-exhausted</link>
		<comments>http://blog.chandanweb.com/php/allowed-memory-size-of-bytes-exhausted#comments</comments>
		<pubDate>Wed, 03 Apr 2013 07:39:13 +0000</pubDate>
		<dc:creator>spabhat</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Typo3]]></category>

		<guid isPermaLink="false">https://blog.chandanweb.com/?p=574</guid>
		<description><![CDATA[<p>Recently, I had to do a t3d export/import, where the data size was nearly 2GB, and no matter what memory_limit we tried, it always failed. Finally we tried memory_limit = -1, which basically removes the memory limit, and lets us use the max available memory of the Operating System.</p>]]></description>
				<content:encoded><![CDATA[<p>Often we may need some special setup for a special case/cause.</p>
<p>Recently, I had to do a t3d export/import, where the data size was nearly 2GB, and no matter what memory_limit we tried, it always failed.</p>
<p>Finally we tried memory_limit = -1, which basically removes the memory limit, and lets us use the max available memory of the Operating System.</p>
<p>This solution did helped us, and we were able to do the export smoothly.</p>
<p>CAUTION: On a production server try not to do this, if we forget to revert this change, things can get worse!<br />
Instead make a local copy, and then we have a total freedom.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chandanweb.com/php/allowed-memory-size-of-bytes-exhausted/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A simple note on using &#8220;Fluid Display&#8221;</title>
		<link>http://blog.chandanweb.com/typo3/a-simple-note-on-using-fluid-display</link>
		<comments>http://blog.chandanweb.com/typo3/a-simple-note-on-using-fluid-display#comments</comments>
		<pubDate>Wed, 13 Mar 2013 10:47:29 +0000</pubDate>
		<dc:creator>spabhat</dc:creator>
				<category><![CDATA[Typo3]]></category>
		<category><![CDATA[Tesseract]]></category>

		<guid isPermaLink="false">https://blog.chandanweb.com/?p=566</guid>
		<description><![CDATA[Tesseract is a powerful tool, combined with &#8220;Fluid Display&#8221; the possibilities are almost limitless. Here is a simple note on how to use it to group based on a specific field. The Query: SELECT &#160;&#160;doc_cat.title AS mydocs.title, mydocs.name, mydocs.path, mydocs.file_path FROM mydocs LEFT JOIN doc_cat_mm ON &#8230; LEFT JOIN doc_cat ON … The Fluid Display: [...]]]></description>
				<content:encoded><![CDATA[<p>Tesseract is a powerful tool, combined with &#8220;Fluid Display&#8221; the possibilities are almost limitless.</p>
<p>Here is a simple note on how to use it to group based on a specific field.</p>
<p>The Query:</p>
<p>SELECT<br />
&nbsp;&nbsp;doc_cat.title AS <span style="font-family: monospace; white-space: pre;">mydocs</span>.title,<br />
<span style="font-family: monospace; white-space: pre;">mydocs</span>.name,<br />
<span style="font-family: monospace; white-space: pre;">mydocs</span>.path,<br />
mydocs.file_path</p>
<p>FROM <span style="font-family: monospace; white-space: pre;">mydocs</span><br />
LEFT JOIN doc_cat_mm<br />
ON &#8230;<br />
LEFT JOIN<br />
doc_cat<br />
ON …</p>
<p>The Fluid Display:</p>
<pre>
<br />&lt;f:if condition="{datastructure.count} == 0"&gt;<br />        &lt;f:else&gt;<br />            &lt;f:groupedFor<br />                    each="{datastructure.mydocs.records}"<br />                    as="docCategories"<br />                    groupBy="title"<br />                    groupKey="title"&gt;<br />                    {title_cat}<br />                        &lt;f:for each="{docCategories}" as="document"&gt;<br />                            {document.title}
</pre>
<pre>
An example for using TypoScript inside<br />                           &lt;f:cObject typoscriptObjectPath="lib.docFileSize" data="{document.file_size}" /&gt;<br />                        &lt;/f:for&gt;<br />            &lt;/f:groupedFor&gt;<br />        &lt;/f:else&gt;<br />    &lt;/f:if&gt;
</pre>
<pre>
<br />
</pre>
<pre>
Now TyposCript will be something as below: <b>(NOTE: make sure you use .current = 1 )</b>
</pre>
<pre>
lib.docFileSize = TEXT
lib.docFileSize.current = 1
lib.docFileSize.bytes = 1
lib.docFileSize.bytes.labels = |kb|Mb|Gb<br />
</pre>
<p>That should be it!</p>
<p><b>Some points of interest:<br /></b> &lt;f:debug&gt;{datastructure}&lt;/f:debug&gt;<br />
&lt;f:if condition=&#8221;{0: datastructure.count} == {0: &#8217;0&#8242;}&#8221;&gt;</p>
<p><b>IF this didn&#8217;t work, try<br /></b> &lt;f:if condition=&#8221;{0: datastructure.tablename.count} == {0: &#8217;0&#8242;}&#8221;&gt;</p>
<p><b>URLs of interest:</b><br />
<a href="http://www.t3node.com/blog/combining-fluid-viewhelpers-and-typoscript-in-typo3-5-basic-examples/" title="T3Node">http://www.t3node.com/blog/combining-fluid-viewhelpers-and-typoscript-in-typo3-5-basic-examples/</a><br />
<a href="http://wiki.typo3.org/Fluid" title="Fluid Wiki">http://wiki.typo3.org/Fluid</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chandanweb.com/typo3/a-simple-note-on-using-fluid-display/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A simple Big Click function</title>
		<link>http://blog.chandanweb.com/general/a-simple-big-click-function</link>
		<comments>http://blog.chandanweb.com/general/a-simple-big-click-function#comments</comments>
		<pubDate>Thu, 28 Feb 2013 12:30:08 +0000</pubDate>
		<dc:creator>spabhat</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.chandanweb.com/?p=562</guid>
		<description><![CDATA[The following function is useful when we wish to make a certain area clickable. This takes in the first link, and makes the entire area clickable. This code has support for normal links as well as external links. Necessary JS: function cw_bigclick(){ if($('.cw-bigclick .bigitem').length){ $('.cw-bigclick .bigitem').on('click', function() { if ($(this).find('a').length &#62; 0) { if($(this).find('a').attr('target')=='_blank'){ window.open($(this).find('a').attr('href')); [...]]]></description>
				<content:encoded><![CDATA[<p>The following function is useful when we wish to make a certain area clickable. This takes in the first link, and makes the entire area clickable. This code has support for normal links as well as external links.</p>
<p>Necessary JS:</p>
<pre>function cw_bigclick(){
    if($('.cw-bigclick .bigitem').length){
        $('.cw-bigclick .bigitem').on('click', function() {
            if ($(this).find('a').length &gt; 0) {
                if($(this).find('a').attr('target')=='_blank'){
                    window.open($(this).find('a').attr('href'));
                }else{
                    window.location.href= $(this).find('a').attr('href');
                }
                return false;
            }
        });
    }
}</pre>
<p>Expected HTML</p>
<p>&lt;div class=&#8221;cw-bigclick&#8221;&gt;<br />
&lt;div class=&#8221;bigitem&#8221;&gt;<br />
&lt;a href=&#8221;#&#8221;&gt;&lt;/a&gt;<br />
&lt;/div&gt;<br />
&lt;div class=&#8221;bigitem&#8221;&gt;<br />
&lt;a href=&#8221;#&#8221; target=&#8221;_blank&#8221;&gt;&lt;/a&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chandanweb.com/general/a-simple-big-click-function/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Teeseract and JOIN tables using a CSV field</title>
		<link>http://blog.chandanweb.com/php/teeseract-and-join-tables-using-a-csv-field</link>
		<comments>http://blog.chandanweb.com/php/teeseract-and-join-tables-using-a-csv-field#comments</comments>
		<pubDate>Thu, 28 Feb 2013 11:18:36 +0000</pubDate>
		<dc:creator>spabhat</dc:creator>
				<category><![CDATA[Extension Programming]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Typo3]]></category>
		<category><![CDATA[Tesseract]]></category>

		<guid isPermaLink="false">http://blog.chandanweb.com/?p=558</guid>
		<description><![CDATA[Latest News allows us to use content elements within a News. This opens up a vast set of possibilities. However, when we look in depth, the news manages related content element IDs in a CSV format. Now this seems like a bad way to mange it, as we do not have a mm_table, and there [...]]]></description>
				<content:encoded><![CDATA[<p>Latest News allows us to use content elements within a News. This opens up a vast set of possibilities.</p>
<p>However, when we look in depth, the news manages related content element IDs in a CSV format.</p>
<p>Now this seems like a bad way to mange it, as we do not have a mm_table, and there is no easy way to handle this, than using DB specific functions.</p>
<p>Luckily Tesseract supports most of the MYSQL functions, and thus we can make use of the FIND_IN_SET function here.</p>
<p>ex:<br />
select tt_content.uid,tt_content.header, news.content_elements<br />
FROM tx_news_domain_model_news AS news<br />
LEFT JOIN tt_content<br />
ON find_in_set(tt_content.uid, news.content_elements) WHERE news.uid=1</p>
<p>Hope this helps you.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chandanweb.com/php/teeseract-and-join-tables-using-a-csv-field/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wrapping Long URLs that is inside A tag</title>
		<link>http://blog.chandanweb.com/general/wrapping-long-urls-that-is-inside-a-tag</link>
		<comments>http://blog.chandanweb.com/general/wrapping-long-urls-that-is-inside-a-tag#comments</comments>
		<pubDate>Wed, 27 Feb 2013 09:27:10 +0000</pubDate>
		<dc:creator>spabhat</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.chandanweb.com/?p=554</guid>
		<description><![CDATA[I wanted to wrap long line/URL in an A tag, we surely did not wish to apply it for the p tag, or any other tag as such. So the following solution worked well for me, note the &#8220;display:inline-block&#8221;. .content p a{ -ms-word-break: break-all; word-break: break-all; word-break: break-word; -webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; display: [...]]]></description>
				<content:encoded><![CDATA[<p>I wanted to wrap long line/URL in an A tag, we surely did not wish to apply it for the p tag, or any other tag as such.</p>
<p>So the following solution worked well for me, note the &#8220;display:inline-block&#8221;.</p>
<p>.content p a{<br />
-ms-word-break: break-all;<br />
word-break: break-all;<br />
word-break: break-word;<br />
-webkit-hyphens: auto;<br />
-moz-hyphens: auto;<br />
hyphens: auto;<br />
display: inline-block;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chandanweb.com/general/wrapping-long-urls-that-is-inside-a-tag/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update the translation of Extensions Using Extension Manager From Repository</title>
		<link>http://blog.chandanweb.com/typo3/update-the-translation-of-extensions-from-extension-manager</link>
		<comments>http://blog.chandanweb.com/typo3/update-the-translation-of-extensions-from-extension-manager#comments</comments>
		<pubDate>Mon, 04 Jun 2012 07:38:16 +0000</pubDate>
		<dc:creator>Ganybhat</dc:creator>
				<category><![CDATA[Typo3]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[locallang]]></category>
		<category><![CDATA[translations]]></category>

		<guid isPermaLink="false">http://blog.chandanweb.com/?p=529</guid>
		<description><![CDATA[Below are the screenshots showing how to update the translations of extensions using extension manager from repository. &#160; Hope this helps!]]></description>
				<content:encoded><![CDATA[<p>Below are the screenshots showing how to update the translations of extensions using extension manager from repository.</p>

<a href='http://blog.chandanweb.com/typo3/update-the-translation-of-extensions-from-extension-manager/attachment/ext-translate-4' title='ext-translate'><img width="150" height="150" src="http://blog.chandanweb.com/wp-content/uploads/2012/06/ext-translate3-150x150.png" class="attachment-thumbnail" alt="ext-translate" /></a>
<a href='http://blog.chandanweb.com/typo3/update-the-translation-of-extensions-from-extension-manager/attachment/update-ext2-3' title='update-ext2'><img width="150" height="150" src="http://blog.chandanweb.com/wp-content/uploads/2012/06/update-ext22-150x150.png" class="attachment-thumbnail" alt="update-ext2" /></a>

<p>&nbsp;</p>
<p>Hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chandanweb.com/typo3/update-the-translation-of-extensions-from-extension-manager/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
