Allow Copy / Duplicate Calendar event
- Status
- Open
- Subject
- Allow Copy / Duplicate Calendar event
- Version
- 5.x
- Category
- Patch
- Feature
- Calendar
- Resolution status
- New
- Submitted by
- AlanE
- Lastmod by
- AlanE
- Rating
- Description
Our users have requested the facility to "copy" a calendar event.
This would be via the means of a "Copy" button when previewing an event, on clicking the button you would then see the event details and be able to change any of them before clicking "Save".
Where upon a new event will be created with these details.
- Solution
Edit: templates/tiki-calendar_edit_item.tpl
Add the following line directly after the line for the "Edit/Delete event" this ensures the button is only shown at the correct time
tiki-calendar_edit_item.tplCopy to clipboard{button href="tiki-calendar_edit_item.php?calitemId=$id&duplicate=y" _text="{tr}Copy event{/tr}"}
It appears a $_REQUEST function already exists for duplicating calendar events, and I cant see this called from anywhere else. However the function does have an interesting bug where it copies the event before allowing you to edit, so when you do click "SAVE" then two events are created.To resolve this bug, Edit: tiki-calendar_edit_item.php
Find the following code (within the "duplicate" section) and comment it out.
tiki-calendar_edit_item.phpCopy to clipboard// $calendarlib->set_item($user,0,$calitem);
Our site also has a modification to allow participants to sign up to calendar events, it is also usefull to blank out the participants on a duplicated event.Adding the following code within the "duplicate" section after the commented line above removes any existing participants from the copied event.
tiki-calendar_edit_item.phpCopy to clipboard$calitem['participants'] = array();- Importance
- 1 low
- Priority
- 5
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 3461
- Created
- Wednesday 30 June, 2010 19:55:37 UTC
by AlanE - LastModif
- Wednesday 30 June, 2010 19:55:37 UTC