[TYPO3-english] Can't assign usergroup to user with [sr_feuser_register]

2017-10-25 Thread steve legare

Hi all,
I can't configure this extension to work properly.

How can I assign a usergroup to a user after the creation of the profile ?

this is my config :


plugin.tx_srfeuserregister_pi1.create.evalValues.captcha_response = freecap
plugin.tx_srfeuserregister_pi1.create.useEmailAsUsername = 1
plugin.tx_srfeuserregister_pi1.enableAutoLoginOnCreate = 1
plugin.tx_srfeuserregister_pi1.create.fields = first_name, last_name, password, 
email, captcha_response
plugin.tx_srfeuserregister_pi1.create.required = first_name, last_name, 
password, email
plugin.tx_srfeuserregister_pi1.templateFile = feuserregister.html

plugin.tx_srfeuserregister_pi1.confirmPID = 105
plugin.tx_srfeuserregister_pi1.loginPID = 96
plugin.tx_srfeuserregister_pi1.registerPID = 103
plugin.tx_srfeuserregister_pi1.editPID = 108
plugin.tx_srfeuserregister_pi1.pid= 97

plugin.tx_srfeuserregister_pi1.dateFormat = Y-m-d

plugin.tx_srfeuserregister_pi1.enableEmailConfirmation = 0
#plugin.tx_srfeuserregister_pi1.confirmType = 0

plugin.tx_srfeuserregister_pi1.enableAdminReview = 0

plugin.tx_srfeuserregister_pi1.enableAdminNotifyOnUpdate = 1
plugin.tx_srfeuserregister_pi1.enableAdminNotifyOnDelete = 1


plugin.tx_srfeuserregister_pi1.userGroupUponRegistration = 202
plugin.tx_srfeuserregister_pi1.userGroupAfterConfirmation= 1

plugin.tx_srfeuserregister_pi1.linkToPID = 99

plugin.tx_srfeuserregister_pi1.passwordAtLeast = 6

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


[TYPO3-english] Re: Simple photo gallery image size

2017-10-25 Thread Christian Hackl

hey,
your infos are not enough :) Witch gallery ext do you use? How looks your TYPO3 
Config (Constants Editor at the BE)? and so on...
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


[TYPO3-english] Re: How to hook TYPO3 Form submit

2017-10-25 Thread Chris Taylor

Thank you both for your very useful support.

I have found the form extension aftersubmit hook, which looks pretty much what 
I need.

I will build the directory structure as you suggest and test.

The redirect post processor may be very useful also. 
___

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


Re: [TYPO3-english] Typo3 foreign_table: How to specify a specific column to a select drop down menu?

2017-10-25 Thread Mikel
OK. Yes, that is possible. Like I said —> itemsProcFunc.

Go into your tca, to the select field.
'renderType' => 'selectSingle',
'foreign_table' => 'tx_cvfoobar_domain_model_kunde',
'itemsProcFunc' => ‚Foobar\CvFoobar\Tca\SelectProcFunc->prepareItems',

class SelectProcFunc
{

   public function prepareItems($param) {
  $newItems = [];
  foreach ($param['items'] as $item) {
 $newItem = [
0 => 'Enter your label',
1 => 'enter_your_value'
 ];
 $newItems[] = $newItem;
  }
  $param['items'] = $newItems;
  return $param;
   }

}

Just as a quick example. That inserts only static values and labels.
To get more information from related Kunde record, you need to make an instance 
of the repository and load the record by uid. 
You need to allow string inserts, if kundeuid is just a string.

BUT: This is not a very safe solution. You write the values into the database. 
What happens, if a user changes the kundeuid in one of the records? The 
relation is broken, as the value has been written into the database.
Also, for db queries, you need to compare strings. You also need to evaluate, 
that kundeuid is unique (if needed).

What is your target? Do you want to group records by that attribute „kundeuid“? 
If so, you should better add another model „Kundengruppe“ with m:n relations to 
Appliance and Kunde. This also would make db queries more easy, as you can 
build queries from both sides and get your Appliance by Kundengruppe and also 
your Kunden by Kundengruppe.

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

