Viewing 1 post (of 1 total)
  • Author
    Posts
  • brentwilliams2 Friend
    #187770

    I believe that job alerts are the most powerful part of any job board, as it means immediate response for any new job for those parameters. So I’m trying to drive job alerts as much as possible. If someone does a search, we know they are interested in that particular category, location, etc. So if possible, we want them to create an alert so they won’t simply disappear after their initial search, but they will come back later on. This modification creates a notice to your user at the top of the page to create an alert based upon the search they just made. For example:

    <blockquote>Your Search Return 0 job(s) for training director
    Get updated on any new Training Director jobs posted: Create Training Director Job Alert</blockquote>

    To make these updates for location and category, find the following code in views/jajobs/tmpl/jalist_search_result_msg.php:

    if (isset($jobsearch_cat)&&$jobsearch_cat!='') {
    $text .= " ".JText::_("FOR")." <strong class='highlight'>".$jobsearch_cat."</strong>";
    $is_filter = true;
    }

    if (isset($jobsearch_location)&&$jobsearch_location!='') {
    $text .= " ".JText::_("IN")." <strong class='highlight'>".$jobsearch_location."</strong>";
    $is_filter = true;
    }

    And change it to: (IMPORTANT: Change “yoursite.com” to your URL. I don’t know the proper way to dynamically create that link properly.)

    if (isset($jobsearch_cat)&&$jobsearch_cat!='') {
    $text .= " ".JText::_("FOR")." <strong class='highlight'>".$jobsearch_cat."</strong>";
    $text .= "<div style='margin-bottom: 20px; margin-top:10px; background-color: #f4f8b2 padding: 5px; border: 1px solid; border-radius: 5px; -moz-border-radius: 5px;'>Get updated on any new ".$jobsearch_cat." jobs posted: <a href='http://www.yoursite.com/job-alert/form' rel='nofollow'>Create ".$jobsearch_cat." Job Alert</a></div>";
    $is_filter = true;
    }

    if (isset($jobsearch_location)&&$jobsearch_location!='') {
    $text .= " ".JText::_("IN")." <strong class='highlight'>".$jobsearch_location."</strong>";
    $text .= "<div style='margin-bottom: 20px; margin-top:10px; background-color: #f4f8b2 padding: 5px; border: 1px solid; border-radius: 5px; -moz-border-radius: 5px;'>Get updated on any new jobs that are posted in ".$jobsearch_location.": <a href='http://www.yoursite.com/job-alert/form' rel='nofollow'>Create ".$jobsearch_location." Job Alert</a></div>";
    $is_filter = true;
    }

    Next, find the following code:

    $text .= " ". JText::sprintf('SEARCH_RESULT_MSG', $this->total_items);

    And move your updated code directly below this line.

    Problems with this strategy:
    This is not a perfect strategy. This code shows up for everyone, even guests, and if the guest clicks on the link, they get redirected to log in or create a Joomla account. Ideally, it would redirect them to create an account through JA Jobboard, but I don’t know how to do that. Next, if the user is logged in but doesn’t have an account in JA Jobboard, then he/she can still create an alert. I don’t know if those types of alerts work, because they are not tied to a JA Jobboard user.

    Strategy with a custom text field:
    For those of you who have seen my other tips, I use a city text field, and this actually works really well with this strategy. You still have the problems listed above, but now you can have the alert form pre-filled!

    Step One:
    Still in views/jajobs/tmpl/jalist_search_result_msg.php, find the following code:

    $text = JText::sprintf("YOUR_FILTER_RETURN_JOB", $this->total_items);;
    echo "<span>".$text."</span>";

    Below it, add the following: (IMPORTANT: Change “yoursite.com” to your URL. I don’t know the proper way to dynamically create that link properly.)

    echo "<div style='margin-bottom: 20px; margin-top:10px; background-color: #f4f8b2 padding: 5px; border: 1px solid; border-radius: 5px; -moz-border-radius: 5px;'>Get updated on any new jobs that are posted in ".$jobsearch_city.": <a href='http://www.yoursite.com/job-alert/form?city=".$jobsearch_city."' rel='nofollow'>Create ".$jobsearch_city." Job Alert</a></div>";

    Step Two:

    The part to auto-fill the form is a bit tedious, so let me summarize and hopefully you can fill out yourself. Open up views/jajobalerts/tmpl/form.php and add the following code right before the keyword form field.

    <?php $citydefault = $_GET['city']; ?>

    Then, find this code:

    <?php echo $this->item->keyword; ?>

    And change to:

    <?php echo $citydefault . $this->item->keyword; ?>

    (This last part may provide unanticipated results, but it’s worked for me so far.)

    Maybe someone else will come through and clean this up a bit, but at least it is a start!

Viewing 1 post (of 1 total)

This topic contains 1 reply, has 1 voice, and was last updated by  brentwilliams2 11 years, 2 months ago.

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