[ABD] phpBB Calendar 0.1.1 (alightner)

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
NineSwords
Registered User
Posts: 4
Joined: Mon Oct 29, 2012 9:32 am

Re: [Beta] phpBB Calendar 0.1.1 (alightner)

Post by NineSwords »

Hello again,

I encountered a problem with the email notification. Some users of my board are gettin spammed with emails everytime a new event is created. The unsubscribe link in the Email notofication doesn't seem to work and the watch button at the bottom of the Calendar switches from on to off, but doesn't seem to disable the notifications.

Now I'd like to know how to disable email notifications in general? It's not neccessary in my board and I guess it would be the easiest way to get rid of the notifications altogether.

Thanks in advance.
User avatar
Volksdevil
Registered User
Posts: 2414
Joined: Sun Oct 03, 2010 2:03 pm
Location: Lancashire, UK
Name: Neil
Contact:

Re: [Beta] phpBB Calendar 0.1.0 (alightner)

Post by Volksdevil »

For anyone wanting the TRACKING and ALLOW Guests on by default...

Open ROOT/calendarpost.php

FIND:

Code: Select all

$event_data['track_rsvps'] = 0;
	$event_data['allow_guests'] = 0;
Replace with:

Code: Select all

$event_data['track_rsvps'] = 1;
	$event_data['allow_guests'] = 1;
EDIT: Also, how could I add another simple text input field (Location) on the add event page, which shows up on the view event page?
I added the below to the posting page which shows up the text input area, but I'm unsure on how to get it showing on the view event page?

Code: Select all

	<dl style="clear: left;">
		<dt><label for="eventloc">Location:</label></dt>
		<dd><input type="text" name="eventloc" id="eventloc" size="45" maxlength="60" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" /></dd>
	</dl>
Last edited by Volksdevil on Sat Dec 22, 2012 12:09 pm, edited 1 time in total.
My phpBB Extensions
Finally found great Website Hosting from Image KUALO!
Do NOT use 123-reg.co.uk - Incapable of running phpBB!
:ugeek: TekNeil - Streamer on Mixer | My Volkswagen Corrado G60
lupo87
Registered User
Posts: 25
Joined: Mon Aug 17, 2009 4:18 pm

Re: [Beta] phpBB Calendar 0.1.1 (alightner)

Post by lupo87 »

Hello
Is there any way to NOT display birthdays in calendar?
User avatar
Volksdevil
Registered User
Posts: 2414
Joined: Sun Oct 03, 2010 2:03 pm
Location: Lancashire, UK
Name: Neil
Contact:

Re: [Beta] phpBB Calendar 0.1.1 (alightner)

Post by Volksdevil »

See below post.
Last edited by Volksdevil on Sat Dec 22, 2012 12:11 pm, edited 1 time in total.
My phpBB Extensions
Finally found great Website Hosting from Image KUALO!
Do NOT use 123-reg.co.uk - Incapable of running phpBB!
:ugeek: TekNeil - Streamer on Mixer | My Volkswagen Corrado G60
User avatar
Volksdevil
Registered User
Posts: 2414
Joined: Sun Oct 03, 2010 2:03 pm
Location: Lancashire, UK
Name: Neil
Contact:

Re: [Beta] phpBB Calendar 0.1.1 (alightner)

Post by Volksdevil »

When viewing an event and you can see a headcount. (See red arrow in pic below)
Image


I want to use {CURR_YES_COUNT} from the view event page on the index page here pictured
Image

So I tried it in calendar_next_events_on_index.html but no joy :cry:

How can we do that? I presumed it was a language var that we could use anywhere? :oops:

