|
|||||||
| Registrieren | Hilfe | Benutzerliste | Kalender | Suchen | Heutige Beiträge | Alle Foren als gelesen markieren |
|
#1
|
|||
|
|||
|
Hi list,
I am trying to pass a variable from url into extension tmailform. I see that in setup ts it can be passed to tmailform like this plugin.tx_pilmailform_pi1.defaultValues ( FIELD_VAL; plain; text:This is what autofills ) I want to do something like this, that will put the passed variable &value=whatever into the setup: plugin.tx_pilmailform_pi1.defaultValues ( FIELD_VAL; plain; text:{GPvar:value} ) but it just fill in "{GPvar:value}" in the field (doesn't substitute the value from the url) I can set that to {$a_constant} so it looks like plugin.tx_pilmailform_pi1.defaultValues ( FIELD_VAL; plain; text:{$a_constant} ) and it will correctly fill in my constant there.... but then how can I set a constant to be the url variable? in constants i have tried a_constant = {GPvar:value} but it just sets it as the text "{GPvar:value}"... same problem as before. is there any solution here? thanks in advance for any help, Andrew _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#2
|
|||
|
|||
|
Read TSref - you need to have something where you can access a getText
data type in order to get the gpvar like that. Andrew Davis wrote: > Hi list, > > I am trying to pass a variable from url into extension tmailform. > > I see that in setup ts it can be passed to tmailform like this > > plugin.tx_pilmailform_pi1.defaultValues ( > FIELD_VAL; plain; text:This is what autofills > ) > > > I want to do something like this, that will put the passed variable > &value=whatever into the setup: > > plugin.tx_pilmailform_pi1.defaultValues ( > FIELD_VAL; plain; text:{GPvar:value} > ) > > but it just fill in "{GPvar:value}" in the field (doesn't substitute the > value from the url) > > I can set that to {$a_constant} so it looks like > > plugin.tx_pilmailform_pi1.defaultValues ( > FIELD_VAL; plain; text:{$a_constant} > ) > > > and it will correctly fill in my constant there.... > > but then how can I set a constant to be the url variable? > > in constants i have tried > > a_constant = {GPvar:value} > > but it just sets it as the text "{GPvar:value}"... same problem as before. > > > is there any solution here? > > thanks in advance for any help, > Andrew > > > > _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#3
|
|||
|
|||
|
Thanks Tyler for advice, I have gotten this far and am now stuck...
temp.model = TEXT temp.model.value = MODEL_VAL; plain; text: {GPvar:model} temp.model.insertData = 1 plugin.tx_pilmailform_pi1.defaultValues < temp.model I can output temp.model to page and I see it is replacing the gpvar as desired, but now it is not passing to the setup for the plugin.... the plugin setup should be seeing plugin.tx_pilmailform_pi1.defaultValues{ MODEL_VAL; plain; text: sometextthatispassed } Im not sure how this should be pased, i have tried many variations but nothing seems to be working.... Any suggestions are very welcome, Thanks, Andrew Tyler Kraft wrote: > Read TSref - you need to have something where you can access a getText > data type in order to get the gpvar like that. > > > > Andrew Davis wrote: >> Hi list, >> >> I am trying to pass a variable from url into extension tmailform. >> >> I see that in setup ts it can be passed to tmailform like this >> >> plugin.tx_pilmailform_pi1.defaultValues ( >> FIELD_VAL; plain; text:This is what autofills >> ) >> >> >> I want to do something like this, that will put the passed variable >> &value=whatever into the setup: >> >> plugin.tx_pilmailform_pi1.defaultValues ( >> FIELD_VAL; plain; text:{GPvar:value} >> ) >> >> but it just fill in "{GPvar:value}" in the field (doesn't substitute >> the value from the url) >> >> I can set that to {$a_constant} so it looks like >> >> plugin.tx_pilmailform_pi1.defaultValues ( >> FIELD_VAL; plain; text:{$a_constant} >> ) >> >> >> and it will correctly fill in my constant there.... >> >> but then how can I set a constant to be the url variable? >> >> in constants i have tried >> >> a_constant = {GPvar:value} >> >> but it just sets it as the text "{GPvar:value}"... same problem as >> before. >> >> >> is there any solution here? >> >> thanks in advance for any help, >> Andrew >> >> >> >> _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#4
|
|||
|
|||
|
> Thanks Tyler for advice, I have gotten this far and am now stuck...
> > temp.model = TEXT > temp.model.value = MODEL_VAL; plain; text: {GPvar:model} > temp.model.insertData = 1 > > > plugin.tx_pilmailform_pi1.defaultValues < temp.model > > I can output temp.model to page and I see it is replacing the gpvar as > desired, but now it is not passing to the setup for the plugin.... > the plugin setup should be seeing > > plugin.tx_pilmailform_pi1.defaultValues{ > MODEL_VAL; plain; text: sometextthatispassed > } > > > Im not sure how this should be pased, i have tried many variations but > nothing seems to be working.... Of course not, since defaultValues is just an Array that will be parsed by the plugin functions. Taking a look at the PHP code shows there's no stdWrap property for "defaultValues", so you simply can't fill in any data using the getText method even if you try using a workaround with a TEXT element. if there is no defaultValues.dataWrap = {GPvar:whatever} there will be no defaultValues.cObject = TEXT too which means: It's impossible unless you change the PHP code of the plugin to accept stdWrap properties here. It would be good practice if the developers would always add stdWrap to any of their properties, but unfortunately most of them don't ... HTH Joey -- Wenn man keine Ahnung hat: Einfach mal Fresse halten! (If you have no clues: simply shut your gob sometimes!) Dieter Nuhr, German comedian openBC/Xing: http://www.cybercraft.de T3 cookbook: http://www.typo3experts.com _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#5
|
|||
|
|||
|
Hi,
is it possible to set a value for a constant using ts in setup? plugin.tx_pilmailform_pi1.defaultValues{ MODEL_VAL; plain; text: {$constant} } will replace with the constant text... but i need to pass the url var to the $constant sorry to leave so many posts, I am just trying to figure this out. I wish i were a more experienced php programmer, i would do as you suggest and add stdwrap function to the extension, but unfortunately that is beyond me and beyond my time constraint. any help much appreciated, andrew JoH asenau wrote: >> Thanks Tyler for advice, I have gotten this far and am now stuck... >> >> temp.model = TEXT >> temp.model.value = MODEL_VAL; plain; text: {GPvar:model} >> temp.model.insertData = 1 >> >> >> plugin.tx_pilmailform_pi1.defaultValues < temp.model >> >> I can output temp.model to page and I see it is replacing the gpvar as >> desired, but now it is not passing to the setup for the plugin.... >> the plugin setup should be seeing >> >> plugin.tx_pilmailform_pi1.defaultValues{ >> MODEL_VAL; plain; text: sometextthatispassed >> } >> >> >> Im not sure how this should be pased, i have tried many variations but >> nothing seems to be working.... > > Of course not, since defaultValues is just an Array that will be parsed by > the plugin functions. Taking a look at the PHP code shows there's no stdWrap > property for "defaultValues", so you simply can't fill in any data using the > getText method even if you try using a workaround with a TEXT element. > > if there is no > defaultValues.dataWrap = {GPvar:whatever} > there will be no > defaultValues.cObject = TEXT too > > which means: It's impossible unless you change the PHP code of the plugin to > accept stdWrap properties here. It would be good practice if the developers > would always add stdWrap to any of their properties, but unfortunately most > of them don't ... > > HTH > > Joey > _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#6
|
|||
|
|||
|
> is it possible to set a value for a constant using ts in setup?
> > plugin.tx_pilmailform_pi1.defaultValues{ > MODEL_VAL; plain; text: {$constant} > } > > will replace with the constant text... but i need to pass the url var > to the $constant > > sorry to leave so many posts, I am just trying to figure this out. I > wish i were a more experienced php programmer, i would do as you > suggest and add stdwrap function to the extension, but unfortunately > that is beyond me and beyond my time constraint. > > any help much appreciated, Well anything else will not work. You got to do it with pure PHP or implement the TS functionality again using pure PHP. So the last chance you got, is to ask the developer of this extension if he will implement this for you, else your final option always will be to pay someone for the job. HTH Joey -- Wenn man keine Ahnung hat: Einfach mal Fresse halten! (If you have no clues: simply shut your gob sometimes!) Dieter Nuhr, German comedian openBC/Xing: http://www.cybercraft.de T3 cookbook: http://www.typo3experts.com _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
|
#7
|
|||
|
|||
|
> So the last chance you got, is to ask the developer of this extension if he
> will implement this for you, else your final option always will be to pay > someone for the job. > > interested? a _______________________________________________ TYPO3-english mailing list TYPO3-english (AT) lists (DOT) netfielders.de http://lists.netfielders.de/cgi-bin/.../typo3-english |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | Thema bewerten |
|
|
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| [TYPO3-german] GPvar in extension verwenden | Joscha Feth | typo3-german@lists.netfielders.de | 2 | 15.05.2007 00:40 |
| [TYPO3-german] Constants Redakteuren zuweisen | Stefan Pink | typo3-german@lists.netfielders.de | 3 | 18.04.2007 14:01 |
| [TYPO3-dev] Global Variable/Constants | Al Chuck | typo3-dev@lists.netfielders.de | 0 | 27.03.2007 03:08 |
| [TYPO3] GPvar not a string? | Benjamin Todd | typo3-english@lists.netfielders.de | 5 | 21.02.2007 13:39 |
| [TYPO3] When I move code from a static template to the constants /setup sections, the page does not display everything | Anthony Caskey | typo3-english@lists.netfielders.de | 0 | 18.12.2006 17:10 |