[TYPO3-english] sr_feuser_register with realurl enabled problem in Firefox

2012-05-08 Thread Tomiţă MILITARU
Hello,

I am using TYPO3 4.6.8 with sr_feuser_register 2.6.3 and realurl.
When I enable realurl, in Firefox (any version) on submit on the create
account page, instead of creating a new account the page displays every
time:
Not a member yet?

This happens only in FF, tried Chrome / Safari / IE and can't reproduce.
Also, with realurl disabled, everything works normal.

Not sure if this is a bug or misconfiguration, any suggestions?

Thanks!

-- 
Engr. Tomiţă MILITARU
Certified TYPO3 Integrator
Tel. +40741064681
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

Re: [TYPO3-english] felogin - doesnt accept template

2012-05-08 Thread Jigal van Hemert

Hi,

On 8-5-2012 3:12, Martin Aarhof wrote:

When I try to add my template to felogin with both uploading a html file
or choose it from fileadmin I get this error

1: The destination (/myroot/public/uploads/tx_felogin) or the source
file (/myroot/public/fileadmin/templates/ext/felogin.html) does not
exist. (tt_content:57:pi_flexform)


If you select a template in the flexform a copy will be made and put in 
uploads/tx_felogin. For some reason this fails in your installation. The 
most obvious reasons are that the target directory does not exist 
(creating the directory failed during installation of fe_login), the web 
server user has no rights writing in that directory, the source file 
does not exist, the source file is not readable for the web server user.



Its not an option to set it by typoscript, because I have 2 different
login templates (header bar login, and full login)


This can be a cause of further problems (see felogin manual in TYPO3 4.7 
for examples and description of potential configuration problems) 
because both plugins will try to deal with form actions (such as forgot 
password requests).


--
Jigal van Hemert
TYPO3 Core Team member

TYPO3  inspiring people to share!
Get involved: typo3.org
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


Re: [TYPO3-english] Flexform questions

2012-05-08 Thread Robert Wildling

Please, I need your help:

For the displayCond part in a flexform I use the folloing script in the 
itemProcFunc:


?php
class tx_rwhandselectedcontent_addFieldsToFlexForm
{
function addFields ($config)
{   
$piValues  = t3lib_div::xml2array($config['row']['pi_flexform']);

// Werte in Variablen zwischenspeichern
$teaserPID = $piValues['data']['sDEF']['lDEF']['teaserPID']['vDEF'];
$col   = $piValues['data']['sDEF']['lDEF']['col']['vDEF'];

// Prepare SQL Statement to get all child pages of current page
$queryParts['SELECT'] = '*';
$queryParts['FROM'] = 'tt_content';
$queryParts['WHERE'] = pid= . $teaserPID . ' AND colPos=' . $col;
$queryParts['GROUPBY'] = '';
$queryParts['SORTING'] = 'crdate';
$queryParts['LIMIT'] = '';

$res = $GLOBALS['TYPO3_DB']-exec_SELECTquery(
$queryParts['SELECT'],
$queryParts['FROM'],
$queryParts['WHERE'],
$queryParts['GROUPBY'],
$queryParts['SORTING'],
$queryParts['LIMIT']
);

$optionList = array();
$optionList[0] = array(Please choose...,0);
$i=1;

while ($row = $GLOBALS['TYPO3_DB']-sql_fetch_assoc($res)) {
$optionList[$i] .= array($row['header'], $row['uid']);
$i++;
}

$GLOBALS['TYPO3_DB']-sql_free_result($res);

//debug($config,'configItems',__LINE__, __FILE__,5);
$config['items'] = array_merge($config['items'],$optionList);
return $config;
}
}
?


The result is:
Please choose...
A
A


If I exchange the script according to this source:
http://wiki.typo3.org/wiki/Extension_Development,_using_Flexforms#Dynamic_Data_in_Flexforms

everything works fine - it is just not dynamic.