EDIT: Another request too. Can we have the date selection form somehow show on the event view page?
Edit2 Possible bug: In Internet explorer 9, the {EVENT_URL} does not seem to work. Wherever it's used it just links to forum index.
My phpBB Extensions
Finally found great Website Hosting from Image KUALO!
Do NOT use 123-reg.co.uk - Incapable of running phpBB!
:ugeek: TekNeil - Streamer on Mixer | My Volkswagen Corrado G60
User avatar
Volksdevil
Registered User
Posts: 2414
Joined: Sun Oct 03, 2010 2:03 pm
Location: Lancashire, UK
Name: Neil
Contact:

Re: [Beta] phpBB Calendar 0.1.1 (alightner)

Post by Volksdevil »

Can anybody help with the above post? :) Would be great if so.
My phpBB Extensions
Finally found great Website Hosting from Image KUALO!
Do NOT use 123-reg.co.uk - Incapable of running phpBB!
:ugeek: TekNeil - Streamer on Mixer | My Volkswagen Corrado G60
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [Beta] phpBB Calendar 0.1.1 (alightner)

Post by pertneer »

Volksdevil wrote:When viewing an event and you can see a headcount. (See red arrow in pic below)
Image


I want to use {CURR_YES_COUNT} from the view event page on the index page here pictured
Image

So I tried it in calendar_next_events_on_index.html but no joy :cry:

How can we do that? I presumed it was a language var that we could use anywhere? :oops:

EDIT: Another request too. Can we have the date selection form somehow show on the event view page?
Edit2 Possible bug: In Internet explorer 9, the {EVENT_URL} does not seem to work. Wherever it's used it just links to forum index.
Edit calendar_next_events_on_index.html
as follows

Code: Select all

	<!-- IF .events -->
		<div class="forabg">
			<div class="inner"><span class="corners-top"><span></span></span>
			<ul class="topiclist">
				<li class="header">
					<dl class="icon">
						<dt>{L_UPCOMING_EVENTS}</dt>
						<dd style="width:12%">{L_INVITE_INFO}</dd>
						<dd style="width:4%">{L_YES}</dd>
						<dd style="width:16%">{L_EVENT_CREATED_BY}</dd>
					</dl>
				</li>
			</ul>
			<ul class="topiclist forums">
			<!-- BEGIN events -->
				<li class="row">
					<dl class="icon"<!-- IF events.IMAGE --> style="background-image: url({events.IMAGE}); background-repeat: no-repeat;"<!-- ENDIF -->>
						<dt><a href="{events.EVENT_URL}" title="<!-- IF events.ETYPE_DISPLAY_NAME -->{events.ETYPE_DISPLAY_NAME}: <!-- ENDIF -->{events.FULL_SUBJECT}">
							<span style="<!-- IF events.COLOR -->color:#{events.COLOR};<!-- ENDIF --> font-weight: bold;">
								<!-- IF events.ETYPE_DISPLAY_NAME -->{events.ETYPE_DISPLAY_NAME}: <!-- ENDIF -->{events.SUBJECT}</span><br /><!-- IF events.ALL_DAY -->{L_ALL_DAY} {events.START_TIME}<!-- ELSE -->{events.START_TIME} {L_TO_TIME} {events.END_TIME}<!-- ENDIF --></a>
						</dt>
						<dd style="width:12%; padding-left:5px;" class="lastpost">{events.INVITED}</dd>
						<dd style="width:4%; text-align: center;" class="lastpost">{events.CURR_YES_COUNT}</dd>
						<dd style="width:16%; padding-left:5px;" class="lastpost">{events.POSTER}</dd>
					</dl>
				</li>
			<!-- END events -->
			</ul>
			<span class="corners-bottom"><span></span></span></div>
		</div>
	<!-- ENDIF -->
open includes/function_calendar.php
find