[TYPO3-english] Re: Typo3 foreign_table: How to specify a specific column to a select drop down menu?

2017-10-25 Thread christian ewigfrost

Quote: Mikel wrote on Wed, 25 October 2017 15:45


I think, I now understand.
You just want to have a different label in your select box, right?

If so, you can change that in the TCA of Kunde.

'ctrl' => [
'label' => 'name',

Change the value of label to ‚kundeuid'
Or add the „label_alt" option.

But that would change the label of your records Kunde global. So your customers 
will also be shown with that label in the backend listing.

If you can't change it global, you need to prepare your items by itemsProcFunc. 
You can pass the records to your own method and prepare them, before they are 
assigned to the dropdown.

BTW: In my opinion, this relation is more complicated than it should be. Do you 
want to group customers in that way? Or what is your target of ‚kundeuid'?



Thanks for the label tip... But actually what i want to do is soemthing else. I 
just find it hard to describe because it's the first time i work with TYPO3. I 
think the following describes it best:

I do not want to change the label field of the select items but rather change their values to a 
value other than the "uid" of the foreign records. That's exactly what i want to do, i 
want to assign the values of kundeuid to a value other than the "uid" of the foreign 
records. Is that possible?

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

Re: [TYPO3-english] Typo3 foreign_table: How to specify a specific column to a select drop down menu?

2017-10-25 Thread Mikel
I think, I now understand.
You just want to have a different label in your select box, right?

If so, you can change that in the TCA of Kunde.

'ctrl' => [
'label' => 'name',

Change the value of label to ‚kundeuid'
Or add the „label_alt“ option.

But that would change the label of your records Kunde global. So your customers 
will also be shown with that label in the backend listing.

If you can’t change it global, you need to prepare your items by itemsProcFunc. 
You can pass the records to your own method and prepare them, before they are 
assigned to the dropdown.

BTW: In my opinion, this relation is more complicated than it should be. Do you 
want to group customers in that way? Or what is your target of ‚kundeuid‘? 
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

[TYPO3-english] Simple photo gallery image size

2017-10-25 Thread max exan

Hi to all,
I'm new in typo3, I created a gallery of a product using simple photo gallery, 
but I don't understand how it works.
I uploaded images using thumbnail size px 90x90 thumbnail are displayed 
correctly but if I click on the image they remain small.
I uploaded then images with higher resolution and thumbnail are giant thy cover 
all page !!
Someone can help me ?

Bye

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


[TYPO3-english] Re: How to hook TYPO3 Form submit

2017-10-25 Thread Florian Rival

Hi Chris,

Yes, you should write your own extension if you want to add a specific hook but 
you don't need to have a full MVC extension.

Your extension should have a directory Hook like this : 


typo3conf/ext/MyExt/Classes/Hook/XxHook.php

The hook must be registered in file typo3conf/ext/MyExt/ext_localconf.php, something like this (depending on the hook to implement and Typo3 version used) : 


$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/db_layout.php']['drawHeaderHook'][]
 = \Vendor\MyExt\Hook\XxHook::class.'->MyClass;
--
-- Florian Rival --
www.oktopuce.fr
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


[TYPO3-english] Re: Typo3 foreign_table: How to specify a specific column to a select drop down menu?

2017-10-25 Thread christian ewigfrost

Quote: Mikel wrote on Tue, 24 October 2017 16:40


Do you need something like that?
'foreign_table_where' => 'AND tx_icingaconfgen_domain_model_kunde.your_property 
= ###REC_FIELD_[tx_icingaconfgen_your_model_to_compare.your_property]###',

Sorry, but I'm not sure if I understand your use case. It is a bit hard to read 
:-)

You can also have a look on 
https://docs.typo3.org/typo3cms/TCAReference/ColumnsConfig/Type/Select.html#itemsprocfunc
 

You can prepare the items for the select in your own method.

Mikel


> Am 24.10.2017 um 15:04 schrieb christian ewigfrost :
> 
> Hmmm... But that's not waht i want to do: What this does is just filtering the assignable records by their properties and then lets me choose the record in the select. But it assigns the entire record or the uid of the record to the property of the creatable record as understand. 
> What i want to do is:
> 
> Say i'd set 'kundeuid' with the value 'customer01' or something while creating a record of the class Kunde. Then i create a record of the class 'Appliance'. It also has a property named 'kundeuid' and i want to set it through a select that is filled with the 'kundeuid' s from all the records of the class Kunde. One option of this select would be 'customer01' from the record of Kunde i created. I'd choose it and the property 'kundeuid' of the created Appliance record should be also 'customer01'... ___

> TYPO3-english mailing list
> TYPO3-english (at) lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english



OK, let me try to explain again. Maybe my thought process comes across better 
this time:

In the backend of TYPO3 i have the folder where my records are stored of cause. There are records of the class "Kunde" stored (these are the customers - just the german word for it). Each record of this class has the property 'kundeuid' which isn't the same as the automatically generated property 'uid', but a property that was set manually. Then there are records of the class Appliance. This Appliance record has a property that is also named 'kundeuid' and acts as a way to determine which 'Kunde' record this 'Appliance' record belongs to. (technically it's a 1:n relation between Kunde and Appliance). 

