Page 2 of 13

Re: Calendar block for phpBB Calendar 0.0.7

Posted: 8. May 2008 21:23
by frold
fred_du_41 wrote:Thank you for your answer :D
frold wrote: Did you install the phpBB Calendar mod from: http://www.phpbb.com/community/viewtopi ... 0&t=666195
Yes naturally, I always install mods from phpBB.com only

I do not understand why that does not work for me :?
it seems like you are using a frensh lang package - did you add the lang changes to you frensh lang

/fr/common.php

Re: Calendar block for phpBB Calendar 0.0.7

Posted: 8. May 2008 21:35
by frold
fred_du_41 wrote: But after the install i have a little problem, at the top of my portal there is this error :?

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/functions_calendar.php on line 1922: Undefined index: WEEK
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3656: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2989)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3658: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2989)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3659: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2989)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3660: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2989)
I am very sorry! It seems like there was some missing lang variable for the calender.... Please update language/fr/common.php or language/en/common.php with the new code strip...

I did update the first post!

Code: Select all

//Missing lang variables
$lang['MONTH'] = 'Month';
$lang['WEEK'] = 'Week';
$lang['DAY'] = 'Day';

Re: Calendar block for phpBB Calendar 0.0.7

Posted: 8. May 2008 21:39
by fred_du_41
frold wrote: it seems like you are using a frensh lang package - did you add the lang changes to you frensh lang

/fr/common.php
Yes I added this at the end ;)

My /fr/common.php

Code: Select all

 // Event Calendar
    $lang = array_merge($lang, array(
       'CALENDAR'      => 'Agenda',
       // minical short day names   
       'mini_datetime'   => array(
            'Su'      => 'Lu',
            'Mo'      => 'Ma',
            'Tu'      => 'Me',
            'We'      => 'Je',
            'Th'      => 'Ve',
            'Fr'      => 'Sa',
            'Sa'      => 'Di',
       ),
    ));

Re: Calendar block for phpBB Calendar 0.0.7

Posted: 8. May 2008 21:56
by frold
fred_du_41 wrote:
My /fr/common.php

Code: Select all

 // Event Calendar
    $lang = array_merge($lang, array(
       'CALENDAR'      => 'Agenda',
       // minical short day names   
       'mini_datetime'   => array(
            'Su'      => 'Lu',
            'Mo'      => 'Ma',
            'Tu'      => 'Me',
            'We'      => 'Je',
            'Th'      => 'Ve',
            'Fr'      => 'Sa',
            'Sa'      => 'Di',
       ),
    ));
Before that part please add:

Code: Select all

//Missing lang variables
$lang['MONTH'] = 'Month';
$lang['WEEK'] = 'Week';
$lang['DAY'] = 'Day';

Re: Calendar block for phpBB Calendar 0.0.7 (fixed version)

Posted: 8. May 2008 22:22
by fred_du_41
That's good now :D

Thank's a lot ;)

Re: Calendar block for phpBB Calendar 0.0.7 (fixed version)

Posted: 8. May 2008 22:30
by frold
fred_du_41 wrote:That's good now :D

Thank's a lot ;)
Im glad it work for you also :D

Re: Calendar block for phpBB Calendar 0.0.7 (fixed version)

Posted: 9. May 2008 01:35
by CocoVFR
frold wrote:
CocoVFR wrote:An other question.
How can i make enable/disable the calendar (not mini_cal) in the ACP ?
You are not able to do so - this is a dirty hack :D
I think i've done this, but if someone can say if i am totally right. (i'm a noob in phpbb and modding, but i know well php. This snippets work well for me, so...)
So, that's i have done:
First, i've apply the snippets from frold (in first post).

In adm/acp/info/acp_portal.php

After:

Code: Select all

