Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • environc Friend
    #183716

    Hi,

    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 Friend
    #478704

    Hi 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 Friend
    #478721

    Hi 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


    1. Untitled1
    HeR0 Friend
    #478841

    Hi 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 Friend
    #482093

    Hi 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 Friend
    #482119

    Hi Environc,

    I changed the homepage menu to assign JA Job Board blank page .

    Hope you like it 🙂

    Regards

    environc Friend
    #482157

    Hi Hero,

    That looks great now. Thanks a lot. 🙂

Viewing 7 posts - 1 through 7 (of 7 total)

This topic contains 7 replies, has 2 voices, and was last updated by  environc 11 years, 7 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum