CUHO Multicalendar

Developer

Customhost

3rd Party (Commercial)
Current Version: 1.3
Minimum EE Version: 2.6.0
Release Date: Dec 25, 2014

License Agreement

Buy Now!

$35.00
Qty:

EE Version Support

  • ExpressionEngine 2

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Webservice
  • Publisher

Requirements

Add-On Type(s)

Fieldtype

Tags

CUHO Multicalendar is a field type which allows you to select multiple dates using one field with a fancy visual powerful calendar right on a publish page.

Installation

Extract directory "cuho_multicalendar" from archive and copy to the system/expressionengine/third_party/ catalog of your site install.


Go to "Add-ons > Fieldtypes" in top menu and seek for "CUHO Multicalendar" module.
Click "Install".



Fieldtype setup

  1. After addon installation go to your "Admin > Channel Administration > Channel Fields", choose channel and hit button "Create a New Channel Field"
  2. Select "CUHO Multicalendar" from type drop-down menu
  3. Configure field according to your requirements

 



Fieldtype configuration

Once you select "CUHO Multicalendar" from type drop-down you will see additional "Field Options", see setting options explanation below.

Display calendar

Control field on a publish page in admin area.


Possible values:

  • No — field will look like a normal input field on publish page. Visual calendar will appear only on field focus.
  • Only calendar — no field will be displayed on publish page, only visual calendar.
  • Calendar and field — will display input field with visual calendar below the field on a publish page.

Display range helpers

Date range helpers is an additional controls for the field which allows you to select intelligent date ranges.


Using range helpers you can select range from one date to another date and exclude days which are not necessary.


For e.g.: range helpers can be userfull if you want to select only weekends or only two first week days.

Display layout

You can configure visual calendar to show multiple columns and rows.


Combine rows and cols settings you can configure linear or grid layout for you visual calendar.


For e.g.: if you want to show 3 months horizontally set 1 row and 3 columns in settings.



Template tags

Parameters

All non-field tags accept identical parameters list to filter entries by dates selected in Multicalendar field.

  • channel — which channels use to search the entries.
  • category — which categories use to search the entries.
  • mc_format — format to use for ‘mc_date’ or ‘mc_range’ parsing. Format same as for PHP strftime() function.
    Default format: %Y-%m-%d
  • mc_date — properly formatted date to search in entries Multicalendar fields.
  • mc_range — same as ‘mc_date’ but accept multiple dates separated by comma
  • mc_year — search by year.
  • mc_month — search by month.
  • mc_day — search by day ( day of month ).
  • mc_from_get — use $_GET parameter as a single date.
  • mc_from_post — use $_POST parameter as a single date.

Important notice: Date range parameter has a highest priority, all other parameters will be ignored.
Do not mix mc_date, mc_year, mc_month, mc_day, mc_from_get or mc_from_post with mc_range.

 


{exp:cuho_multicalendar:get_entries_id} — single tag

Return entries list applicable for Channel Entries “entry_id” parameter, concatenated with pipe character ( | ).


Or return ‘FALSE’ if no entries found.


{exp:cuho_multicalendar:entries} — tag pair

This tag are working the same way as Channel Entries tag ( {exp:channel:entries} ).


You can filter entries by date in Multicalendar field and loop through entries as you usually do in ExpressionEngine templates.


if no_results — conditional tag pair

You may use this conditional tag {if no_results} content {/if} to display message in the case when no entries are returned by {exp:cuho_multicalendar:entries} and nothing to loop.


Work same way as Channel Entries if no_results



Field tag

To display formatted dates from the Multicalendar field you can use single or pair-field tag with modifiers.


  • Single field tag — can be used to output concatenated list of the dates with defined glue-string, format and limit max. dates number.
  • Field tag pair — can be used to loop through dates and output date within custom content.
    To show formatted date within a content you shall use {date} tag.

