If that works the same should be changed in the schedule_event_recurring.html template file.
Dan O.
------------------
btw, installation is standard. Just unzip/untar in the plugins directory and enable it under Manage Plugins in the admin application.
------------------David Whittaker http://www.uabcm.com/ http://www.csworkbench.com/
Now I have a new problem:When I add an event using the regular "Add Event" command the Redirector works.BUT:When I add an event using the "Add OneClick Event" option from the menu the Redirector doesn't work.
Oh yea, one more thing: is there a way to add the "Add OneClick Event" as a command from the left navigation bar?
Thanks,Guy
To add OneClick event entry, find this section (line 153 or so of default.html):
code:<%if ($User->hasPermission($CALENDAR_KEY,"ADD_EVENT")) { %> <TR><TD BGCOLOR="<%=$_COMMAND_OPTION_BGCOLOR%>"><B><a href="<%=$ADMIN_CGI_URL%>?calendar=<%=$CALENDAR_KEY%>&username=<%=$User->{username}%>&template=add_edit_event.html" CLASS="commandtext">Add Event</A></B></TD></TR><%}%>
<%if ($User->hasPermission($CALENDAR_KEY,"ADD_EVENT")) { %> <TR><TD BGCOLOR="<%=$_COMMAND_OPTION_BGCOLOR%>"><B><a href="<%=$ADMIN_CGI_URL%>?calendar=<%=$CALENDAR_KEY%>&username=<%=$User->{username}%>&template=add_edit_event.html" CLASS="commandtext">Add Event</A></B></TD></TR><%}%>
Then copy the <TR><TD ... line changing the template from add_edit_event.html to schedule_oneclick_non_recurring.html, and also changing the Add Event text to Add OneClick Event or something similar. Alternatively, you can completely replace the original Add Event section with the changes above if you want OneClick to replace normal event addition.
Thanks for all your help,Guy
my ($ss, $mi, $hh, $dd, $mm, $yy) = gmtime($db->getRecord({'event_id' => $in{'EVENT_id'}})->{start});
to this:
my ($ss, $mi, $hh, $dd, $mm, $yy) = gmtime($db->getRecord({'event_id' => $Template::event->{'id'}})->{start});
in the part of the oneclick subroutine that you edited. That should fix your problem.
Do I copy the entire contents of after_schedule_event.pl into command_add_oneclick_event.pl, just before the closing bracket? When I do that, no redirection occurs (no error, either). I know my error is probably in one single line of code...
sub after_schedule_event{
and
}
1;
That sounds like it will fix your problem.
I've got the Redirector working with One-Click and have also altered default.html so that the ADD button on the calendar does One-Click Entry.
It works great, but when I click EDIT events on the calendar, the redirector doesn't work. Does the edit_delete_events.html file need to be modified as well?
Thanks,Adam
Adam,
You may be able to get around that by duplicating the Redirector plug-in's file after_schedule_event.pl and renaming it to after_edit_event.pl. Now in after_edit_event.pl you'd need to change the line:
sub after_schedule_event
to
sub after_edit_event
and putting it in the same directory as the Redirector plug-in's files. That way the same code should be called after editing an event? It is untested though.
[This message has been edited by DanO (edited January 20, 2003).]
All updated files are contained in the OneClick.2003-06.zip file now available at the Unofficial CalendarScript - Mods and Plugins site.
Let me know if there are any problems.
[This message has been edited by DanO (edited June 04, 2003).]
Any suggestions?
Are your CalendarScript files still using the default .pl file name extension or did you change them to .cgi?