[TYPO3-english] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: [TYPO3-engl

Miguel xadi10 at hotmail.com
Wed Nov 20 13:36:57 CET 2013


Sorry to dig out this topic, but i've been out for a few days.

I think i've solved out the problem, instead of "20.cObjNum = || 1 ||", it seems to work fine with "20.cObjNum = 1 || 2 "

I have one final question so i can close this topic:

Is there some way of hiding the first timed usergroup if is expired? Although is expired, is still showing in the frontend, and should only appear the current timed usergroup, i have no need to show to the user the expired usergroup, just the current one...

So here is all my code :

10 = CONTENT
10.table = fe_groups
10.select.pidInList = 26
10.select.andWhere.data = TSFE:fe_user|user|usergroup
10.select.andWhere.wrap = uid=|
10.renderObj = TEXT
10.renderObj.field = title
10.renderObj.wrap = Status: |
10.stdWrap.if.isFalse.data = TSFE:fe_user|user|tx_itypoexpiringfegroups_groups
|
20 = TEXT
20.data = TSFE:fe_user|user|tx_itypoexpiringfegroups_groups
20.stdWrap.split {

token = |

cObjNum = 1 |*| 2 |*| 3
1 {
10 = CONTENT
10.table = fe_groups
10.select.pidInList = 26
10.select.andWhere.current = 1
10.select.andWhere.wrap = uid=|
10.renderObj = TEXT
10.renderObj.field = title
10.renderObj.wrap = Status:|
}

  
}
|

30 = TEXT
30.data = TSFE:fe_user|user|tx_itypoexpiringfegroups_groups
30.split {

token = *
cObjNum = 1 || 2   

  2 {
    10 = TEXT
    10.current = 1
    10.split {
      token = |
      cObjNum = 1 |*| 2 |*| 3 
  
1 {
10 = CONTENT
10.table = fe_groups
10.select.pidInList = 26
10.select.andWhere.current = 1
10.select.andWhere.wrap = uid=|
10.renderObj = TEXT
10.renderObj.field = title
10.renderObj.wrap = Status: |
}
2.current = 1
# format as date
2.strftime = %b-%d-%Y, %H:%M
2.noTrimWrap = Account Expiration:|
2.required = 1
  
    }  
}
  }


First, the "10" lines show the "normal" usergroup if no timed usergroup exists. 
After this, "20" lines show the first timed usergroup.
Finally, because i do not want users "return" to the normal usergroup before the membership, will always exist a second timed usergroup that puts users in a "expired" usergroup, so the "30" lines show the second usergroup. The problem is that the "20" lines should only be visible while the first membership is on, after that, when the first timed usergroup is expired, it should only be shown the "30" lines.

I guess this condition must be written using the current date am i right ?

Thanks once again bernd



More information about the TYPO3-english mailing list