Plans - Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist     RegisterRegister  ProfileProfile   Log inLog in
Edit this event

 
Post new topic   Reply to topic    Plans - Forum Forum Index » Questions
View previous topic :: View next topic  
Author Message
syb



Joined: 06 May 2006
Posts: 12

PostPosted: Mon May 08, 2006    Post subject: Edit this event Reply with quote

Can the option to "edit this event" be eliminated so users won't have this option to distract them?
Back to top
View user's profile Send private message
gengwall



Joined: 20 Apr 2006
Posts: 23
Location: Minnesota

PostPosted: Mon May 08, 2006    Post subject: Reply with quote

I presume you mean the option when someone right-clicks on an event. You can turn off context menus (the right click menus) by changing the following parameter in plans_config.pl to 0:

$options{right_click_menus_enabled} = 0;
Back to top
View user's profile Send private message Visit poster's website
syb



Joined: 06 May 2006
Posts: 12

PostPosted: Mon May 08, 2006    Post subject: Reply with quote

gengwall wrote:
I presume you mean the option when someone right-clicks on an event. You can turn off context menus (the right click menus) by changing the following parameter in plans_config.pl to 0:

$options{right_click_menus_enabled} = 0;


That takes care of one of the locations for "Edit this event." What about in the event window itself where the user sees this option at the bottom of the window?
Thanks!
Sy
Back to top
View user's profile Send private message
gengwall



Joined: 20 Apr 2006
Posts: 23
Location: Minnesota

PostPosted: Mon May 08, 2006    Post subject: Reply with quote

There are several places you could eliminate this. But I am not sure how you are going to ever get in to edit an event if you remove all incidents of "edit this event" from the interface. Do you want a different look for adminstrators vs. visitors? If so, how are you implementing that globally? That will impact how you go about eliminating this functionality from public view.
Back to top
View user's profile Send private message Visit poster's website
syb



Joined: 06 May 2006
Posts: 12

PostPosted: Tue May 09, 2006    Post subject: Reply with quote

gengwall wrote:
There are several places you could eliminate this. But I am not sure how you are going to ever get in to edit an event if you remove all incidents of "edit this event" from the interface. Do you want a different look for adminstrators vs. visitors? If so, how are you implementing that globally? That will impact how you go about eliminating this functionality from public view.


Yes, I guess what I want to do is have a visitors and an adminstrators interface. Is there an easy way to accomplish this?
Thanks!
Sy
Back to top
View user's profile Send private message
gengwall



Joined: 20 Apr 2006
Posts: 23
Location: Minnesota

PostPosted: Tue May 09, 2006    Post subject: Reply with quote

There is a fairly easy way on unix systems and it is outlined in the documentation. Look for the section titled:

Creating Separate Public and Admin Sites

I also have posted a hack to accomplish admin vs. public sites programatically. See this post: Admin vs. Public View Hack. There are many other posts in the forums dealing with this subject. You should consult them as well.

The key to the whole thing is in plans.template. If you follow the documentation so that you have a seperate copy of plans.template for admin and public, then take out the following line from the event details template in the public version of the file:

<li>###edit event link###</li>

That way, the link will never be placed in the event details pop-up for public viewers but will still be there for admins.

If you take a programatic approach, then you need to halt the link from being built at all. That happens in plans_lib.pl Do a search for "###edit event link###". You should find it in the generate_event_details subroutine. The full code you are looking for is:

my $edit_event_link = "<a target = \"cal_mainwindow\" href=\"$script_url/$name?active_tab=1&add_edit_event=edit&amp;&evt_id=$event{id}$consistent_parameter_string\">$lang{context_menu_edit_event}</a>";
$edit_event_link = $lang{event_details_edit_disable} unless $writable{events_file};
$return_text =~ s/###edit event link###/$edit_event_link/g;

Basically, you only want to build the link if this is the admin view. So, you need an "if" clause which only populates $edit_event_link in that case. If you are implementing my hack for admin vs public view, you would change the above to look something like this:

if ($admin_view==1) {
$edit_event_link = "<a target = \"cal_mainwindow\" href=\"$script_url/$name?active_tab=1&add_edit_event=edit&amp;&evt_id=$event{id}$consistent_parameter_string\">$lang{context_menu_edit_event}</a>";
$edit_event_link = $lang{event_details_edit_disable} unless $writable{events_file};
$return_text =~ s/###edit event link###/$edit_event_link/g;
}
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Plans - Forum Forum Index -> Questions All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group / Oranja by Lessthaneric.net