What is wrong here?
And where can I please find any documention about what to return to a 
select field in a flexform? Or an input field or any other field? I just 
don't know why this return value has to look as it looks now...


Furthermore: on debugging anything (like debug($config,'config')) every 
debug result is generated twice... as if there was a loop over two 
items, but there isn't... ???



This is the FF as it is written in the flexform_ds.xml:

T3DataStructure
meta
langDisable1/langDisable
/meta
sheets
sDEF
ROOT
TCEforms
		 
sheetTitleLLL:EXT:rwhandselectedcontent/locallang_tca.xml:title/sheetTitle

/TCEforms
typearray/type
el

teaserPID
TCEforms
onChangereload/onChange

labelLLL:EXT:rwhandselectedcontent/locallang_tca.xml:teaserPID/label
config
typeinput/type
size8/size
max8/max
evaltrim/eval
/config
/TCEforms
/teaserPID



infoOne
TCEforms

displayCondFIELD:teaserPID:IN:0,NULL,''/displayCond

labelLLL:EXT:rwhandselectedcontent/locallang_tca.xml:infoOne/label
/TCEforms
/infoOne



col
TCEforms

displayCondFIELD:teaserPID:!IN:0,NULL/displayCond

labelLLL:EXT:rwhandselectedcontent/locallang_tca.xml:col/label
config
typeinput/type
size8/size
max8/max
evaltrim/eval
autoSizeMax10/autoSizeMax

itemListStylewidth:250px/itemListStyle
/config
/TCEforms
/col



infoTwo
TCEforms
displayCondFIELD:col:=:0/displayCond

labelLLL:EXT:rwhandselectedcontent/locallang_tca.xml:infoTwo/label
/TCEforms
/infoTwo



contents
TCEforms
displayCondFIELD:col:!=:0/displayCond

labelLLL:EXT:rwhandselectedcontent/locallang_tca.xml:contents/label
config
typeselect/type
multiple1/multiple

Re: [TYPO3-english] Flexform questions

2012-05-08 Thread Robert Wildling

Please, I need your help:

For the displayCond part in a flexform I use the folloing script in the 
itemProcFunc:


?php
class tx_rwhandselectedcontent_addFieldsToFlexForm
{
function addFields ($config)
{   
$piValues  = t3lib_div::xml2array($config['row']['pi_flexform']);

// Werte in Variablen zwischenspeichern
$teaserPID = $piValues['data']['sDEF']['lDEF']['teaserPID']['vDEF'];
$col   = $piValues['data']['sDEF']['lDEF']['col']['vDEF'];

// Prepare SQL Statement to get all child pages of current page
$queryParts['SELECT'] = '*';
$queryParts['FROM'] = 'tt_content';
$queryParts['WHERE'] = pid= . $teaserPID . ' AND colPos=' . $col;
$queryParts['GROUPBY'] = '';
$queryParts['SORTING'] = 'crdate';
$queryParts['LIMIT'] = '';

$res = $GLOBALS['TYPO3_DB']-exec_SELECTquery(
$queryParts['SELECT'],
$queryParts['FROM'],
$queryParts['WHERE'],
$queryParts['GROUPBY'],
$queryParts['SORTING'],
$queryParts['LIMIT']
);

$optionList = array();
$optionList[0] = array(Please choose...,0);
$i=1;

while ($row = $GLOBALS['TYPO3_DB']-sql_fetch_assoc($res)) {
$optionList[$i] .= array($row['header'], $row['uid']);
$i++;
}

$GLOBALS['TYPO3_DB']-sql_free_result($res);

//debug($config,'configItems',__LINE__, __FILE__,5);
$config['items'] = array_merge($config['items'],$optionList);
return $config;
}
}
?


The result is:
Please choose...
A
A


If I exchange the script according to this source:
http://wiki.typo3.org/wiki/Extension_Development,_using_Flexforms#Dynamic_Data_in_Flexforms

everything works fine - it is just not dynamic.

What is wrong here?
And where can I please find any documention about what to return to a 
select field in a flexform? Or an input field or any other field? I just 
don't know why this return value has to look as it looks now...


