Q173: I need to have more control over the calendar preview.

Vous êtes ici: ibookfishing » Aide » Questions Fréquemment Posées (FAQ) » Q173: I need to have more control over the calendar preview.
You can get the default HTML code for the calendar preview in settings / integrate with my site (in the last step of the integration wizard). This HTML code is basically a single IFRAME tag which embeds the calendar into your web page.

The basic options can be set using the UI. The advanced ones need to be set by changing the URL parameters of the calendar's IFRAME. Here are the parameters that can be added or changed:
  • style=XXX - this parameter is always added automatically to determine the calendar preview style. Some styles require certain parameters so it's best to choose the style in ibookfishing's UI and then add optional parameters listed below
  • resource_id=XXX - set ID of the single resource to be displayed
  • custom-language=DE - set the language of the calendar preview (if different from the default) -- language is in form of the two-letter ISO code (EN, DE, FR, ES, IT etc.)
  • stylesheet - URL of the CSS stylesheet to be used to fully control the looks of the calendar (colors/fonts etc). Note that instead of specifying it here, you can set a stylesheet to be ALWAYS used whenever a calendar preview is displayed. You can do this here. This is very useful e.g. when you want to use calendar preview tags in your advanced integration templates.
  • background=XXX - you can set the calendar's background color/image here
  • resfilter=X,Y,Z - you can decide which resources will be shown (only in the horizontal style) - see more here
  • propfilter_name=X&propfilter_value=Y - using this parameter pair you can filter your resources by to the custom property X -- only the resources whose property value is Y will be listed - see more here
  • default_view=day - use this with the horizontal calendar to set the default view to day (normally the default is month)
  • show_count=1 - this will always display the available quantity as a number (in the standard mode one must hover over a square to see available quantity)
  • reset_cookie_date=1 - use this parameter to always reset the view to current month
  • no_range=1 - use this parameter only with the upcoming preview style (style=upcoming) for hour-based resources. Adding this parameter will list all possible starting times instead of time ranges (e.g. 4pm, 5pm, 6pm instead of 4pm-7pm)
  • set_date=YYYY-MM-DD - you can set the day/month that will be displayed by default in the preview (normally it's the current day or the previously browsed date saved on user's browser as a cookie)

Here's an example. This is the default code returned by the integration wizard:
<iframe width='940' height='270' scrolling='no' frameborder='0' src='http://www.ibookfishing.com/embed-calendar.php?calendar=XXX'></iframe>

The modified version could look like this:
<iframe width='940' height='270' scrolling='no' frameborder='0' src='http://www.ibookfishing.com/embed-calendar.php?calendar=XXX
&set_date=2013-05-06&background=yellow'></iframe>