[TYPO3-english] Show usergroup and fe_user info
bernd wilke
t3ng at bernd-wilke.net
Thu Nov 21 09:59:37 CET 2013
Am 20.11.13 19:53, schrieb Miguel:
> Well still no luck Bernd.
>
> Both timed usergroups are still appearing in the frontend, the expired
> timed usergroup and the current timed usergroup.
>
> Maybe you should check my code, i'm so sorry to bother you.
>
[...]
>
> First, the "10" lines show the "normal" usergroup if no timed usergroup
> exists. If exists timed usergroups, "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 usergroup called "expired" , 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.
so 10 and 30 are ok
and you want a visibility condition for 20 as it should be shown anly if
the expiration date is in the future
I wrote 'register:usergroup_endtime' in expection you filled a register
with the value. but so you did not fill it, it did not work.
the problem might be that the expiration date is in 3 while you need it
in 1. but you can switch the usage. in 1 you get the title of the
usergroup, so store it in a register and use it in 3 where you decide
whether the group should be displayed
now we have a complete other usage of register as earlier expected: just
store the title for later usage (we can't print it as we don't know
whether it should be displayed at all)
the double usage of expirationdate (print and condition) could be
handled both time with current=1
20 = TEXT
20.data = TSFE:fe_user|user|tx_itypoexpiringfegroups_groups
20.stdWrap.split {
token = |
cObjNum = 1 |*| 2 |*| 3
1 {
10 = LOAD_REGISTER
10.ug_title = CONTENT
10.ug_title {
table = fe_groups
select.pidInList = 26
select.andWhere.current = 1
select.andWhere.wrap = uid=|
renderObj = TEXT
renderObj.field = title
renderObj.wrap = Status:|
}
}
3 {
10 = TEXT
10 {
current = 1
date = d.m.Y
stdWrap {
dataWrap = {register:ug_title} expire: |
if {
isGreaterThan.cObject = TEXT
isGreaterThan.cObject.data = date:U
current = 1
}
}
}
// clean up
999 = RESTORE_REGISTER
}
}
(very complicated to build up such a complicated and functional TS
without test and debug opportunity)
bernd
--
http://www.pi-phi.de/cheatsheet.html
More information about the TYPO3-english
mailing list