Code: Select all

		$result = $db->sql_query_limit($sql, $x, 0);
		while ($row = $db->sql_fetchrow($result))
		{
			$events['EVENT_URL'] = append_sid("{$phpbb_root_path}calendar.$phpEx", "view=event&calEid=".$row['event_id'].$etype_url_opts);
			$events['IMAGE'] = $available_etype_images[$row['etype_id']];
			$events['COLOR'] = $available_etype_colors[$row['etype_id']];
			$events['ETYPE_DISPLAY_NAME'] = $available_etype_display_names[$row['etype_id']];
this should be on line ~1326
add after

Code: Select all

			$events['CURR_YES_COUNT'] = $row['rsvp_yes'];
This will get close to what you are looking for, but you will need to refine the layout.
I intend to live forever. So far, so good.
Steven Wright
User avatar
Volksdevil
Registered User
Posts: 2414
Joined: Sun Oct 03, 2010 2:03 pm
Location: Lancashire, UK
Name: Neil
Contact:

Re: [Beta] phpBB Calendar 0.1.1 (alightner)

Post by Volksdevil »

Awesome thank you! I got yes/maybe/no all working now on the index page. Thanks for the pointer 8-)

Just a few tweaks and I reckon this Calendar is pretty much perfect. It needs breadcrumbs for each pahe, can anyone help with that? I can get them on the main calendar page but that's about it.

Also, how could we add another simple text input field (Location) on the add event page, which shows up on the view event page?
I added the below to the posting page which shows up the text input area, but I'm unsure on how to get it showing on the view event page?

Code: Select all

	<dl style="clear: left;">
		<dt><label for="eventloc">Location:</label></dt>
		<dd><input type="text" name="eventloc" id="eventloc" size="45" maxlength="60" tabindex="2" value="{SUBJECT}" class="inputbox autowidth" /></dd>
	</dl>
Another request too. Can we have the date selection form somehow show on the event view page?

Edit Possible bug: In Internet explorer 9, the {EVENT_URL} does not seem to work. Wherever it's used it just links to forum index.
My phpBB Extensions
Finally found great Website Hosting from Image KUALO!
Do NOT use 123-reg.co.uk - Incapable of running phpBB!
:ugeek: TekNeil - Streamer on Mixer | My Volkswagen Corrado G60
User avatar
ViolaF
Registered User
Posts: 1518
Joined: Tue Aug 14, 2012 11:52 pm

Re: [Beta] phpBB Calendar 0.1.1 (alightner)

Post by ViolaF »

I want to share this here, because in Mod Writer Discussion section it going out of sight..

Alightner Calendar - Canonical - Title - Breadcrumb - Addition

This Additions brings canonical urls*, title tags and breadcrumbs to calendar.
That counts for all viewable modes (month, week, day, event-name).
  • All breadcrumb links are usable with current params (Boardname < Calendar < Mode/Event)
  • Title tags are sync with breadcrumbs (Board • Calendar • Mode/Event).
*make shure you have the canonical url snippet installed.

Note: This Addition is tested
Screenshots:

eg. month view

Image

event view

Image
open

includes/functions_calendar.php

find

Code: Select all

