[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.
dpitchfo
Registered User
Posts: 2
Joined: Sat Oct 18, 2008 7:52 pm

phpBB Calendar 0.0.8 (alightner) -Permission Error (SOLVED)

Post by dpitchfo »

Hi,

Trying to do a new install of Calendar (0.0.8) in PHP3 (3.02). I followed the instructions and went back and double checked my work. All seems ok, however, when I try to set the permission in ACP (Permission Role->Admin Role (Edit)), to "YES" and press submit, the system accepts it and update the system "ROLE is successfully editted". However, when you go back into the role permission, it wasn't updated.

Secondly, when I try to update Users Role, I get an sql error for Duplicate entry.

Code: Select all

General Error
SQL ERROR [ mysqli ]

Duplicate entry '5-0' for key 1 [1062]

SQL

INSERT INTO bb_acl_roles_data (role_id, auth_option_id, auth_setting) VALUES (5, 86, 1), (5, 88, 1), (5, 93, 1), (5, 109, 1), (5, 114, 1), (5, 0, 1), (5, 0, 1), (5, 0, 1), (5, 0, 1), (5, 85, 1)

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 143
CALL: dbal->sql_error()

FILE: includes/db/dbal.php
LINE: 438
CALL: dbal_mysqli->sql_query()

FILE: includes/acp/auth.php
LINE: 966
CALL: dbal->sql_multi_insert()

FILE: includes/acp/acp_permission_roles.php
LINE: 214
CALL: auth_admin->acl_set_role()

FILE: includes/functions_module.php
LINE: 471
CALL: acp_permission_roles->main()

FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()

If I delete the Primary Keys for bb_acl_roles_data, the system reports that Users Permission were updated successfully, however, nothing is updated.

I still cannot figure out why this is not working and could not find any answers to this problem in the bulletin board (only problems...)

Any help would be appreciated.

Don

SOLUTION:
1) I didn't use the drop down tabs in the ACP to select Calendar MODS. Need to drop use the drop down. However, they will not appear until you clear your cache. (BTW - I am an idiot because its not the browser cache, its the ACP (General) cache. Then all the permission worked fine. The instruction manual needs to be a bit clearer on these steps.
Last edited by dpitchfo on Mon Oct 20, 2008 5:39 pm, edited 1 time in total.

Nick2410
Registered User
Posts: 1
Joined: Mon Oct 20, 2008 8:58 am

Re: [Alpha] phpBB Calendar 0.0.8 (alightner)

Post by Nick2410 »

How do i delete the Date at the Events on Week and Day View?

Look here:
Image

kim.toms
Registered User
Posts: 1
Joined: Mon Oct 20, 2008 2:34 pm

Re: [Alpha] phpBB Calendar 0.0.8 (alightner)

Post by kim.toms »

Postgres syntax modifications for the SQL DDL statements:

Code: Select all

/* WARNING: do NOT execute the SQL commands on the phpbb_acl_options table more 
than once if you're upgrading or trying to repair a previous installation of the calendar mod.
Executing this command more than once will add duplicate entries to the table 
breaking your current permissions and causing the calendar to malfunction */


INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('a_calendar', 1, 0, 0),
('m_calendar_edit_other_users_events', 1, 0, 0),
('m_calendar_delete_other_users_events', 1, 0, 0),
('u_calendar_view_events', 1, 0, 0),
('u_calendar_create_events', 1, 0, 0),
('u_calendar_edit_events', 1, 0, 0),
('u_calendar_delete_events', 1, 0, 0);

DROP TABLE IF EXISTS phpbb_calendar_config;
CREATE TABLE phpbb_calendar_config (
  config_name varchar(255) NOT NULL,
  config_value varchar(255) NOT NULL
);

INSERT INTO phpbb_calendar_config (config_name, config_value) VALUES 
('first_day_of_week', '0'),
('index_display_week', '0'),
('index_display_next_events', '5'),
('hour_mode', '12'),
('display_truncated_name', '0'),
('prune_frequency', '0'),
('last_prune', '0'),
('prune_limit', '2592000'),
('display_hidden_groups', '0');

DROP TABLE IF EXISTS phpbb_calendar_event_types;
CREATE TABLE phpbb_calendar_event_types (
  etype_id serial ,
  etype_index smallint  NOT NULL default '0',
  etype_full_name varchar(255)  NOT NULL default '',
  etype_display_name varchar(255)  NOT NULL default '',
  etype_color varchar(6)  NOT NULL default '',
  etype_image varchar(255) NOT NULL,
  PRIMARY KEY  (etype_id)
);