Now what i want to do is: 


The user should be able to create a record of Appliance in the backend. The property 
'kundeuid' of Appliance should be a select drop down menu that has all the 'kundeuid' 
values of all existing Kunde records in it. The user should choose one of those values to 
determine visually which Kunde record the Appliance record "belongs" to. The 
property 'kundeuid' of the class Appliance should get exactly this value! Let me get to 
the problem now...

My problem currently: 


'type' => 'select',
  'renderType' => 
'selectSingle',
  'foreign_table' 
=> 'tx_icingaconfgen_domain_model_kunde',

The code above fills the select drop down menu with records of the class Kunde 
by using it as a foreign_table. That's clear to me... BUT: The property 
'kundeuid' of class Appliance doesn't get the value assigned to it that i want. 
In the drop down menue i don't see the 'kundeuid' property values of all te 
Kunde records but other values of another property (i think it's the first 
column of that table). If i choose it in the drop down and then create the 
Appliance record the Appliance record gets the value of the automatically 
generated property 'uid' of the specific Kunde record assigned... But i want to 
assign my own property value 'kundeuid' to it...

Is this possible at all or do i missunderstand the entire concept of it?

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


Re: [TYPO3-english] How to hook TYPO3 Form submit

2017-10-25 Thread Mikel
Hi Chris,

the form framework supports custom postprocessors, which allows you to handle 
form handling after submit.

https://docs.typo3.org/typo3cms/extensions/form/7.6/Configuration/Postprocessors/Index.html
 


It seems, that 8.7 supports a bit more options with its finisher API.
https://docs.typo3.org/typo3cms/extensions/form/8.7/ApiReference/Index.html#finisher-options
 


Mikel

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


[TYPO3-english] How to hook TYPO3 Form submit

2017-10-25 Thread Chris Taylor

Hello, your support for a new typo3 developer would be greatly appreciated.

I need to hook into a TYPO3 form submit event and my question is: do I need to 
write a TYPO3 Extension to achieve this?

Background:
-
I installed TYPO3 version 7.6.23. During the install process I picked the default 
'distribution' and I now have the "TYPO3 CMS bootstrap package". When I go to 
the Installed Extensions screen I have the Form Extension installed (key=form).

I have a page with a form on it and I need to hook into that form submit event 
and do a HTTP POST to another site with some of the form data. Optionally I 
would like to prevent the form submit from happening, depending on the return 
value of my POST to the other site - so perhaps what I need in-fact is a 
'before submit' event to hook.

Do I need to write an extension to achieve this? If so how can I get started? 
There are extension tutorials on typo3.org but they imply I need to build a 
full blown MVC extension, which seems way over the top for my requirements.

Thank you,

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