-
AuthorPosts
-
environc Friend
environc
- Join date:
- December 2012
- Posts:
- 173
- Downloads:
- 0
- Uploads:
- 33
- Thanks:
- 30
- Thanked:
- 2 times in 1 posts
January 7, 2013 at 5:46 am #183716Hi,
On my site non-logged in users (guests) are prompted to create job alerts without being requested email address etc. After entering job details, a success message is displayed. But how can guest be notified of job alerts without email etc?
Where do I set it so that only registered members can create a job alert?
Thanks
HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
January 7, 2013 at 10:42 am #478704Hi Environc,
Please open file components/com_jajobboard/views/jobalerts/view.html.php and go to line function edit($postback=false) , change header of this function as below :
$mainframe = JFactory::getApplication();
$user = JFactory::getUser();
if(!$user->id) {
return $mainframe->redirect(JRoute::_("index.php?option=com_jajobboard&view=jaerrors&Itemid=1000", false));
}
$item = $this->get('Item');if (!$item->id) {
$item->posted_date = date("Y-m-d");
} else {
if($item->user_id != $user->id) {
return $mainframe->redirect(JRoute::_("index.php?option=com_jajobboard&view=jaerrors&errors=".JText::_("ACCESS_DENIED_YOU_DONT_HAVE_PERMISSION"), false));
}
}
Hope this helps.Regards
environc Friendenvironc
- Join date:
- December 2012
- Posts:
- 173
- Downloads:
- 0
- Uploads:
- 33
- Thanks:
- 30
- Thanked:
- 2 times in 1 posts
January 7, 2013 at 11:58 am #478721Hi Hero,
Thanks again. I got to the file you mentioned above but I’m not sure where exactly to paste the code in the file (please check attachment). Do you mean replace everything inside
function edit($postback=false)
{}
with the code you provided?
Regards
HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
January 8, 2013 at 2:26 am #478841Hi Environc,
Try change as below:
[PHP]function edit($postback=false)
{
$mainframe = JFactory::getApplication();
$user = JFactory::getUser();
if(!$user->id) {
return $mainframe->redirect(JRoute::_(“index.php?option=com_jajobboard&view=jaerrors&Itemid=1000”, false));
}
$item = $this->get(‘Item’);if (!$item->id) {
$item->posted_date = date(“Y-m-d”);
} else {
if($item->user_id != $user->id) {
return $mainframe->redirect(JRoute::_(“index.php?option=com_jajobboard&view=jaerrors&errors=”.JText::_(“ACCESS_DENIED_YOU_DONT_HAVE_PERMISSION”), false));
}
}// Make sure you are logged in and have the necessary access rights
if ($postback) {
$post = JRequest::get(‘request’, JREQUEST_ALLOWHTML);
$item->bind($post);
}[/PHP]
Hope this helps.Regards
environc Friendenvironc
- Join date:
- December 2012
- Posts:
- 173
- Downloads:
- 0
- Uploads:
- 33
- Thanks:
- 30
- Thanked:
- 2 times in 1 posts
February 1, 2013 at 11:42 pm #482093Hi Hero,
The message “You have not yet saved any search” still shows there after these changes. The other thing that also appears there is the Jobseekers saved searches when he’s logged in. I thought that the jobseekers saved searches would appear on a page with jobseeker menu. I think these two thing might be related.
Regards
HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
environc Friendenvironc
- Join date:
- December 2012
- Posts:
- 173
- Downloads:
- 0
- Uploads:
- 33
- Thanks:
- 30
- Thanked:
- 2 times in 1 posts
February 2, 2013 at 1:28 pm #482157Hi Hero,
That looks great now. Thanks a lot. 🙂
AuthorPostsViewing 7 posts - 1 through 7 (of 7 total)This topic contains 7 replies, has 2 voices, and was last updated by environc 11 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Guest allowed to create job alert
Viewing 7 posts - 1 through 7 (of 7 total)