INSERT INTO phpbb_calendar_event_types (etype_id,etype_index,etype_full_name,etype_display_name,etype_color,etype_image) VALUES 
 (1,1,'Generic Event','','','');

DROP TABLE IF EXISTS phpbb_calendar_events;
CREATE TABLE phpbb_calendar_events (
  event_id serial ,
  etype_id smallint NOT NULL,
  sort_timestamp bigint  NOT NULL,
  event_start_time bigint  NOT NULL,
  event_end_time bigint  NOT NULL,
  event_all_day smallint NOT NULL default '0',
  event_day varchar(10)  NOT NULL default '',
  event_subject varchar(255)  NOT NULL default '',
  event_body bytea NOT NULL,
  poster_id int  DEFAULT '0' NOT NULL,
  event_access_level smallint NOT NULL default '0',
  group_id int  DEFAULT '0' NOT NULL,
  enable_bbcode smallint  NOT NULL default '1',
  enable_smilies smallint  NOT NULL default '1',
  enable_magic_url smallint  NOT NULL default '1',
  bbcode_bitfield varchar(255)  NOT NULL default '',
  bbcode_uid varchar(8)  NOT NULL,
  PRIMARY KEY  (event_id)
);

User avatar
therat
Registered User
Posts: 285
Joined: Sun Apr 07, 2002 6:06 pm
Contact:

Re: [Alpha] phpBB Calendar 0.0.8 (alightner)

Post by therat »

I would like to change the order of the Who can see this event drop down, I have found the following code in calendarpost.php. Is it safe just to re-order this to what I need, will that cause an other problems?

Code: Select all

$level_sel_code  = "<select name='calELevel' id='calELevel' onchange='update_group_id_state();'>\n";
$level_sel_code .= "<option value='0'>".$user->lang['EVENT_ACCESS_LEVEL_PERSONAL']."</option>\n";
$level_sel_code .= "<option value='1'>".$user->lang['EVENT_ACCESS_LEVEL_GROUP']."</option>\n";
$level_sel_code .= "<option value='2'>".$user->lang['EVENT_ACCESS_LEVEL_PUBLIC']."</option>\n";
$level_sel_code .= "</select>\n";

User avatar
Sailsfast
Registered User
Posts: 28
Joined: Wed Feb 20, 2008 3:10 am

Re: [Alpha] phpBB Calendar 0.0.8 (alightner)

Post by Sailsfast »

I have two requests:

My friend Kim figured out the changes to the SQL code to make it work with Postgres; which are posted separately in his previous post... Could you please include them in future versions?

And perhaps most importantly...

I would like the calendar to display events based upon a particular forum... I host a larger phpBB install that includes several forums. I would like to see the calendar events displayed to be filtered based upon the particular forum that the user is currently a member of or is viewing at a particular time...

For instance..

While/if am viewing the Entertainment Committee discussion forum I would like to see the meeting dates/events for that committee rather than those for Program or Beer committees.

The problem with doing it with groups... Would be that the person entering the event would have to be certain to select the correct group... The person viewing the events might be a member of more than one committee (group)... And individually setting up group permissions for each particular member(hundreds) could be quite tedious.

Cheers...
Doug

my4skcg
Registered User
Posts: 60
Joined: Sun May 07, 2006 8:10 pm

Re: [Alpha] phpBB Calendar 0.0.8 (alightner)

Post by my4skcg »

my4skcg wrote:
my4skcg wrote:Installed. Had a few problems (cache) which I solved after reading the posts. Now it's working.

I am having a problem with an event that is for a private group. The admin created the event and can see it on the calendar, but another member of the private group can not see it. The private user can not create a new event for the group "private", but can do so for registered user. The member of the private group CAN view a forum that has permissions for only the private group, though. And they are also listed as being in the "private" group.

I have another group that is not private, and have added an event for that group. Users of the non-private group can view their event.

Do you know if this is my problem or a problem in the mod?

Thanks, Marion
When I could not get the private group events to work, I tested it with a non-private group. I set everything up the same between the two groups, including permissions, the only difference is one is private group the other is not.

This has me baffled.

I have even gone in and changed the user permissions for a user in the private group to allow for calendar access, and that did not work.
Could someone else test out calendar permissions for a private group? The admin, who is a member of the private group, has no problems adding, editing, viewing calendar events for the private group, but other private group members can not add or view those calendar events. I'd really like to know if others have the same problem, or not. I have tried setting calendar permissions for the group, then also just for an individual. Neither has worked for me.

