Tagged: ,

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #42403
    Anonymous
    Inactive

    In lieu of an entire event being private vs. public, I have a feature request for private locations. So the event can be public, but you must be logged in to see the location data for the event. Since the location data is a separate data set, this doesn’t appear too difficult to implement; however, I could be wrong.

    #46151
    Franky
    Keymaster

    Using conditional tags in the next version, this can be achieved. See for examples here on the way it works:

    http://www.e-dynamics.be/bbpress/topic.php?id=416

    Also, I implemented WP filters on the locations info (for a single location and for the list of locations) so it’s all possible now 🙂

    #46152
    Anonymous
    Inactive

    I’ve been trying to get this to work for quite some time today with minimal luck. So I have a category labeled “Login to see address” -> this will hide the location unless logged in.

    [events_if tag='#ESC_CATEGORIES' value='Login to see address' && tag='#_IS_LOGGED_IN' value='0'] #_CATEGORIES [/events_if]

    This next line will display the location for any categorized or uncategorized event as long as the user is logged in. This works well.

    [events_if tag='#_IS_LOGGED_IN' value='1']

      #_LOCATION

      #_ADDRESS

      #_TOWN

    [/events_if]

    I’m having trouble writing a condition that will display the location to all other events (categorized or uncategorized) if the user is not logged in.

    #46153
    Franky
    Keymaster

    This you call minimal luck? It seems to me the conditional tags do what they’re supposed to do …

    You do realize that you can override any *event* format also per event?

    #46154
    Anonymous
    Inactive

    “minimal luck” was certainly an understatement. We have some less technical people that will be adding events. Trying to make it simple for them and complicated for me. Is there a was I can write a “NOT EQUAL” if condition.

    …tag=’#ESC_CATEGORIES’ value != ‘Login to see address’ …

    OR

    …tag=’#ESC_CATEGORIES’ value <> ‘Login to see address’ …

    Thanks for your hard work.

    #46155
    Anonymous
    Inactive

    This is what I have come up with so far:

    [events_if tag='#ESC_CATEGORIES' value='Login to see address' && tag='#_IS_LOGGED_IN' value='0'] #_CATEGORIES [/events_if]

    [events_if tag='#_IS_LOGGED_IN' value='0' && (!(tag='#ESC_CATEGORIES' value='Login to see address'))]

      #_LOCATION

      #_ADDRESS

      #_TOWN

    [/events_if]

    [events_if tag='#_IS_LOGGED_IN' value='1' && (!(tag='#ESC_CATEGORIES' value='Login to see address'))]

      #_LOCATION

      #_ADDRESS

      #_TOWN

    [/events_if]

    No matter what I have the #ESC_CATEGORIES value equal, the conditional statements will always display the address if the user is logged in. Also, if the user is logged out, only the “Login to see address” categories will display the address. This is pretty much the opposite of what I am looking for. I must have my ! (NOT) operator wrong, or I have something wrong with the #ESC_CATEGORIES’ value=”to the wrong thing’

    #46156
    Franky
    Keymaster

    I never said anywhere something about using “!” and “&&” and stuff like that.

    This is what you can use (values are examples):

    [events_if tag='#ESC_BLABLA'] (checks if not empty)

    [events_if tag='#ESC_BLABLA' value='1'] (compares with value 1)

    [events_if tag='#ESC_BLABLA' notvalue='1'] (must be different than value 1)

    [events_if tag='#ESC_BLABLA' lt='1' ] (must be smaller than 1)

    [events_if tag='#ESC_BLABLA' gt='1'] (must be bigger than 1)

    For multiple levels of shortcodes, use [events_if2] and [events_if3] (see http://codex.wordpress.org/Shortcode_API, wordpress doesn’t like a shortcode with the same name enclosed in another one):

    [events_if] ...
    [events_if2] ...
    [/events_if2]
    [/events_if]

    #46157
    Anonymous
    Inactive

    Nestled shortcodes don’t seem to be working.

    It tests the condition of the first argument then spits out the nestled shortcode name values and terminator

    Nestled argument:

    [events_if tag='#ESC_CATEGORIES' value='1']

    [events_if2 tag='#_IS_LOGGED_IN' value='1'] do something [/events_if2]

    [/events_if]

    Resulting data on the events page only for categories=1:

    [events_if2 tag='1' value='1'] do something [/events_if2] // if logged in

    [events_if2 tag='0' value='1'] do something [/events_if2] // if logged out

    #46158
    Franky
    Keymaster

    Should be ok in trunk now, I forgot to do shortcode recursion …

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top