Calendar block for phpBB Calendar 0.0.8

Forum rules
This forum is not for support requests.

Only post Modifications for Board3 Portal 1.0.x in this forum.

Topic author
frold
Portal Enthusiast
Posts: 108
Joined: 24. March 2008 07:52

Re: Calendar block for phpBB Calendar 0.0.7

Post 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
http://www.studmed.dk - Portal for doctors and medical students in Denmark

Topic author
frold
Portal Enthusiast
Posts: 108
Joined: 24. March 2008 07:52

Re: Calendar block for phpBB Calendar 0.0.7

Post 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';
http://www.studmed.dk - Portal for doctors and medical students in Denmark

fred_du_41
Translator
Posts: 11
Joined: 8. May 2008 13:11
Location: France : Loir et Cher
Contact:

Re: Calendar block for phpBB Calendar 0.0.7

Post 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',
       ),
    ));
La Passion du Reflex Numérique : ?Photos-entre-Amis ?Annuaire ? Mon Flickr ?

Topic author
frold
Portal Enthusiast
Posts: 108
Joined: 24. March 2008 07:52

Re: Calendar block for phpBB Calendar 0.0.7

Post 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';
http://www.studmed.dk - Portal for doctors and medical students in Denmark

fred_du_41
Translator
Posts: 11
Joined: 8. May 2008 13:11
Location: France : Loir et Cher
Contact:

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

Post by fred_du_41 »

That's good now :D

Thank's a lot ;)
La Passion du Reflex Numérique : ?Photos-entre-Amis ?Annuaire ? Mon Flickr ?

Topic author
frold
Portal Enthusiast
Posts: 108
Joined: 24. March 2008 07:52

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

Post by frold »

fred_du_41 wrote:That's good now :D

Thank's a lot ;)
Im glad it work for you also :D
http://www.studmed.dk - Portal for doctors and medical students in Denmark
User avatar

CocoVFR
Active Member
Posts: 19
Joined: 3. May 2008 02:50

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

Post 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 ?

Topic author
frold
Portal Enthusiast
Posts: 108
Joined: 24. March 2008 07:52

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

Post by frold »

it seems right ;-)
http://www.studmed.dk - Portal for doctors and medical students in Denmark
User avatar

thomas.d
Former Team Member
Posts: 625
Joined: 19. January 2008 23:56
phpBB.de User: thomas.d
phpBB.com User: thomas.d
Contact:

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

Post 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
Viele Grüße

Thomas

Deutsche Sprachdateien für
[Alpha] phpBB Calendar 0.0.8 (alightner) | [RC] phpBB Arcade 1.0.RC8 |
ACP Add User MOD 1.0.0 |
User avatar

derkubi
Portal Enthusiast
Posts: 159
Joined: 12. March 2008 18:52
Contact:

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

Post by derkubi »

Is there a block for subsilver ?

Topic author
frold
Portal Enthusiast
Posts: 108
Joined: 24. March 2008 07:52

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

Post 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...
http://www.studmed.dk - Portal for doctors and medical students in Denmark
User avatar

derkubi
Portal Enthusiast
Posts: 159
Joined: 12. March 2008 18:52
Contact:

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

Post 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

Topic author
frold
Portal Enthusiast
Posts: 108
Joined: 24. March 2008 07:52

Re: Calendar block for phpBB Calendar 0.0.7

Post by frold »

Sry, due to lack of time I dont have time to support other templates then prosilver
http://www.studmed.dk - Portal for doctors and medical students in Denmark
User avatar

tomcon
Active Member
Posts: 26
Joined: 20. May 2008 15:39

Re: Calendar block for phpBB Calendar 0.0.7

Post 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
tomcon

Topic author
frold
Portal Enthusiast
Posts: 108
Joined: 24. March 2008 07:52

Re: Calendar block for phpBB Calendar 0.0.7

Post 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....
http://www.studmed.dk - Portal for doctors and medical students in Denmark
Locked

Return to “board3 Portal v1.0.x - Modifications”