Field output modifiers:

  • format — date format to use for the date display. Format same as for PHP strftime() function.
  • count — how many dates should be fetched from field for loop/display
  • glue ( single field tag only ) — dates separator, will be used to display fetched dates. Can accept HTML, default value: comma «,»
    Notice: For some reason ExpressionEngine not allows spaces in parameters.
    If you want to use space in glue parameter, you shall use non-breaking space ( Unicode: \xA0, HTML:   )

 



Template tags usage examples

Get entries ID, single tag

This expression will return piped list of the entries ID from “news” channel which has any date in Multicalendar field with 2014 year and 22 day or FALSE if no such entries


{exp:cuho_multicalendar:get_entries_id channel="news" mc_year="2014" mc_day="22"}

Sample output:

1|2|15|22|29

Loop through entries, pair tag

Loop through entries which has any day of Janury 2014 in Multicalendar field, which are in 1 or 4 category and not in pages and trash channel


.
Will output max. 5 dates of the Multicalendar field “multidate” in “YYYY-MM-DD” format.


{exp:cuho_multicalendar:entries channel="not pages|trash" category="1|4" mc_year="2014" mc_month="1"}
	{if no_results}Sorry, noting found{/if}

	<p>
		<b>Entry:</b> {entry_id}
		<br/>
		<b>Dates:</b> {multidate format="%Y-%m-%d" glue=";&nbsp;" count="5"}
	</p>
{/exp:cuho_multicalendar:entries}

Sample output:

Entry: 13
Dates: 2014-01-05; 2014-11-12; 2014-11-16; 2014-11-18; 2014-11-24

Entry: 2
Dates: 2014-01-14; 2014-11-05; 2014-11-07; 2014-11-12; 2014-11-22

Entry: 1
Dates: 2014-01-04; 2014-11-01; 2014-11-07; 2014-11-08; 2014-11-13

Field tag pair

This example illustrates how to use field tag pair. Multicalendar field 'date_range' for news channel:


{exp:channel:entries channel="news"}

	{if no_results}No entries{/if}	
	<p>
		<b>Entry:</b> {entry_id}
		<br/>
		<b>Dates list:</b>
		<ul>
			{date_range format="%Y-%m-%d" count="3"}
				<li>{date}</li>
			{/date_range}
		</ul>

	</p>
{/exp:channel:entries}

Sample output:

Entry: 14
Dates list:

  • 2014-01-28
  • 2014-11-16
  • 2014-11-18

Entry: 13
Dates list:

  • 2014-01-05
  • 2014-11-12
  • 2014-11-16

Entry: 10
Dates list:

  • 2014-01-02
  • 2014-11-06
  • 2014-11-10

Entry: 2
Dates list:

  • 2014-01-14
  • 2014-11-05
  • 2014-11-07

Entry: 1
Dates list:

  • 2014-01-04
  • 2014-11-01
  • 2014-11-07

Request parameters usage: mc_from_get/mc_from_post

Sometimes we should use date as a dynamic parameters.


For this case you can use GET/POST parameters as a single date source.



This example using GET-parameter filter_date to filter entries by date in Multicalendar field.



Sample URL: http://example.net/news/by-date?filter_date=2014-11-16


{exp:cuho_multicalendar:entries channel="news" mc_from_get="filter_date"}

	{if no_results}No Results{/if}
	<p>
		<b>Entry:</b> {entry_id}
		<br/>
		<b>Dates:</b> {date_range format="%Y-%m-%d" glue="; "}
	</p>

{/exp:cuho_multicalendar:entries}

Sample output:

Entry: 14
Dates: 2014-01-28; 2014-11-16; 2014-11-18; 2014-11-20; 2014-11-22; 2014-11-24; 2014-11-26

Entry: 13
Dates: 2014-01-05; 2014-11-12; 2014-11-16; 2014-11-18; 2014-11-24; 2014-11-28



Support, requests and wishes

We are always open to help and willing to make our products better.
If you have any request you can contact authors by mail: info@cuho.eu

This entry was created December 29, 2014, 10:10 am.
This entry was last updated December 29, 2014, 10:51 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

There are no reviews for this add-on yet.

What are you waiting for? Rate it and review it!