Add Entry Menu Bad message when not logged in

  • skyekr
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 10 months ago #17088 by skyekr
I have created a menu item to add an event. If the user is not logged in, however they get this message:

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

In Internet Explorer the message is: Internet Explorer cannot display the webpage

How can I make it so they get a message that they must be a registered user of the site?

Thanks!

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #17157 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Add Entry Menu Bad message when not logged in
Hi

I think you should set access permission of the menu item to Registered so that only registered users can see it. If you want to display the message as explained, you can modify the code alitle :

1. Open the file components/com_eventbooking/views/event/view.html.php

2. Find the code below :
Code:
if (!$ret) { $app = & JFactory::getApplication('site'); $url = JRoute::_('index.php?option=com_eventbooking'); $app->redirect($url, JText::_('EB_NO_ADDING_EVENT_PERMISSION')); }

3. Change it to :
Code:
if (!$ret) { $app = & JFactory::getApplication('site'); $url = JRoute::_('index.php'); $app->redirect($url, JText::_('EB_NO_ADDING_EVENT_PERMISSION')); }

After that, it will work as expected .

Regards,

Tuan
The following user(s) said Thank You: skyekr

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc