https://www.icyphoenix.com/viewtopic.php?f=27&t=555&p=4867#p4867
-----------------------------------
moreteavicar
Sat 18 Nov, 2006 17:26

Re: 058-014 - KB Injection And Minor Fixes
-----------------------------------
Hmmm... [b]babbman[/b], where are you displaying the calendar block? On the left side or the right side?

If on the left, a long time ago I posted a fix on neclectic's site for minical to be displayed on the left side of portal page. As necletic's site is no longer open to non-registered users, I'll post it again here. (Original post is [url=http://www.netclectic.com/forums/viewtopic.php?p=23178#23178]here).Do not bother with the snaillite section at the bottom!


[quote="moreteavicar's minical anywhere fix"]
Ok, have come up with my fixes, as can be seen in my posts on snailsnource. I shall include them all here for completeness. Perhaps this should be included with minical / snailcal / importal install files!

This fix is based on using callite 1.4.7, which includes the latest version of mini_cal_SNAILLITE.

[b]Open root/blocks/blocks_imp_calendar.php[/b]

look for

[code]
function imp_calendar_block_func()
   {
      global $phpbb_root_path, $phpEx,
[/code]
in line, after global, add:
[code]
$table_prefix,
[/code]

next find:
[code]
include($phpbb_root_path . 'mods/netclectic/mini_cal/mini_cal.'.$phpEx);
[/code]
It could also be
[code]
include($phpbb_root_path . 'mods/netclectic/mini_cal/mini_cal2.'.$phpEx);
[/code]
Which ever it is, comment it out or delete it.

Other posts suggest putting that line in portal.php, but that will mean you only get mini_cal working on the portal page, and depending on where you put it, you don't get the dates being parsed with the events. There is only one file that needs the include line, and that file is pageheader.php file itself.

So, trundle on through your directories and [b]open[/b]:

[b]includes/pageheader.php[/b]

Look for the IM portal section near the end of the file, starting with
[code]
if(!$layout_forum_wide_flag&&$portal_config['portal_header']&&(!defined('HAS_DIED'))&&(!defined('IN_LOGIN')))
   {
      $template->set_filenames(array(
         'portal_header'         => 'portal_page_header.tpl')
      );
[/code]

Straight after this, add the line:
[code]
/* ************************************************************ */
include($phpbb_root_path . 'mods/netclectic/mini_cal/mini_cal.'.$phpEx);
/* ************************************************************* */
[/code]
What you should have is a section like this:
[code]
if(!$layout_forum_wide_flag&&$portal_config['portal_header']&&(!defined('HAS_DIED'))&&(!defined('IN_LOGIN')))
   {
      $template->set_filenames(array(
         'portal_header'         => 'portal_page_header.tpl')
      );
/* *************************************************************** */
include($phpbb_root_path . 'mods/netclectic/mini_cal/mini_cal.'.$phpEx);
/* *************************************************************** */
      portal_parse_blocks($portal_config['default_portal'], TRUE, 'header');
      $template->assign_var('HEADER_WIDTH', $portal_config['header_width']);
      $template->assign_var('PORTAL_HEADER', portal_assign_var_from_handle($template, 'portal_header'));
   }
[/code]
And that will guarantee all date variables get parsed before the block is made... so you can stick minical where you want - even in the header! 

Then there is one fix required to get the links to work with snaillite. [b]Open mods/ netclectic/mini_cal/mini_cal_SNAILLITE.php [/b]

Look for:
[code]
$url = append_sid("cal_lite.$phpEx?$day_ref=$s_dd&?$mon_ref=$s_mm&$year_ref=$s_yy&mode=display");
[/code]
Replace with:
[code]
$url = append_sid("cal_lite.$phpEx?&mode=display&cl_d=$s_dd&cl_m=$s_mm&cl_y=$s_yy");
[/code]
And thats it!
[/quote]

*EDIT* I just noticed MG's equivalent fix which was to put the include line in the blocks_imp_calebdar.php. If that didn't work, then try putting it in page_header as above...