Furthermore: on debugging anything (like debug($config,'config')) every 
debug result is generated twice... as if there was a loop over two 
items, but there isn't... ???



This is the FF as it is written in the flexform_ds.xml:

T3DataStructure
meta
langDisable1/langDisable
/meta
sheets
sDEF
ROOT
TCEforms
		 
sheetTitleLLL:EXT:rwhandselectedcontent/locallang_tca.xml:title/sheetTitle

/TCEforms
typearray/type
el

teaserPID
TCEforms
onChangereload/onChange

labelLLL:EXT:rwhandselectedcontent/locallang_tca.xml:teaserPID/label
config
typeinput/type
size8/size
max8/max
evaltrim/eval
/config
/TCEforms
/teaserPID



infoOne
TCEforms

displayCondFIELD:teaserPID:IN:0,NULL,''/displayCond

labelLLL:EXT:rwhandselectedcontent/locallang_tca.xml:infoOne/label
/TCEforms
/infoOne



col
TCEforms

displayCondFIELD:teaserPID:!IN:0,NULL/displayCond

labelLLL:EXT:rwhandselectedcontent/locallang_tca.xml:col/label
config
typeinput/type
size8/size
max8/max
evaltrim/eval
autoSizeMax10/autoSizeMax

itemListStylewidth:250px/itemListStyle
/config
/TCEforms
/col



infoTwo
TCEforms
displayCondFIELD:col:=:0/displayCond

labelLLL:EXT:rwhandselectedcontent/locallang_tca.xml:infoTwo/label
/TCEforms
/infoTwo



contents
TCEforms
displayCondFIELD:col:!=:0/displayCond

labelLLL:EXT:rwhandselectedcontent/locallang_tca.xml:contents/label
config
typeselect/type
multiple1/multiple

Re: [TYPO3-english] felogin - doesnt accept template

2012-05-08 Thread Martin Aarhof

Hi,


On 08-05-2012 09:44, Jigal van Hemert wrote:

Hi,

On 8-5-2012 3:12, Martin Aarhof wrote:

When I try to add my template to felogin with both uploading a html file
or choose it from fileadmin I get this error

1: The destination (/myroot/public/uploads/tx_felogin) or the source
file (/myroot/public/fileadmin/templates/ext/felogin.html) does not
exist. (tt_content:57:pi_flexform)


If you select a template in the flexform a copy will be made and put in
uploads/tx_felogin. For some reason this fails in your installation. The
most obvious reasons are that the target directory does not exist
(creating the directory failed during installation of fe_login), the web
server user has no rights writing in that directory, the source file
does not exist, the source file is not readable for the web server user.


That worked!
Creating the directory :)




Its not an option to set it by typoscript, because I have 2 different
login templates (header bar login, and full login)


This can be a cause of further problems (see felogin manual in TYPO3 4.7
for examples and description of potential configuration problems)
because both plugins will try to deal with form actions (such as forgot
password requests).



On my big login page (/login) I have turned off the topbar login.
And in the topbar login I have turned off password recovery, and just 
made a link to /login/?tx_felogin_pi1%5Bforgot%5D=1

That actually works perfect :)

When there are error in topbar login, it redirects to /login
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


Re: [TYPO3-english] Templavoila and mobile templating

2012-05-08 Thread Andreas Becker
Media Queries is actually the best way to go.
Using the framework for templavoila (in the upcoming version)
or march8 workers woman framework (already) you will be able to calculate
lots of stuff inside TYPO3 using TS
beside this you had already this week about 3 more html5 extensions and I
am sure there will be much more soon!

http://lessframework.com/
http://www.lakercompendium.com/
http://bakerframework.com/ - many of the examples use laker by the way !
http://medialoot.com/blog/how-to-code-a-clean-website-template-in-html5-css3/
http://www.sitepoint.com/responsive-web-design-with-html5-and-the-less-framework-3/#fbid=eadM-l9r1kW