/* main function to display a month in the calendar */
function calendar_display_month()
{
    global $auth, $db, $user, $config, $template, $date, $available_etype_colors, $available_etype_images, $available_etype_display_names, $month_sel_code, $day_sel_code, $year_sel_code, $mode_sel_code;
    global $phpEx, $phpbb_root_path; 
after add

Code: Select all

    // ViolaF
    global $devil_month, $month_day, $month_month, $month_year; 
    // ViolaF                            
find

Code: Select all

    $calendar_header_txt = $user->lang['MONTH_OF'] . sprintf($user->lang['LOCAL_DATE_FORMAT'], $user->lang['datetime'][$date['month']], $date['day'], $date['year'] );
    $subject_limit = get_calendar_config_value("display_truncated_name", 0); 
after add

Code: Select all

    // ViolaF
    $devil_month  = $calendar_header_txt;
    $month_day    = $date['day'];
    $month_month  = $date['month_no'];
    $month_year   = $date['year'];
    // ViolaF                            
find

Code: Select all

/* main function to display an individual week in the calendar */
function calendar_display_week( $index_display )
{
    global $auth, $db, $user, $config, $template, $date, $month_names, $available_etype_colors, $available_etype_images, $available_etype_display_names, $month_sel_code, $day_sel_code, $year_sel_code, $mode_sel_code;
    global $phpEx, $phpbb_root_path; 
after add

Code: Select all

    // ViolaF
    global $devil_week, $week_day, $week_month, $week_year; 
    // ViolaF                           
find

Code: Select all

    $calendar_header_txt = $user->lang['WEEK_OF'] . sprintf($user->lang['LOCAL_DATE_FORMAT'], $user->lang['datetime'][$date['month']], $date['day'], $date['year'] );
    $subject_limit = get_calendar_config_value("display_truncated_name", 0); 
after add

Code: Select all

    // ViolaF
    $devil_week  = $calendar_header_txt;
    $week_day    = $date['day'];
    $week_month  = $date['month_no'];
    $week_year   = $date['year'];
    // ViolaF                               
find

Code: Select all

/* main function to display an individual day in the calendar */
function calendar_display_day()
{
    global $auth, $db, $user, $config, $template, $date, $available_etype_colors, $available_etype_images, $available_etype_display_names, $month_sel_code, $day_sel_code, $year_sel_code, $mode_sel_code;
    global $phpEx, $phpbb_root_path; 
after add

Code: Select all

    // ViolaF
    global $devil_day, $day_day, $day_month, $day_year; 
    // ViolaF                           
find

Code: Select all

    $calendar_header_txt = $user->lang['DAY_OF'] . sprintf($user->lang['LOCAL_DATE_FORMAT'], $user->lang['datetime'][$date['month']], $date['day'], $date['year'] );
    $subject_limit = get_calendar_config_value("display_truncated_name", 0); 
after add

Code: Select all

    // ViolaF
    $devil_day  = $calendar_header_txt;
    $day_day    = $date['day'];
    $day_month  = $date['month_no'];
    $day_year   = $date['year'];
    // ViolaF                              
find

Code: Select all

/* main function to display an individual event */
function calendar_display_event()
{
    global $auth, $db, $user, $config, $template, $date, $available_etype_colors, $available_etype_images, $available_etype_display_names;
    global $phpEx, $phpbb_root_path; 
after add

Code: Select all

    // ViolaF
    global $devil_id, $devil_subject; 
    // ViolaF                         
find

Code: Select all

        calendar_init_s_watching_event_data( $event_id, $s_watching_event ); 
after add

Code: Select all

        // ViolaF
        $devil_id      = $event_id;
        $devil_subject = $subject;
        // ViolaF                          
open

calendar.php

find

Code: Select all

switch( $view_mode )
{
    case "event":
        // display a single event
        $template_body = "calendar_view_event.html";
        calendar_display_event();
        break;

   case "next":
      // display next events for specified number of days
      $template_body = "calendar_next_events_for_x_days.html";
      $daycount = request_var('daycount', 60 );
      $user_id = request_var('u', 0);
      if( $user_id == 0 )
      {
          display_next_events_for_x_days( $daycount );
      }
      else
      {
          display_users_next_events_for_x_days($daycount, $user_id);
      }
      break;

    case "day":
        // display all of the events on this day
        $template_body = "calendar_view_day.html";
        calendar_display_day();
        break;

    case "week":
        // display the entire week
        // viewing the week is a lot like viewing the month...
        $template_body = "calendar.html";
        calendar_display_week( 0 );
        break;

    case "month":
        // display the entire month
        $template_body = "calendar.html";
        calendar_display_month();
        break;
} 
replace with

Code: Select all

// ViolaF
// $devil_title  = $user->lang['CALENDAR_TITLE'];
$devil_title  = '';
$u_view_forum = append_sid("{$phpbb_root_path}calendar.$phpEx");
$u_canocical  = "/calendar.$phpEx";
// ViolaF

switch( $view_mode )
{
    case "event":
        // display a single event
        $template_body = "calendar_view_event.html";
        calendar_display_event();
        // ViolaF
        $devil_title  = $devil_subject;
        $u_view_forum = append_sid("{$phpbb_root_path}calendar.$phpEx", "view=event&calEid=$devil_id");
        $u_canocical  = "/calendar.$phpEx?view=event&calEid=$devil_id";
        // ViolaF
        break;

   case "next":
      // display next events for specified number of days
      $template_body = "calendar_next_events_for_x_days.html";
      $daycount = request_var('daycount', 60 );
      $user_id = request_var('u', 0);
      if( $user_id == 0 )
      {
          display_next_events_for_x_days( $daycount );
        // ViolaF
        $devil_title  = $user->lang['UPCOMING_EVENTS'];
        $u_view_forum = false;
        // ViolaF
      }
      else
      {
          display_users_next_events_for_x_days($daycount, $user_id);
        // ViolaF
        $devil_title  = $user->lang['UPCOMING_EVENTS'];
        $u_view_forum = false;
        // ViolaF
      }
      break;

    case "day":
        // display all of the events on this day
        $template_body = "calendar_view_day.html";
        calendar_display_day();
        // ViolaF
        $devil_title  = $devil_day;
        $u_view_forum = append_sid("{$phpbb_root_path}calendar.$phpEx", "view=day&calD=$day_day&calM=$day_month&calY=$day_year");
        $u_canocical  = "/calendar.$phpEx?view=day&calD=$day_day&calM=$day_month&calY=$day_year";
        // ViolaF
        break;

    case "week":
        // display the entire week
        // viewing the week is a lot like viewing the month...
        $template_body = "calendar.html";
        calendar_display_week( 0 );
        // ViolaF
        $devil_title  = $devil_week;
        $u_view_forum = append_sid("{$phpbb_root_path}calendar.$phpEx", "view=week&calD=$week_day&calM=$week_month&calY=$week_year");
        $u_canocical  = "/calendar.$phpEx?view=week&calD=$week_day&calM=$week_month&calY=$week_year";
        // ViolaF
        break;

    case "month":
        // display the entire month
        $template_body = "calendar.html";
        calendar_display_month();
        // ViolaF
        $devil_title  = $devil_month;
        $u_view_forum = append_sid("{$phpbb_root_path}calendar.$phpEx", "view=month&calM=$month_month&calY=$month_year");
        $u_canocical  = "/calendar.$phpEx?view=month&calM=$month_month&calY=$month_year";
        // ViolaF
        break;
} 
find

Code: Select all

// Output the page
page_header($user->lang['PAGE_TITLE']); // Page title, this language variable should be defined in the language file you setup at the top of this page.                    
replace with

Code: Select all

// Output the page
page_header($user->lang['PAGE_TITLE'] . (($devil_title !=='') ? " &bull; $devil_title" : '')); // Page title, this language variable should be defined in the language file you setup at the top of this page.                    
find

Code: Select all

// Finish the script, display the page
page_footer(); 
before add

Code: Select all

$template->assign_vars(array(
   // ViolaF
   'CAL_NAME'    => $user->lang['CALENDAR_TITLE'],
   'U_VIEW_CAL'  => append_sid("{$phpbb_root_path}calendar.$phpEx"),
   // ViolaF
   // Canonical URL MOD
   'U_CANONICAL' => generate_board_url() . $u_canocical
   // Canonical URL MOD
));

// Set up the Navlinks for the forums navbar
$template->assign_block_vars('navlinks', array(
    /*
    'FORUM_NAME'    => ($user->lang['CALENDAR_TITLE']),
    'U_VIEW_FORUM'  => append_sid("{$phpbb_root_path}calendar.$phpEx")
    */
    // ViolaF
    'FORUM_NAME'    => $devil_title,
    'U_VIEW_FORUM'  => $u_view_forum
    // ViolaF
)); 
Note: If you dont want to use canonical urls at all, remove this code

Code: Select all

   // Canonical URL MOD
   'U_CANONICAL' => generate_board_url() . $u_canocical
   // Canonical URL MOD     
from the above edit and comment out all
$u_canocical = whatevercode
this way // $u_canocical = whatevercode
from the edit above the named before.
open

styles/prosilver/template/overall_header.html

find

Code: Select all

                <li class="icon-home"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a> <!-- BEGIN navlinks --> <strong>&#8249;</strong> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></li>             
replace with

Code: Select all

                <li class="icon-home"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a> <!-- BEGIN navlinks --><!-- IF SCRIPT_NAME == 'calendar' --> <strong>&#8249;</strong> <a href="{U_VIEW_CAL}">{CAL_NAME}</a> <strong>&#8249;</strong> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- ELSE --> <strong>&#8249;</strong> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- ENDIF --> <!-- END navlinks --></li>             
Clear all Template-, Style-, Board- and Browser-Caches.
User avatar
Mess
Registered User
Posts: 985
Joined: Wed Jul 01, 2009 6:37 am
Name: Kim

Re: [Beta] phpBB Calendar 0.1.1 (alightner)

Post by Mess »

nice, thanks for sharing. :)
kalkake
Registered User
Posts: 1
Joined: Tue Jan 01, 2013 11:49 pm

Re: [Beta] phpBB Calendar 0.1.1 (alightner)

Post by kalkake »

I am hoping someone can help me out here. I am running a fresh install of phpBB 3.0.11. I have tried to install this calendar manually, and with the umil installer. I finally got a complete install and have the ACP_Calendar module available and have the Calendar Settings and Manage Calendar event types in my settings, I have placed them under Board Configuration. I have set MY all my calendar permissions to YES, clear cache between each step. Whem I login to the board I so no way to access the Calendar. I do have Display Current Week: turned on, but still nothing.

I am sure I am missing something simple here, but can't figure it out.

Thanks in advance.
User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [Beta] phpBB Calendar 0.1.1 (alightner)

Post by keith10456 »

kalkake wrote:I am hoping someone can help me out here. I am running a fresh install of phpBB 3.0.11. I have tried to install this calendar manually, and with the umil installer. I finally got a complete install and have the ACP_Calendar module available and have the Calendar Settings and Manage Calendar event types in my settings, I have placed them under Board Configuration. I have set MY all my calendar permissions to YES, clear cache between each step. Whem I login to the board I so no way to access the Calendar. I do have Display Current Week: turned on, but still nothing.

I am sure I am missing something simple here, but can't figure it out.

Thanks in advance.

Did you do the template edits to the style that you're using?
User avatar
pertneer
Registered User
Posts: 205
Joined: Tue Dec 05, 2006 3:56 pm
Contact:

Re: [Beta] phpBB Calendar 0.1.1 (alightner)

Post by pertneer »

kalkake wrote:I am hoping someone can help me out here. I am running a fresh install of phpBB 3.0.11. I have tried to install this calendar manually, and with the umil installer. I finally got a complete install and have the ACP_Calendar module available and have the Calendar Settings and Manage Calendar event types in my settings, I have placed them under Board Configuration. I have set MY all my calendar permissions to YES, clear cache between each step. Whem I login to the board I so no way to access the Calendar. I do have Display Current Week: turned on, but still nothing.

I am sure I am missing something simple here, but can't figure it out.

Thanks in advance.
Did you refresh the template, theme, and imageset?

Admin panel>styles
Click template on the left(do the same for theme/imageset)
Click refresh on the right
The hold shift and click refresh on your index page.
I intend to live forever. So far, so good.
Steven Wright
lupo87
Registered User
Posts: 25
Joined: Mon Aug 17, 2009 4:18 pm

Re: [Beta] phpBB Calendar 0.1.1 (alightner)

Post by lupo87 »

any way to not display users birthdays in calendar?
Locked

Return to “[3.0.x] Abandoned MODs”