'minicalendar'	=> array('title' => 'ACP_PORTAL_MINICALENDAR_INFO', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
add:

Code: Select all

'calendarevent'	=> array('title' => 'ACP_PORTAL_CALENDAR_EVENT_INFO', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
In Langage/fr/Mods/lang_portal_acp.php

After

Code: Select all

'PORTAL_VIEW_PERS_ALBUMS'				=> 'Voir les images des albums personnels ?',
Add

Code: Select all

'ACP_PORTAL_CALENDAR_EVENT_INFO'		=> 'Calendrier des evenements',
'ACP_PORTAL_CALENDAR_EVENT_SETTINGS'	=> 'Parametres du calendrier des evenements',
'PORTAL_CALENDAR_EVENT'					=> 'Afficher ce bloc sur le portail',
'MINI_CAL_CALENDAR'						=> 'Calendrier evenement',
In include/acp/acp_portal.php

After

Code: Select all

case 'minicalendar':
		$display_vars = array(
				'title'	=> 'ACP_PORTAL_MINICALENDAR_SETTINGS',
				'vars'	=> array(
					'legend1'							=> 'ACP_PORTAL_MINICALENDAR_SETTINGS',
					'portal_minicalendar'				=> array('lang' => 'PORTAL_MINICALENDAR'					 ,	'validate' => 'bool',	 'type' => 'radio:yes_no',	'explain' => true),
					'portal_minicalendar_today_color'	=> array('lang' => 'PORTAL_MINICALENDAR_TODAY_COLOR'	 ,	'validate' => 'string', 'type' => 'text:10:10',	 'explain' => true),
					'portal_minicalendar_day_link_color'	=> array('lang' => 'PORTAL_MINICALENDAR_DAY_LINK_COLOR' ,	'validate' => 'string', 'type' => 'text:10:10',	 'explain' => true),
				)
			);
		break;
Add

Code: Select all

case 'calendarevent':
	$display_vars = array(
			'title'	=> 'ACP_PORTAL_CALENDAR_EVENT_SETTINGS',
			'vars'	=> array(
				'legend1'							=> 'ACP_PORTAL_CALENDAR_EVENT_SETTINGS',
				'portal_calendar_event'				=> array('lang' => 'PORTAL_CALENDAR_EVENT'					 ,	'validate' => 'bool',	 'type' => 'radio:yes_no',	'explain' => true),
					)
			     );
		break;
In root/Portal.php

After

Code: Select all

if ($portal_config['portal_change_style'])
{
	include($phpbb_root_path . 'portal/block/change_style.'.$phpEx);

}
ADD

Code: Select all

if ($portal_config['portal_calendar_event'])
{
	include($phpbb_root_path . 'portal/block/calendar.'.$phpEx);
}
In root/portal/block/calendar.php

AFTER

Code: Select all

'U_CALENDAR'   => append_sid("{$phpbb_root_path}calendar.$phpEx"),
ADD

Code: Select all

'S_DISPLAY_CALENDAR_EVENT' => true,
In root/styles/prosilver/template/portal/portal_body.html

ADD

Code: Select all

	<!-- IF S_DISPLAY_CALENDAR_EVENT -->
		<!-- INCLUDE portal/block/calendar.html -->			
	<!-- ENDIF -->
In where you want your block appear. (right block, left bloc or center block

In your database, execute this sql query:

Code: Select all

INSERT INTO xxxxx_portal_config VALUES("portal_calendar_event","1");
where xxxxx is the extension of your phpbb database table.

Go to ACP, and add a new module in portal bloc settings, and add "ACP_PORTAL_CALENDAR_EVENT_INFO" module.

That's all.
Now, in your ACP, you can display or not the "calendar event".

Any comment ? It's works for me, but perhaps, i've make some error, and/or i've forget someting ?

Re: Calendar block for phpBB Calendar 0.0.7 (fixed version)

Posted: 9. May 2008 06:55
by frold
it seems right ;-)

Re: Calendar block for phpBB Calendar 0.0.7 (fixed version)

Posted: 9. May 2008 09:21
by thomas.d
Another dirty hack:

Since my topic event icons are of different sizes and they looked a bit weired I changed in

styles/prosilver/template/portal/block/calendar.html

Code: Select all

<!-- IF mini_calendar_days.events.IMAGE --><img src="{mini_calendar_days.events.IMAGE}" title="{mini_calendar_days.events.ETYPE_DISPLAY_NAME}" height="20" width="20" /><!-- ENDIF -->
to

Code: Select all

<!-- IF mini_calendar_days.events.IMAGE --><img src="{mini_calendar_days.events.IMAGE}" title="{mini_calendar_days.events.ETYPE_DISPLAY_NAME}" height="" width="" /><!-- ENDIF -->
(empty "height" and "width", may be this is not XHTML 1.0 Strict anymore ...)

Since birthdays are displayed in a portal block this snippet here does not show them. But it creates a <hr> if a birthday occures. So I changed in

styles/prosilver/template/portal/block/calendar.html

Code: Select all

<!-- BEGIN mini_calendar_days -->
      <!-- BEGIN events -->
      <!-- IF mini_calendar_days.events.S_FIRST_ROW -->
      <!-- IF mini_calendar_days.BIRTHDAYS --><hr><!-- ENDIF -->
      <!-- ELSE --><hr><!-- ENDIF -->
to

Code: Select all

<!-- BEGIN mini_calendar_days -->
      <!-- BEGIN events -->
      <!-- IF mini_calendar_days.events.S_FIRST_ROW -->
      <br />
      <!-- ENDIF -->
So it does not mind birthdays anymore and this way the events are grouped by the day of occurence with a line break after each group, e.g.

[10] Meeting
[10] Another Meeting

[11] One more Meeting

[12] What the hell another Meeting
[12] I can't stand it ...
[12] Last Meeting

Re: Calendar block for phpBB Calendar 0.0.7 (fixed version)

Posted: 16. May 2008 14:22
by derkubi
Is there a block for subsilver ?

Re: Calendar block for phpBB Calendar 0.0.7 (fixed version)

Posted: 16. May 2008 18:30
by frold
derkubi wrote:Is there a block for subsilver ?
I havent made one....

But I guess you can use the code and easy edit it to fit subsilver...

Re: Calendar block for phpBB Calendar 0.0.7 (fixed version)

Posted: 17. May 2008 14:26
by derkubi
when i copy all the prosilver files to x-static ( subsilver ) and edit the x-static files i see the calendar , but without a frame :
Image

Re: Calendar block for phpBB Calendar 0.0.7

Posted: 24. May 2008 20:55
by frold
Sry, due to lack of time I dont have time to support other templates then prosilver

Re: Calendar block for phpBB Calendar 0.0.7

Posted: 25. May 2008 17:51
by tomcon
@frold: woul you be so kind to post the following code of your Poratl:

1. actual themes: the last poster is on the right side ...that looks good
2. the registertabs on your actual themes are linked to differnt forum?

thx a lot+

tomcon

Re: Calendar block for phpBB Calendar 0.0.7

Posted: 25. May 2008 18:01
by frold
tomcon wrote: 1. actual themes: the last poster is on the right side ...that looks good
Thats because I use a old version of Board3 portal - I use the second latest version. I never did a upgrade....
2. the registertabs on your actual themes are linked to differnt forum?
The tab based block with "Alle", "Studmed", "Candmed".....?

If so its a hardcode hacked version of the news compacted block- If I get time tonight I can share it but its very ugly code, so ppl need to hardcode the forums from where the latest post are taken....