here are only some links from many many many. If you have a MAC you can use
a nice app too
http://tumultco.com/hype/

and lots more

Andi

On Tue, May 8, 2012 at 8:54 AM, Martin Aarhof martinprikaar...@gmail.comwrote:

 On 08-05-2012 03:26, Andi wrote:

 Hi

 go to kay-strohbach.de and check the templates out he has already in the
 template repository. Responsive webdesign is the future of mobile.


 kay-strohbach.de
 is using twitter bootstrap responsive design
 http://twitter.github.com/**bootstrap/http://twitter.github.com/bootstrap/

 Its super easy to both integrate in TV and design to.
 And if you are using the LESS css way, you can change all the colors
 directly from the variables.less file

 Properly the easist solution (and one of the most used as I can see around
 the web) for responsive designs at the moment.

 jquery mobile
 http://jquerymobile.com/
 Is also nice, but its difficult if you want to go more abstract than the
 jquery mobile default design.

 But there are TONS of other responsive design frameworks out there.
 Search on google :)

 But yes,
 mobile css
 link rel=stylesheet type=text/css href= media=mobile /
 isnt good more, because of all the different sizes on mobile screens
 (iphone, ipad, android pads and so on)

 Now we do
 @media (max-width: 980px) {
   #left {float:left;}
   #right {float:left;}
 }

 @media (max-width: 400px) {
  #left {float:none;}
  #right {float:none;}
 }
 (yes not a good example, but something like that)

 directly in the css file

 __**_
 TYPO3-english mailing list
 TYPO3-english@lists.typo3.org
 http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**englishhttp://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


[TYPO3-english] Which modules?

2012-05-08 Thread Marko Minic
Greetings,

I would be very thankful if somebody knows to tell me which modules are used 
for www.typo3.org new design: menu, slideshow, accordion...

Thanks in advance,
Marko Minic


FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth


___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


Re: [TYPO3-english] Which modules?

2012-05-08 Thread Georg Ringer
Hi,

IMHO most of it is TV

georg
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


Re: [TYPO3-english] Flexform questions

2012-05-08 Thread Robert Wildling

Really nobody who could help here?



Hi,

A Flexform shall eventually have 3 fields, one showing after the other
as soon as the previous one has a value.

This is step one:

teaserPID
TCEforms
onChangereload/onChange
labelSelect Page (pid)/label
config
typeinput/type
/config
/TCEforms
/teaserPID

infoOne
TCEforms
displayCondFIELD:teaserPID:=:0/displayCond
labelSave to enable new fileds/label
config
typenone/type
/config
/TCEforms
/infoOne


My question here is:

1. At the moment, infoOne evaluates against a value of 0 of teaserPID
and decides upon that whether to display or not. But what if teaserPID
has no value at all? I tried:

FIELD:teaserPID:IN:0,NULL,''

but that just doesn't work, and even though I studied the
http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.2.0/view/4/2/
I couldn't find a solution. What am I supposed to do here?


The next step would be to show a field that reads the contents from the
table with the pid given in teaserPID in form of a database relation (an
empty select box next to a selectbox with a list of content elements to
choose from). Here I am totally stuck. The only entry in the Core
documentation that can be found when searching for database relation is
under allowNonIdValues ...

I have a feeling that a script is needed like in tt_news, but I can
nowhere find a description of how and why and some hints etc...

Can anybody point please me to a tutorial?

Any help is greatly appreciated!
Thanks!

Regards,
Robert



___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


Re: [TYPO3-english] File links not correct via RTE

2012-05-08 Thread atul_shin
Hi all,

Any help on this ?

I have tried several options in kickstarter as well for RTE field 
But it is of no use. The links that are in RTE field of extension created by 
kickstarter are creating issue. 

Atul

--Original Message--
To: Typo3
Subject: File links not correct via RTE
Sent: May 7, 2012 11:50 AM

Hi all,

