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: Modify the Add Event Form  (Read 851 times)
0 Members and 1 Guest are viewing this topic.
Hildi
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: March 23, 2002, 09:27:00 AM »

I'd like to modify the Add Event Form, so that it isn't possible any more to specify a time! All events should be all day events! Is this possible???

Hildi

Logged
TubaDave
New Member
*

Karma: 0
Offline Offline

Posts: 0

Student


WWW
« Reply #1 on: March 24, 2002, 07:14:00 AM »

Sure it is!

Just go to the calendarscript/templates/admin/English directory and find the file add_edit_event.html .  Then go almost to the bottom until you see a long line of <input type="hidden"> tags.  Add one more that says:

<INPUT TYPE="hidden" NAME="SCHEDULE_all_day" VALUE="1">

The next thing below all those hidden input's is a <table> tag, followed by two short (5 and 3 lines) <tr> ... </tr> tags.  The next (long - I counted 31 lines) <tr> ... </tr> tag is the part you need to either delete or comment out with <!-- and -->.  Do that, and you should have a time-free scheduling page.

Enjoy!
David

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


Logged

Age
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: March 24, 2002, 07:26:00 AM »

Hi David,

I have 2 calendars: 1 for normal events and 1 for birthdays.
Is it possible to use your sollution for my birthday calendar and still use time fields in my regular calendar?

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

Perhaps something like: if calendar=default than regular, if calendar=birthday than your solution?

[This message has been edited by Age (edited March 24, 2002).]

Logged
TubaDave
New Member
*

Karma: 0
Offline Offline

Posts: 0

Student


WWW
« Reply #3 on: March 24, 2002, 04:10:00 PM »

Hey, you can do that, too.  Just wrap the new stuff up in if statements, so the hidden input would look like this:

<% if ($CALENDAR->{'key'} eq "birthday") { %>
   <INPUT TYPE="hidden" NAME="SCHEDULE_all_day" VALUE="1">
<% } %>

And instead of putting comments around the <TR> block just put the if statement before the block and the closing bracket after the block.  And that should get you working the way you want.

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


Logged

Age
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #4 on: September 11, 2003, 03:38:00 PM »

Has somebody perhaps been able to make a plugin to solve this? (I mean for the Birthday calendar)

I would like to give visitors the opportunity to add their name to a birthday calendar.
When they click Add they only have to enter their name en birthday (calendarscript should know it is a recurring event and should ignore the yearnumber).

Regards,
Age

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

Logged
Pablo
Guest
« Reply #5 on: September 17, 2003, 03:05:00 PM »

I tried to follow these instructions but could not find the lines referenced in the add_edit_event file. I found something similar in the schedule non recurring event file and commented out the <TR>...</TR>, as well as added the hidden value, but the browser indicates there is an error when I click on Save.
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: September 17, 2003, 04:47:00 PM »

** but the browser indicates there is an error when I click on Save. **

What was the exact error message?

Dan O.

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

Logged
pablo
Guest
« Reply #7 on: September 18, 2003, 12:35:00 PM »

The message is "error on page." on the bottom left corner of the browser (not a message window), accompanied by the '!' icon.


You can find a copy of the code at:
http://www.hgcweb.com/calendar/schedule_event_non_recur.txt

There are comments detailing the two changes on the file.

The calendar itself is at:
http://www.hgcweb.com/cgi-bin/calendar.pl?calendar=anthony

you can log in as "student", pass: "student" and make changes. It's just for testing.

Thanks

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