script

Tuesday, August 13, 2013

Working of Favicon icon in IE

<link rel="shortcut icon" href="http://www.test.com/favicon.ico" type="image/x-icon" />

Wednesday, August 7, 2013

Get single field from flexform in TYPO3

$this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'NAME_OF_FIELD', 'sDEF');

Saturday, August 3, 2013

Remove Read More link from tt_news using typoscript.

For List View

plugin.tt_news.displayList.subheader_stdWrap.append >

For Latest View

plugin.tt_news.displayLatest.subheader_stdWrap.append >











Friday, July 12, 2013

Initialize Flexform in TYPO3

Copy Below Lines inside ext_tables.php


// flexform initialization
$TCA["tt_content"]["types"]["list"]["subtypes_addlist"][$_EXTKEY."_pi1"]="pi_flexform";
t3lib_extMgm::addPiFlexFormValue($_EXTKEY."_pi1", "FILE:EXT:".$_EXTKEY."/flexform_ds.xml");

Wednesday, May 22, 2013

languages markers for extensions

$markerArray = array();
        $basePath = 'EXT:' . $this->extKey . '/' . dirname($this->scriptRelPath) . '/locallang.xml';
        $languageArray  = $this->LOCAL_LANG = t3lib_div::readLLfile($basePath,$this->LLkey,$GLOBALS['TSFE']->renderCharset);
               
       
        if($GLOBALS['TSFE']->sys_language_uid==0)
        {
            $key = 'default';
        }else
        {
            $res = $GLOBALS["TYPO3_DB"]->exec_SELECTquery("st.lg_iso_2","sys_language sl INNER JOIN static_languages st ON st.uid=sl.static_lang_isocode","sl.uid='".$GLOBALS['TSFE']->sys_language_uid."'");
            $row = $GLOBALS["TYPO3_DB"]->sql_fetch_assoc($res);
            $key = strtolower($row["lg_iso_2"]);
        }
       
       
       
        foreach($languageArray[$key] as $key=>$val)
        {
        $index = '###'.strtoupper($key).'###';
        $markerArray[$index] = $this->pi_getLL($key);
        }
       

Monday, May 20, 2013

Allow tags on RTE in TYPO3


# Allow embed (Youtube) HTML tags in the RTE
lib.parseFunc_RTE.allowTags := addToList(object,param,embed)

Monday, May 13, 2013

MVC in TYPO3

var $cObj;
var $records_per_page;
var $language;
   
function __construct()
{
        $this->cObj = t3lib_div::makeInstance('tslib_cObj');
        $this->records_per_page = 5;
        $this->language = $GLOBALS['TSFE']->sys_language_uid;
}    


function test()
{

$templateFile = $this->conf['templateFile'] ? $this->conf['templateFile'] : 'EXT:imagevideo/pi1/view/image.html';
$this->template = $this->cObj->fileResource($templateFile);
$subpart = $this->cObj->getSubpart($this->template, '###GET_IMAGE###');
$markerArray = array();



return $this->cObj->substituteMarkerArrayCached($subpart, $markerArray);
}