I am facing an strange issue with TYPO3 4.5.2. I have an site say 
http://site.com (the same is set as base url) and I use 
http://backend-site.com/typo3 for logging on to admin area. Whatever file link 
I create using RTE reflects http://backend-site.com/ as prefix to filepath e.g. 
http://backend-site.com/fileadmin/file.pdf  whereas it should be 
http://site.com.

How this can be controlled so that base url is used by RTE?


Regards
Atul 

Sent from BlackBerry® on Airtel
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


[TYPO3-english] showAccessRestrictedPages and felogin return_url parameter (TYPO3 4.6)

2012-05-08 Thread Josef Florian Glatz

Hi list,

is there anywhere a tutorial oder documentation how to realize a return 
to return_url within TYPO3 4.6/4.7 in the web-universe?


Thx in advance!

--
Cheers,
Josef Florian Glatz
blog:  http://typo3blog.at
vcard: http://www.josefglatz.at
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


Re: [TYPO3-english] showAccessRestrictedPages and felogin return_url parameter (TYPO3 4.6)

2012-05-08 Thread Josef Florian Glatz

Am 08.05.2012 16:06, schrieb Josef Florian Glatz:

Hi list,

is there anywhere a tutorial oder documentation how to realize a return
to return_url within TYPO3 4.6/4.7 in the web-universe?

Thx in advance!




If I use

showAccessRestrictedPages = 20
showAccessRestrictedPages.addParams = 
redirect_url=###RETURN_URL###pageId=###PAGE_ID###


in TMENU config, I get ?redirect_url=pageId=22 as a result. So, I 
think the problem is that the value for the redirect_url getParameter is 
missing.



--
Cheers,
Josef Florian Glatz
blog:  http://typo3blog.at
vcard: http://www.josefglatz.at
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


Re: [TYPO3-english] Renaming an extension - SOLVED

2012-05-08 Thread Robert Wildling

Good to know! Thanks for posting.
I was just considering whether the md5_values_last_written entries might 
be responsible for finding the correct values in the wizard_doc files... 
(ext_emconf.php)


Cheers!



Kickstarter is working fine, now.

First, I've copied old wizard_form.dat and wizard_form.html (containing
old extension names) inside new extension.
Second, I've used kickstarter to change names, and saved it.

Now it works, I've changed extension name and kickstarter works with new
name.

Regards,

Tonino


Il 07/05/2012 23:20, Tonix (Antonio Nati) ha scritto:

I have both wizard_form.dat and wizard_form.html.
I changed inside them all references from old extension to new
extension, but it is like they don't exist.

Is there anything else besides these two files?

Regards,

Tonino


Il 07/05/2012 20:33, Robert Wildling ha scritto:

To see the structure of an ext in kcikstarter, you need the
wizard_form.dat and wizard_form.html files in the doc folder. If they
are not there, you won't see anything. Unfortunately I don't know if
those specific files can be regenreated...

Regards,
Robert


Thanks to your and other answer.

I did already what you suggest, before posting, and all worked nicely,
except there is no way to see the new extension inside kickstarter.

In whatever mode I rename (copy and rename) the extension, then
finally,
when, using extension manager, I select 'Edit in Kickstarter', I don't
see anything of setup the extension should have (the same setup of old
extension).

No general info, no typoscript code, no frontend plugins.

How to make this rename effective, using kickstarter on new renamed
extension?

Regards,

Tonino



Il 03/05/2012 01:33, Richard Davies ha scritto:

Hi,

It depends what you mean. If you just want the name itself to be
different,
change title in ext_emconf.php. If you want to change the whole
thing so
you can have two running, basically cloning an extension, this is what
I do:
If you have an extension called test_ext, and want to name it
other_ext,

