Active
Project:
Event Views
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Feb 2009 at 11:57 UTC
Updated:
4 Feb 2009 at 11:57 UTC
Like the Drupal Forum have the "Post new forum topic" link, it is good to have a "Post new Event" to the summary view.
For that purpose I just added this code to the event.module in the "function event_page" at line 301 :
global $user;
then @ line 360 :
$output .= '<ul>';
if ($user->uid) {
$output .= '<li>'. l(t('Post new Event.'), "node/add/event") .'</li>';
} else {
$output .= '<li>'. t('<a href="@login">Login</a> to post a new Event.', array('@login' => url('user/login', drupal_get_destination()))) .'</li>';
}
$output .= '</ul>';
It works well and ask to login in case user is anonymous just like the forum does ;)
Regards,
Michele