[TYPO3-dev] accessing values from admin-panel from within extension

bernd wilke xoonsji02 at sneakemail.com
Mon Oct 20 17:51:57 CEST 2008


On Mon, 20 Oct 2008 15:11:03 +0000 bernd wilke wrote:

> On Sun, 05 Oct 2008 10:35:10 +0200 Martin Kutschker wrote:
> 
>> bernd wilke schrieb:
>>> How can I access values set in admin-panel?
>>> 
>>> I want to simulate time by admin-panel and access it in my extension.
>>> As long as I use time() I only get the current time of the server than
>>> the time set in admin-panel.
>>> 
>>> should I use another function?
>>> or is the value stored in any variable?
>> 
>> // "exact" time
>> $GLOBALS['SIM_EXEC_TIME'] = $GLOBALS['EXEC_TIME'];
>> // time rounded to minutes (for access permissions)
>> $GLOBALS['SIM_ACCESS_TIME'] = $GLOBALS['ACCESS_TIME'];
>> 
>> Masi
> 
> these variables are not set to the values from admin panel. they are
> (nearly) the same than the actual server-time I get with the php-
> function time()
> 
> I use TYPO3 4.2.1
> maybe this has changed and worked for earlier versions.
> 
correction: 
these variables work - but not with this code

the assignement is wrong!

maybe reverse, 
but for me it was enough just to access $GLOBALS['SIM_EXEC_TIME'] without 
this assignment.

using these variables without assignment I got (like said in var-names):

// execution-time of script (full timestamp up to seconds)
$GLOBALS['EXEC_TIME']

// same as $GLOBALS['EXEC_TIME'] if no value is set in admin panel
// else:
// simulated execution time (based on entry of admin-panel)
// the entry in admin-panel can not hold any seconds!
// the value of admin-panel is modified by timezone or similar 
//   as it appears an offset of 1 hour for me
$GLOBALS['SIM_EXEC_TIME'] 

// execution-time of script (rounded to minutes)
$GLOBALS['ACCESS_TIME'];

// same as $GLOBALS['ACCESS_TIME'] if no value is set in admin panel
// else: same as $GLOBALS['SIM_EXEC_TIME'] 
$GLOBALS['SIM_ACCESS_TIME'] 


bernd
-- 
http://www.pi-phi.de/t3v4/cheatsheet.html




More information about the TYPO3-dev mailing list