- Search replace through extension files,
- search for 'test_ext', replace with 'other_ext'.
- search for 'testext', replace with 'otherext'
- Search replace the extension filenames,
- search for 'test_ext', replace with 'other_ext'.
- search for 'testext', replace with 'otherext'
- Rename title in ext_emconf
- If you are doing so on an installed extension, rename the extension
tables (in mysql use RENAME TABLE
http://dev.mysql.com/doc/refman/5.0/en/rename-table.html)
- Clear cache
- (Re)Install extension as it was the 'old' extension that was
installed

I still work with pi_base extensions so I don't know if there are any
extra
quirks in extbase extensions.

Richard


On 3 May 2012 11:22, Tonix (Antonio Nati)to...@interazioni.it wrote:


I need to rename a working extension.
Is there a guide explaining which steps must be followed?
Did someone already try this change?

Regards,

Tonino

--
--**--
Inter@zioni Interazioni di Antonio Nati
http://www.interazioni.it to...@interazioni.it
--**--

__**_
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**englishhttp://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english




___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english






___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english









___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


Re: [TYPO3-english] Which modules?

2012-05-08 Thread Kay Strobach
Hi,

;) - and that while many core devs dislike tv --- HAHA

Greetings
Kay

Am 08.05.2012 14:22, schrieb Georg Ringer:
 Hi,
 
 IMHO most of it is TV
 
 georg


-- 
http://www.kay-strobach.de - Open Source Rocks

TYPO3  inspiring people to share!
Get involved: http://typo3.org

Answer was useful: https://flattr.com/profile/kaystrobach
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


Re: [TYPO3-english] Flexform questions

2012-05-08 Thread Jigal van Hemert

Hi,

On 8-5-2012 14:42, Robert Wildling wrote:

teaserPID
TCEforms
onChangereload/onChange
labelSelect Page (pid)/label
config
typeinput/type
/config
/TCEforms
/teaserPID

infoOne
TCEforms
displayCondFIELD:teaserPID:=:0/displayCond
labelSave to enable new fileds/label
config
typenone/type
/config
/TCEforms
/infoOne


My question here is:

1. At the moment, infoOne evaluates against a value of 0 of teaserPID
and decides upon that whether to display or not. But what if teaserPID
has no value at all? I tried:

FIELD:teaserPID:IN:0,NULL,''


What about FIELD:teaserPID:REQ:FALSE ? This will return TRUE if 
teaserPID evaluates to FALSE (i.e. is 0, '' or does not exist).



The next step would be to show a field that reads the contents from the
table with the pid given in teaserPID in form of a database relation (an
empty select box next to a selectbox with a list of content elements to
choose from). Here I am totally stuck. The only entry in the Core
documentation that can be found when searching for database relation is
under allowNonIdValues ...


I think there is enough information in the thread you linked in one of 
your answers to the original question. You can populate the field with a 
custom function using itemsProcFunc and retrieve the value of your 
teaserPID using the code in François's answer.


--
Jigal van Hemert
TYPO3 Core Team member

TYPO3  inspiring people to share!
Get involved: typo3.org
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


Re: [TYPO3-english] Flexform questions

2012-05-08 Thread Robert Wildling

Thank you so much for responding, Jigal!

I do have a script, but the return values are wrong - and I don't why. 
The debug statements through the correct contents, but obviousely I am 
putting them together in a wrong way... the multiselect result list is 
filled with these 3 values:


Please choose...
A
A

I Have absolutely no idea where the 2 As come from...???

This is the script - maybe you find a moment ... thanks!



?php
class tx_rwhandselectedcontent_addFieldsToFlexForm
{

  function addFields ($config)
  { 
// fetch values from FlexForm
$piValues  = t3lib_div::xml2array($config['row']['pi_flexform']);

// extract the reqired data into 2 variables
$teaserPID = $piValues['data']['sDEF']['lDEF']['teaserPID']['vDEF'];
$col   = $piValues['data']['sDEF']['lDEF']['col']['vDEF'];

//debug($piValues,'FELXFORM-VALUES',__LINE__, __FILE__,5);
//debug($teaserPID,'TEASER-PID',__LINE__, __FILE__,5);
//debug($col,'COL-NR',__LINE__, __FILE__,5);
  	//debug($GLOBALS['TYPO3_DB'],'GLOBALS[TYPO3_DB]',__LINE__, 
__FILE__,5);


  	// Prepare SQL Statement to get all child pages of current page 
(parentPID)

$queryParts['SELECT'] = '*';
$queryParts['FROM'] = 'tt_content';
$queryParts['WHERE'] = pid= . $teaserPID . ' AND colPos=' . $col;
$queryParts['GROUPBY'] = '';
$queryParts['SORTING'] = 'crdate';
$queryParts['LIMIT'] = '';

$res = $GLOBALS['TYPO3_DB']-exec_SELECTquery(
$queryParts['SELECT'],
$queryParts['FROM'],
$queryParts['WHERE'],
$queryParts['GROUPBY'],
$queryParts['SORTING'],
$queryParts['LIMIT']
);
//$num = $GLOBALS['TYPO3_DB']-sql_num_rows($res);

$optionList = array();
$optionList[0] = array(Please choose...,0);
$i=1;

while ($row = $GLOBALS['TYPO3_DB']-sql_fetch_assoc($res)) {
//$header = $row['header'];
//$index = $row['uid'];
//debug($header,'header',__LINE__,__FILE__,5)
//   - debug shows correct values

//$optionList[$i] .= array($header, $index);
  		$optionList[$i] .= array(0=$row['header'], 1=$row['uid']); // 
-- here sth is wrong!!!


  		$optionList[$i] .= array(0=$row['header'], 
1=$row['uid']); // -- doesn't work either ...


$i++;
}

$GLOBALS['TYPO3_DB']-sql_free_result($res);

$config['items'] = array_merge($config['items'],$optionList);

  	//debug($optionList['0']['1'],'optionList',__LINE__, 
__FILE__,5); // - throws NULL

//debug($config['items'],'configItems',__LINE__, __FILE__,5);

return $config;
}
}
?



The next step would be to show a field that reads the contents from the
table with the pid given in teaserPID in form of a database relation (an
empty select box next to a selectbox with a list of content elements to
choose from). Here I am totally stuck. The only entry in the Core
documentation that can be found when searching for database relation is
under allowNonIdValues ...


I think there is enough information in the thread you linked in one of
your answers to the original question. You can populate the field with a
custom function using itemsProcFunc and retrieve the value of your
teaserPID using the code in François's answer.



___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

Re: [TYPO3-english] [SOLVED] Backend login - sql-mode strict

2012-05-08 Thread espen holmefjord

Den 16-01-2012 18:32, Kay Strobach skrev:

SET SESSION sql_mode=MYSQL40
 Oh thank you that information finaly ended my nightmareStress not 
being able to log in after upgrading ;) hugs

___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


Re: [TYPO3-english] Flexform questions

2012-05-08 Thread Jigal van Hemert

Hi,

On 8-5-2012 23:56, Robert Wildling wrote:

I do have a script, but the return values are wrong - and I don't why.
The debug statements through the correct contents, but obviousely I am
putting them together in a wrong way... the multiselect result list is
filled with these 3 values:

Please choose...
A
A

I Have absolutely no idea where the 2 As come from...???

[...]

$optionList[$i] .= array(0=$row['header'], 1=$row['uid']); // -- here
sth is wrong!!!


The .= operator is a string operator, so it will treat the right side 
argument as a string. The right side argument is an array and when cast 
to a string it will result in Array.

$optionList[$i] is now a string with the value Array.

TYPO3 expects the items in the list to be arrays with two elements, the 
first being the label, the second the value. It will probably just do 
$item[0] to get the label. If you do this on a string it will result in 
the first character and just display A.


Now for the solution. The $config array is passed as a reference which 
makes it possible to directly write to it without using the intermediate 
$optionList array.


In the while loop just use:
$config['items'][] = array($row['header'], $row['uid']);

--
Jigal van Hemert
TYPO3 Core Team member

TYPO3  inspiring people to share!
Get involved: typo3.org
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english