typo3

multiple displayCond in TCA

How to use:
‘displayCond’ => ‘FIELD:sys_language_uid:IN:0,1,2&&FIELD:t_type:=:0||FIELD:sys_language_uid:=:0&&FIELD:t_type:=:1’,

t3lib/class.t3lib_tceforms.php

line 6092: isDisplayCondition()
(continue reading…)

1 Comment more...

TS页面跳转

[usergroup=*]
config >
config.additionalHeaders = Location: http://{$config.domain}
page >
page = PAGE
page.10 = TEXT
page.10.value=No Access!
[global]

v8.7+
config.additionalHeaders.10 {
  header = Location: https://www.example.de/login/
}
https://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Config/Index.html#additionalheaders

typo3在线用户

function checkUserIsOnline($userid){
		$online = false;
		$res = $GLOBALS['TYPO3_DB']->sql_query('SELECT DISTINCT ses_userid, username, name
				FROM fe_sessions LEFT JOIN fe_users ON (ses_userid=uid)
				WHERE ses_tstamp+3600 > unix_timestamp() OR is_online+3600 > unix_timestamp() and ses_userid='.$userid);
		while(false!==($row=$GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))){
			if($row['ses_userid']==$userid)$online=true;
		}
		return $online;
	}
1 Comment more...

typo3 debug sql

$TYPO3_CONF_VARS[‘SYS’][‘sqlDebug’] = ‘2’;    //  Modified or inserted by TYPO3 Install Tool.

Extenstion: cc_debug 让显示效果更好点 (continue reading…)


Typo3 session

Using sessions
Sessions are a mechanism to carry user data (parameters) along the web site visit without having to post them over and over again. The data is available as long as the session is valid, usually until all browser windows are closed.

Since TYPO3 instantiates a session automatically, you can use this existing session to read/write data into it. However, you must first understand that sessions in frontend and backend are handled differently.

The routine on the other hand is always the same.

Recover your data from the session
Add values (possibly into an array that holds all the session data)
Save your data to the session (continue reading…)


SELECT允许0

allowNonIdValues

boolean

If “foreign_table” is enabled:

If set, then values which are not integer ids will be allowed. May be needed if you use itemsProcFunc or just enter additional items in the items array to produce some string-value elements for the list.

Notice: If you mix non-database relations with database relations like this, DO NOT use integers for values and DO NOT use “_” (underscore) in values either!

Notice: Will not work if you also use “MM” relations!

 


typo3强制生成缓存图

$gifCreator = t3lib_div::makeInstance(‘tslib_gifbuilder’);

$gifCreator->init();

$imgarray =  $gifCreator->imageMagickConvert(‘photo_350_210.jpg’, ‘web’, ”, ”, ‘-colorspace RGB -quality 90’, ”, array(‘maxW’=>1000,’maxH’=>900),1);

echo ‘<img src=”‘.$imgarray[3].'”/>’;

 

typo3temp/pics/9577836ec0.jpg


substituteOldMailAPI

Boolean: If this is set, old calls to t3lib_utility_mail::Mail() will be translated to new t3lib_mail calls. This should work on most cases and thus respect the above transport settings. If you get garbled emails (or no attachments), consider setting this off. Ask the extension author to upgrade their code to make use of t3lib_mail (instead of the deprecated t3lib_htmlmail).


syslog

[belogErrorReporting]

  1. Integer: Configures which PHP errors should be logged to the “syslog” table (extension: belog). If set to “0” no PHP errors are logged to the sys_log table. Default is “E_ALL ^ E_NOTICE” (6135).

 


typoscript numberFormat

Calls the PHP function number_format
Allows you to format numbers
Note: TYPO3 v4.5 introduces a stdWrap property numberFormat. In order to avoid conflicts, the extension disables its own stdWrap property described below.Converting a number to localized Euro value

(continue reading…)


Copyright © 1996-2010 Add Lives. All rights reserved.
iDream theme by Templates Next | Powered by WordPress