Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Pages: [1]   Go Down
Print
Author Topic: Schedule Later?  (Read 669 times)
0 Members and 1 Guest are viewing this topic.
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« on: April 06, 2002, 06:09:00 PM »

Is it possible to add only the event details but come back at some later time to schedule the date for that event?

I know if you add an event and opt out of the process before completing the date section, the event is added to the database. But how would one find what event(s) are awaiting completion?

Dan O.

Logged
TubaDave
New Member
*

Karma: 0
Offline Offline

Posts: 0

Student


WWW
« Reply #1 on: April 07, 2002, 03:05:00 AM »

To be able to add the schedule after the event has been added without one, you just need a list of everything that doesn't have a schedule on the edit/delete events screen.  There really isn't a way to do this without editing the template.  You can copy the edit_delete_events.html file from the templates/admin/English directory into a plugin directory if you wish, or you can just edit it where it is.  But here's the changes you'll have to make.

1) Find these lines, somewhere around line 180.

$total = 0;
foreach $e (sort { $a->{'schedule'}->{'start'} <=> $b->{'schedule'}->{'start'} } @$events) {

2) Directly between them, put this code.

code:

$total = 0;
unless ($search) {
 my ($all_events) = $events_db->getRecords( {} );
 my ($all_sched) = $schedule_db->getRecords( {} );
 my (%sched_hash) = {};
 foreach $s (@$all_sched) { $sched_hash{ $s->{event_id} } = 1; }
 foreach $e (@$all_events) {
   $id = $e->{id};
   next if ( $sched_hash{$id} );
   $total++;
   $title = $e->{title};
%>
<TR>
 <TD ALIGN="center" VALIGN="middle">
   <INPUT CLASS="button" TYPE="button" VALUE="Delete" onClick="delete_event('<%=$id%>',0,0,0)">
   <INPUT CLASS="button" TYPE="button" VALUE="Edit" onClick="edit_event('<%=$id%>',0,0,0)">
   <INPUT CLASS="button" TYPE="button" VALUE="Schedule" onClick="reschedule_event('<%=$id%>',0,0,0)">
 </TD>
 <TD><FONT SIZE="-1">No Schedule Yet!</FONT></TD>
 <TD><FONT SIZE="-1"><%= $title %> </FONT></TD>
</TR>
<%
 }
}
foreach $e (sort { $a->{'schedule'}->{'start'} <=> $b->{'schedule'}->{'start'} } @$events) {


That little modification should show all the events that don't have a schedule at the top of the list with No Schedule Yet! for the date and time.  Notice that I included the two lines I showed you in step one to give you some context to where it goes, so don't copy the first and last line.

Now approving an unscheduled event is a two step process. You first go to the Edit/Delete event screen, and if there are any events that say "No Schedule Yet!" you can click edit to view the title and description, then click Save Changes with the "Modify event schedule now" box checked, and you can create the schedule for this event.  Finally, if it needs approving, you'll have to go approve it now from the approve events screen.

Hope that works for you.

------------------
David Whittaker
http://www.uabcm.com/
http://www.csworkbench.com/

Logged

DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #2 on: April 07, 2002, 06:08:00 PM »

Thanks Dave,

I'll check it out and report my findings.

Dan O.

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #3 on: April 07, 2002, 06:56:00 PM »

That worked perfect! Thanks Dave!!

Now for a bit of tweeking to make it a plugin.

Dan O.

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #4 on: April 07, 2002, 07:46:00 PM »

BTW, this mod is useful for finding stray events that were added but aborted before a date and time were entered.

I found one myself in my testing calendar.  

Dan O.


[This message has been edited by DanO (edited October 31, 2003).]

Logged
Alvy
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #5 on: October 09, 2003, 08:17:00 PM »

I found this thread searching for exactly this. But I could not find the Plug-in on the Mod/Plug-in page. Was it ever posted there as a Plug-in or Mod? Or would the code work just doing a modification of the edit_delete_events.html file, and not dealing with a Plug-in?
I am using Version 3.2 and I am just asking before I attempt it and possibly mess up my calendar.
As always... Thanks...

Alvy

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #6 on: October 09, 2003, 08:56:00 PM »

** Was it ever posted there as a Plug-in or Mod? **

No but you could make it into a plug-in if you want. I'm pretty sure TubaDave wouldn't mind.

Dan O.

------------------

Logged
Alvy
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #7 on: October 09, 2003, 09:46:00 PM »

Thanks for the vote of confidence... I am not so sure of my skills, but I will try.
And not to move from the topic, would I simply make a folder named something like NonScheduledEvents
Then make the appropriate readme.txt
Include the modified edit_delete_events.html file
Then put files in the NonScheduledEvents folder, and put that folder in the Plugin dir.
Activate.

It sounds too simple.

It was....

I tried it out.. and it works. I made the plugin and if you would like to try it, and you feel lucky....    http://www.theorangepeel.net/calendarscript_plugin/NonScheduledEvent.zip

Please give me some feed back on how it works for you....  as you can tell, I am a rookie.
------------------


[This message has been edited by Alvy (edited October 10, 2003).]

[This message has been edited by Alvy (edited October 10, 2003).]

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #8 on: May 24, 2007, 12:57:00 PM »

A link to the download is also found at the Unofficial CalendarScript - Mods and Plugins site at www.much2.com in the 'Plugins' section if the one listed above is no longer working.

JFYI

Dan O.

------------------

Logged
Pages: [1]   Go Up
Print
Jump to: