[MOD] Calendar 0.0.7 Integration

Forum rules
This forum is not for support requests.

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

Topic author
connect
Translator
Posts: 18
Joined: 14. July 2008 14:47

[MOD] Calendar 0.0.7 Integration

Post by connect »

:idea: Don't know where to post this. I thought it might interest somebody.

NOTES
This is basic integration of Calendar 0.0.7 and Board 3 Portal 0.2.1 Mini calendar
OPEN
/portal/block/mini_cal.php

FIND

Code: Select all

// output the days for the current month
BEFORE ADD

Code: Select all

// Recieve calendar events for this month
$mini_cal_month_lastday_time = strtotime($mini_cal_this_year."-".$mini_cal_this_month."-".$mini_cal_month_days." 23:59");
$mini_cal_month_firstday_time = strtotime($mini_cal_this_year."-".$mini_cal_this_month."-01 00:00");

$sql = "SELECT
			event_access_level,
			sort_timestamp
		FROM
			`".$table_prefix."calendar_events`
		WHERE
			event_access_level = 2 and
			sort_timestamp > ".$mini_cal_month_firstday_time." and
			sort_timestamp < ".$mini_cal_month_lastday_time."
		"; // public events only
		
$result = $db->sql_query($sql);
		
while ( $row = $db->sql_fetchrow($result) )
{
	$mini_cal_events[date("d-m-Y",$row['sort_timestamp'])] = 1;
}
FIND

Code: Select all

$mini_cal_day_link = '<a href="' . append_sid($phpbb_root_path . "search.$phpEx?search_id=unanswered&st=" . $nix_mini_cal_today) . '" class="' . MINI_CAL_DAY_LINK_CLASS . '" style="color: ' . $portal_config['portal_minicalendar_day_link_color'] . ';">' . ( $mini_cal_day ) . '</a>';
REPLACE WITH

Code: Select all

$mini_cal_day_link = '<a href="' . append_sid($phpbb_root_path . "calendar.$phpEx?view=day&calD=".$mini_cal_this_day."&calM=".$mini_cal_this_month."&calY=".$mini_cal_this_year) . '" class="' . MINI_CAL_DAY_LINK_CLASS . '" style="color: ' . $portal_config['portal_minicalendar_day_link_color'] . ';">' . ( $mini_cal_day ) . '</a>';
FIND

Code: Select all

$mini_cal_day = ( $mini_cal_today >= $d_mini_cal_today ) ? $mini_cal_day_link : $mini_cal_day;
REPLACE WITH

Code: Select all

// add zeros
$mini_day = (strlen($mini_cal_this_day) == 1) ? ( $mini_day = '0'.$mini_cal_this_day) : ($mini_day = $mini_cal_this_day);
$mini_month = (strlen($mini_cal_this_month) == 1) ? ( $mini_month = '0'.$mini_cal_this_month) : ($mini_month = $mini_cal_this_month);
			
if ($mini_cal_events[ "$mini_day-$mini_month-$mini_cal_this_year" ] == 1)
{
	// ok, we've got an event here
	$mini_cal_day_link = "<u>".$mini_cal_day_link."</u>"; // change event marking as you like
}

$mini_cal_day = $mini_cal_day_link;
USE IT ON YOUR OWN RISK
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: [MOD] Calendar 0.0.7 Integration

Post by Kevin »

Moved to "Blocks - In Development"

Thank you, connect! :)
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!
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: [MOD] Calendar 0.0.7 Integration

Post by thomas.d »

connect wrote: NOTES
This is basic integration of Calendar 0.0.7 and Board 3 Portal 0.2.1 Mini calendar
Hi connect,

thanks for sharing.

As you stated "and Board 3 Portal 0.2.1": will this work with Board3 Portal 1.0.0 RC1?
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 |

Topic author
connect
Translator
Posts: 18
Joined: 14. July 2008 14:47

Re: [MOD] Calendar 0.0.7 Integration

Post by connect »

Yes, it works with RC1 1.0.0 just fine

wernermarcel
Tester
Posts: 5
Joined: 16. June 2008 19:05

Re: [MOD] Calendar 0.0.7 Integration

Post by wernermarcel »

Hi,

is it possible to show a mini point or other little sign in the days for spezial events ?

Meeting --> Red Point
Playing with friends --> Blue Point

and so on.

It can be linked with the event classes, an at to top a little legend...


Thx for answer.

An spezial Thx for this little hack a searching a long term for that :-)

Mfg
Marcel

Flaiker
Active Member
Posts: 3
Joined: 11. April 2011 18:08

Re: [MOD] Calendar 0.0.7 Integration

Post by Flaiker »

Somewhere where i can still download 0.0.7? Currently theres only 1.0 Beta avaible and I don't know if it works with the portal.
Another thing: I couldnt find the following line at all in mini_cal.php:

$mini_cal_day_link = '<a href="' . append_sid($phpbb_root_path . "search.$phpEx?search_id=unanswered&st=" . $nix_mini_cal_today) . '" class="' . MINI_CAL_DAY_LINK_CLASS . '" style="color: ' . $portal_config['portal_minicalendar_day_link_color'] . ';">' . ( $mini_cal_day ) . '</a>';

So I couldn't replace it. Can someone help me, or is there a new implementation tutorial for 1.0?
Locked

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