Thanks.

DJ Skitzo
Registered User
Posts: 596
Joined: Sun Aug 12, 2007 7:25 pm

Re: [Alpha] phpBB Calendar 0.0.8 (alightner)

Post by DJ Skitzo »

I have just installed this on my test board and it is perfect. Exactly what I was hoping for, Thanks! :D

WoundedPaw
Registered User
Posts: 15
Joined: Wed Dec 12, 2007 6:50 pm

Re: [Alpha] phpBB Calendar 0.0.8 (alightner)

Post by WoundedPaw »

I've been searching but can't find an answer to this one so far:
I don't want events that go past midnight to show up on the next day in the calendar. If a show for example starts at 10pm and ends at 2am it should not show up in the calendar as an event for both days, only the day it starts on. How can I fix this?

DJ Skitzo
Registered User
Posts: 596
Joined: Sun Aug 12, 2007 7:25 pm

Re: [Alpha] phpBB Calendar 0.0.8 (alightner)

Post by DJ Skitzo »

WoundedPaw wrote:I've been searching but can't find an answer to this one so far:
I don't want events that go past midnight to show up on the next day in the calendar. If a show for example starts at 10pm and ends at 2am it should not show up in the calendar as an event for both days, only the day it starts on. How can I fix this?
I never realised it does this.

I hope to get a fix for this aswell

WoundedPaw
Registered User
Posts: 15
Joined: Wed Dec 12, 2007 6:50 pm

Re: [Alpha] phpBB Calendar 0.0.8 (alightner)

Post by WoundedPaw »

I worked it out myself. Made some changes to the SQL that retrieves the events for a day. Anyone want it?

DJ Skitzo
Registered User
Posts: 596
Joined: Sun Aug 12, 2007 7:25 pm

Re: [Alpha] phpBB Calendar 0.0.8 (alightner)

Post by DJ Skitzo »

WoundedPaw wrote:I worked it out myself. Made some changes to the SQL that retrieves the events for a day. Anyone want it?
Yes please :D

Octopus
Registered User
Posts: 18
Joined: Mon Mar 19, 2007 10:28 am

Re: [Alpha] phpBB Calendar 0.0.8 (alightner)

Post by Octopus »

Hello,
does anybody have the files of a phpbb-version where the calender-mod is already included (and perhaps even a german version). Because i wan´t to do a little bit of testing and that should be the fastest way to start for me...

Thanks.

wolfman24
Registered User
Posts: 387
Joined: Tue Mar 07, 2006 12:07 pm

Re: [Alpha] phpBB Calendar 0.0.8 (alightner)

Post by wolfman24 »

Strange, insted of waiting for an answer for hours (more than 3 up to now), you could have modified it yourself in about half an hour, if you don't mod often, otherwise you would have been much faster. So go on, mod it yourself, it won't hurt and you will learn a lot.

WoundedPaw
Registered User
Posts: 15
Joined: Wed Dec 12, 2007 6:50 pm

Re: [Alpha] phpBB Calendar 0.0.8 (alightner)

Post by WoundedPaw »

Here's the code I changed to stop events from overlapping days.
In functions_calendar.php in root/includes:
Both function calendar_display_week and function calendar_display_month contain an sql statement starting with
$sql = 'SELECT * FROM ' . CALENDAR_EVENTS_TABLE . '

What I changed was to add another variable $mid_temp_date which is set to 8 hours after the start of the day. Right above that sql statement and right after the line

$end_temp_date = $start_temp_date + 86399;

I added

$mid_temp_date = $start_temp_date + 28800;

and changed one line in the sql to read (

( event_end_time > '.$db->sql_escape($mid_temp_date).' AND event_end_time <= '.$db->sql_escape($end_temp_date).' ) OR

instead of

( event_end_time > '.$db->sql_escape($start_temp_date).' AND event_end_time <= '.$db->sql_escape($end_temp_date).' ) OR


which means retrieve an event for that day if it ended after 8am that morning and before the end of that day instead of any event that ended after 00:01 am that morning and before the end of that day. You can adjust the time by just calculating the number of seconds from midnight you want to exclude and setting $mid_temp_date to that number.

WoundedPaw
Registered User
Posts: 15
Joined: Wed Dec 12, 2007 6:50 pm

Re: [Alpha] phpBB Calendar 0.0.8 (alightner)

Post by WoundedPaw »

There was some talk of attachments in calendar events. Did that go anywhere? I can't seem to find it.

Locked

Return to “[3.0.x] Abandoned MODs”