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: List of available calendars  (Read 307 times)
0 Members and 1 Guest are viewing this topic.
Sarah
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« on: March 28, 2003, 10:08:00 AM »

I would like to make some calendars on our list be seen only by specific users.  I know that when the permissions are set you can make it available to only certain people but I would like it to show up in the list to only certain people.  Is there a plugin for this or does anyone know an easy way to accomplish it?
Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

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


WWW
« Reply #1 on: March 28, 2003, 12:55:00 PM »

** I would like to make some calendars on our list be seen only by specific users... does anyone know an easy way to accomplish it? **

Only give those certain persons permissions to view the calendar. That's the easiest may I know of.

Dan O.

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

Logged
Keith G
Guest
« Reply #2 on: March 28, 2003, 01:23:00 PM »

Maybe this is what you are looking for. With help from Dan O
and others on this forum this piece of code will diplay a drop down list of calendars and the user will only see the calendars they have permission to view in the list. If they don't have permission, it won't show up on the list. Anyway, here is the code. Add it to the default.html file for the template you are using.
      Keith


<!-- ADDED for link to each calendar -->
                      <% $cal_db = new DBFile($main::calendars_db); %>
                      <% $calendars = $cal_db->getRecords( {} ); %>
                      <form method="POST" style="font-family: Arial; font-size: 10pt" name="calendar_change">
                      <SELECT NAME="cal_select" size="1" onChange="window.open(this.options[this.selectedIndex].value
,'_top')">
                      <option selected>Choose a Calendar</option>
                      <% foreach $cal (sort {$a->{name} cmp $b->{name}} @$calendars)
                                      {
                       next unless ($User->hasPermission($cal->{'key'},"VIEW"));

                                      %>
                   <option value="<%= $CGI_URL %>?calendar=<%= $cal->{key} %>"><%= $cal->{name} %></option>

                                      <% } %>


  Add whatever html code above the box you need to describe it's contents.

Logged
Keith G
Guest
« Reply #3 on: March 28, 2003, 01:26:00 PM »

One other thing I ran into - depending on the template you are using, Dayspan, default, OldStyle, etc ... the letter u in user may either have to be capitalized or lower case. Search the file for "user" and see what that particular template is using.
    Keith
Logged
Pages: [1]   Go Up
Print
Jump to: