Events Made Easy Forums Bug fixed or feature request implemented NotCategory in Events List Shortcode

Tagged: 

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #52885
    Anonymous
    Inactive

    It would be helpful to have the “notcategory” attribute available for the [eme_events] shortcode as it is for the filter form shortcode.

    Thanks!

    #52886
    Franky
    Keymaster

    Hmmm … apparently I overlooked to document it, but it should already just work

    #52890
    Anonymous
    Inactive

    I figured that was the case, but it didn’t work for me. Instead of excluding those categories that I entered, the list showed all.

    #52891
    Franky
    Keymaster

    ok, moving to bugs then

    #52893
    Franky
    Keymaster

    I just took a hard look at notcategory, but it should be ok.
    I did change some small parts, can you test this:
    http://plugins.trac.wordpress.org/changeset/996853
    Also: a usage example (events with their cats, and your shortcode) might help.

    #52895
    Anonymous
    Inactive

    Sorry it is being difficult, but still not working…

    I updated my plugin with your changes, set my shortcode to “[eme_events paging=1 limit=0 scope=this_year notcategory=2,8]“, and simplified my event list code to:

    Default event list format header

    <table class="eme-event-list-table">
    <thead>
    <tr>
    <th class="column1"><h2>Date</h2></th>
    <th class="column2"><h2>Name</h2></th>
    <th class="column3"><h2>Leader</h2></th>
    <th class="column4"><h2>Location</h2></th>
    <th class="column5"><h2>Type</h2></th>
    <th class="column6mobile"><h2>Location</h2></th>
    </tr>
    </thead>
    <tbody>

    Default event list format

    <tr>
    <td class="column1">#_{M j}[eme_if2 tag="#ESC_{M j Y}" notvalue="#ESC@_{M j Y}"] – [eme_if3 tag="#ESC_{M}" notvalue="#ESC@_{M}"]#@_{M }[/eme_if3]#@_{j}[/eme_if2]</td>
    <td class="column2">#_LINKEDNAME</td>
    <td class="column3">#_ATT{Leader}</td>
    <td class="column4"><a href="#_EVENTPAGEURL">#_TOWN</a></td>
    <td class="column5">#_CATEGORIES</td>
    <td class="column6mobile"><a href="#_EVENTPAGEURL">#_TOWN</a></td>
    </tr>

    Default event list format footer

    </tbody>
    </table>

    I am still getting a list that includes all categories…

    #52896
    Franky
    Keymaster

    Could you try
    [eme_events paging=1 limit=0 scope=this_year notcategory=2+8]
    ?

    #52897
    Anonymous
    Inactive

    That works.

    #52898
    Franky
    Keymaster

    That’s why I originally didn’t include the “,” in the parsing for notcategory: in fact that reads: “show me events not in cat 2 or 8”, while you need “not in cat 2 and not in cat 8”
    It’s a bit weird with a negation …

    #52899
    Anonymous
    Inactive

    Actually, “show me events not in cat 2 or 8″ is what I need, but someone else may need the “not in cat 2 and not in cat 8″ ability.

    …if I’m understanding correctly – lol. Confusing…

    #52968
    Franky
    Keymaster

    Ok, since this works, I’ll close the double-double-double negation thing before it gets us in an infinite time loop 🙂

    #52979
    Anonymous
    Inactive

    I am using notcategory=X+X+etc… wherever I need it and all is working.

    But for consistency’s sake, would you want it to be notcategory=X,X,etc… instead?

    This would be consistent with the “category=” in the doc.

    category limits the events shown to those of a certain category ID. You can specify multiple categories for AND and OR limitations: “1,3” for events in category 1 OR 3, “1+3″ for events in category 1 AND 3. Use the literal ‘none’ if you want to filter on events without category: “1,none” would mean to show events in category 1 or without category.

    Maybe I’m still confused… 🙂 But things are working with the +’s.

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