Events Made Easy › Forums › How do I … › Display private Events as ocupied
- This topic has 3 replies, 2 voices, and was last updated 14 years, 5 months ago by
Anonymous.
-
AuthorPosts
-
Wed 1 Jun 2011 at 11:30 #42921
Anonymous
InactiveI want to display in a monthly calendar:
User is not logged in
Public Events (Category 1) should be shown
Private Events (Category 2) should be shown as occupied
Private Events (Category 3) should not be shown
If User is logged in: all Events should be shown
I tried with nested arguments and put in “Full calendar events format” (not the <!–comments–>:
[events_if tag='#_IS_LOGGED_IN' value='0']
[events_if tag='#_CATEGORIES' value='2'] Sorry occupied [/events_if]
<!–User not logged in, Event is private THEN Show message–>
[events_if2 tag='#_CATEGORIES' value='3'] [/events_if2]
<!–User not logged in, Event is private THEN nothing to display–>
[events_if3 tag='#_CATEGORIES' value='1']
- #_LINKEDNAME
[/events_if3]
<!–User not logged in, event is public THEN show Eventlink–>
[events_if tag='#_IS_LOGGED_IN' value='1']
- #_LINKEDNAME
[/events_if]
<!–User is logged in THEN show all events–>
Wed 1 Jun 2011 at 17:52 #47846Franky
KeymasterFor the not-logged in part: make sure your nested shortcodes don’t contain the same shortcode nested. I mean, this doesn’t work:
[events_if tag ...
[events_if tag ...
[/events_if]
[/events_if]In your case:
[events_if tag='#_IS_LOGGED_IN' value='0']
[events_if2 tag='#_CATEGORIES' value='2'] Sorry occupied [/events_if2]
[events_if2 tag='#_CATEGORIES' value='3'] [/events_if2]
[events_if2 tag='#_CATEGORIES' value='1'] #_LINKEDNAME [/events_if2]
[/events_if]should do it for the not-logged in case.
Wed 1 Jun 2011 at 18:44 #47847Anonymous
InactiveSorry, this Code didn’t work – it displays nothing.
Remember: Events in category 2 and 3 are allways labled as private
Wed 1 Jun 2011 at 19:29 #47848Anonymous
InactiveOk I think I made it – I had to fill in the value not the ID of category:
[events_if tag='#_IS_LOGGED_IN' value='0']
[events_if2 tag='#_CATEGORIES' value='Besetzt'] besetzt [/events_if2]
[events_if2 tag='#_CATEGORIES' value='Geburtstag'] [/events_if2]
[events_if2 tag='#_CATEGORIES' value='Tour']
- #_LINKEDNAME
[/events_if2]
[/events_if]
[events_if tag='#_IS_LOGGED_IN' value='1']
- #_LINKEDNAME
[/events_if]
-
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.