ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

weblog calendar and search

September 11, 2008 12:26pm

Subscribe [1]
  • #1 / Sep 11, 2008 12:26pm

    frenzal

    136 posts

    I’m using the exp:weblog:calendar tag to display a calendar. I have a custom field called “enkel_leden_cal” (it’s a flag to say if it’s for members only) with PHP on input I set a var which I use to display search:enkel_leden_cal=”=Nee” when a user isn’t logged in. In the regular weblog display this works fine, with weblog:calendar it doesn’t:

    {exp:weblog:calendar weblog="calendar" switch="calendarToday|calendarCell" show_expired="yes" show_future_entries="yes" search:enkel_leden_cal="=Nee"}

    for testing purposes I’ve just skipped the php bit and put it in my template like this, but it doesn’t filter out member only events in my calendar, is it not possible to use the search attribute for this?

  • #2 / Sep 11, 2008 2:33pm

    Lisa Wess

    20502 posts

    Hey, frenzal - I’ve moved this up from EECore: you have a license so you’re able to post in the forums for license-holders. =)

    The weblog calendar tag does not have the search: parameter, so this won’t work for that tag.

    A feature request would be the way to go for this particular need.

  • #3 / Sep 11, 2008 2:51pm

    frenzal

    136 posts

    woops must have misread 😊

    Is there any alternative solution you could think of to handle this issue, because I doubt this feature request would get handled right away (right?).

  • #4 / Sep 11, 2008 2:53pm

    Lisa Wess

    20502 posts

    You would need a custom solution here, PHP and a Query, and possibly building your own calendar tag.  A custom plugin could probably handle this. Did you want me to move it to How To for some community input?

  • #5 / Sep 11, 2008 3:03pm

    frenzal

    136 posts

    Sure, could be handy. The query probably won’t be the problem but I’m fairly new to EE so a nudge in the right direction where to look to make my own version of the calendar tag would be welcome.

  • #6 / Sep 11, 2008 3:32pm

    Lisa Wess

    20502 posts

    Ok, moving this.  You can check out the development docs for how to build your own plugin. =)

  • #7 / Jan 23, 2009 7:26pm

    matthew235

    12 posts

    I encountered the same problem, and discovered that if you add the following line of code to mod.weblog.php at approximately line 2423 the search parameter will work with the exp:weblog:calendar tag.

    $this->fetch_custom_weblog_fields(); #THIS LINE IS SO THAT THE CALENDAR TAG CAN PARSE SEARCH PARAMETERS

    it should appear just after the lines

    if (! empty($TMPL->search_fields))
            {

    Hope this helps somebody!!!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases