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


Login with username, password and session length

Search

 
Advanced search

8040 Posts in 1853 Topics- by 2099 Members - Latest Member: roi
Pages: [1]   Go Down
Print
Author Topic: Changeing Admin Calendar key  (Read 342 times)
0 Members and 1 Guest are viewing this topic.
k9barry
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: March 15, 2004, 03:35:00 PM »

I have changed the calendar keys to a 20 bit sequence similar to 324jf8w9045jfieu8rEf.  This changes the folder names in the calendar directory which is fine.

What I need to do is to change the permissions.html file in the /calendarscript/templates/admin/English directory so the calendar name is shown NOT THE KEY.

Looks like three areas need changed around

line 93
   <TD COLSPAN="4" ALIGN="center">Calendar: <%= $selected_calendar %>       User: <%= $selected_user %></TD>

line 123 & 124
   <TD ALIGN="center">Calendar: <%= $selected_calendar %><BR>User: <%= $selected_user %></TD>
   <TD ALIGN="center">All users for<BR>calendar: <%= $selected_calendar %></TD>


Any ideas on what I need to set the <%= $selected_calendar %> to so it shows the calendar name instead of the calendar key.

Thanks

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 227

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


WWW
« Reply #1 on: March 15, 2004, 07:17:00 PM »

** so the calendar name is shown NOT THE KEY. **

You can try adding this line somewhere after the $selected_calendar variable is defined:

$CalendarData = &getCalendarInfo($selected_calendar);

Then use the following variable where you need the calendar's name:

$CalendarData->{'name'}

 This is untested but I think should work.

Dan O.

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

Logged
k9barry
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: March 15, 2004, 09:41:00 PM »

No luck getting an error on line 9
1
2 &main::checkPermissions("","PERMISSIONS");
3 $screenTitle = "Modify Permissions";
4 $user = $main::User;
5 $user_db = new DBFile($main::users_db);
6 $users = $user_db->getRecords( {} );
7 $calendars = &main::GetAllCalendars();
8 $selected_calendar = $main::in {'selected_calendar'} | | $Session->{'calendar'};
9 $CalendarData = &getCalendarInfo($selected_calendar);
10 $selected_user = $main::in{'selected_user'};
11 $permissionslist = &main::getPermissionsList();
12 %>
13 <HTML>
14 <HEAD><TITLE>Calendar Administration : <%= $screenTitle %></TITLE>

Thanks for trying I'll look at it some more.

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

[This message has been edited by k9barry (edited March 16, 2004).]

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 227

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


WWW
« Reply #3 on: March 16, 2004, 12:12:00 AM »

** getting an error on line 9 **

Which is what line??

Dan O.

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

Logged
k9barry
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #4 on: March 16, 2004, 12:37:00 PM »

Looked into it some more and fount the $selected_calendar is set via the option list (lines 51-57 of the permissions.html file).

I need to set another varable Oh say $selected_calendar_name to the name of the calendar and then change the <%= $selected_calendar %> fields to <%= $selected_calendar_name %>

Tried to add the option you suggested:
-----------------
$CalendarData = &getCalendarInfo($selected_calendar);

Then use the following variable where you need the calendar's name:

$CalendarData->{'name'}
-----------------
immediately before the first <%= $selected_calendar %> field but that still did'nt work.

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


[This message has been edited by k9barry (edited March 16, 2004).]

[This message has been edited by k9barry (edited March 16, 2004).]

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 227

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


WWW
« Reply #5 on: March 16, 2004, 01:08:00 PM »

** fount the $selected_calendar is set via the option list (lines 51-57 of the permissions.html file). **

That value should be passed back to the calendar when the form is submitted and be available on the submitted page (the same one again).

** getting an error on line 9 **

** 9 $CalendarData = &getCalendarInfo($selected_calendar); **

Try:

$CalendarData = &main::getCalendarInfo($selected_calendar);

Dan O.


[This message has been edited by DanO (edited March 16, 2004).]

Logged
k9barry
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #6 on: March 18, 2004, 03:26:00 PM »

Dan thanks again for the help.  The last change worked great.  Sorry it took so long the server crashed on an unrelated problem. (two days)

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

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 227

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


WWW
« Reply #7 on: March 18, 2004, 06:35:00 PM »

** The last change worked great. **

Glad to hear it.

Dan O.

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

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