API Functions
Functions Specifications Function: GetJobInfo Description: A job ID from the PZ system is sent to the web service, and the web service sends a data set back with a set of information about the job from within the PZ database. Calling Parameters:
Returned Data:
Function: SearchJobs Description: A set of search parameters relating to fields in the PZ system is sent to the web service, and the web service sends an array data set back with a summary set of information about each job matching the search within the PZ database. Calling Parameters: There is one structure called ‘searchParams’ which includes at least the first 3 of the following list of tags (the actual search parameters like keyword, status etc are optional):
Returned Data:
The job structure: (all fields are lower case)
Function: CreateApplication Description: This call attempts to create a brand new application linking a candidate in the system, with a job. Each candidate can only apply for each job once. There are 2 options for uniquely identifying candidate in the database – candidate ID or email address. If candidate ID is not equal to -1, this ID is used as the candidate in the database. If it is -1, then the email address is searched for in the database, and the first matching candidate is used (even if they have been deleted or archived). Calling Parameters:
Skills structure:
Job Alerts structure:
Returned Data:
Function: UpdateApplication Description: This call is essentially the same as CreateApplication above, except it takes an application ID (which is returned by CreateApplication) and doesn’t take a candidate ID or a job ID – where these are needed it gets them from the already created application record. It updates the data in the application – all the same fields as in CreateApplication are available for updating. It is used for creating multi page applications (this is where the web site application process is broken into several web pages). Calling Parameters:
Returned Data:
Function: GetFieldList Description: Any web services that take field/subfield values operate on codes only, not on labels (the text that usually shows in Perform Zone) – since your field list is customizable in settings, it may be required that your web site regularly gets updates of your Perform Zone field list, to keep your website in sync with your Perform Zone. The GetFieldList service call gets an array of arrays of your current field/subfield list. Calling Parameters:
Returned Data:
Subfield array structure:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
How do I style the candidate page (cand.php)?
The candidate page allows candidates who have been registered with your site to login and change their details themselves – change contact information and update resumes for example.
It uses the template ‘cand.tpl’, so the default template for this gives examples showing how this page works.
How do I style the jobs list page(jobs.php)?
The jobs list page does a search of all your available jobs using search parameters sent via HTML variables, and gives the page a list of active jobs with basic details about those jobs. It uses the ‘jobs.tpl’ for its template.
Checkout the default ‘jobs.tpl’ for details on the variables available for the job information you can display.
Check the default page ‘jobsearch.tpl’ for details about sending the search variables. Below are how to setup the search variable select lists.
Searching on Country
To create a country selection list which allows the user to search on the country of a job, use the following Smarty template code.
<select class=”searchSelect” name=”searchcountry” id=”searchcountry” onchange=”getLocationList(‘searchlocation’, ‘searchcountry’)”>
{foreach key=key item=item from=$countryListVals}
{if $item == $jobSearchCountry}
<option label=”{$countryList[$key]}” value=”{$item}” selected>{$countryList[$key]}</option>
{else}
<option label=”{$countryList[$key]}” value=”{$item}”>{$countryList[$key]}</option>
{/if}
{/foreach}
</select>
Please Note:
The ‘onchange’ handler is optional – you must include the javascript file ‘js/comms.js’ in your page if you want to use it. It uses AJAX to fetch a list of states for the chosen country and sets this list in the select control named ‘searchlocation’ (which you must add in also).
The ‘name’ must be ‘searchcountry’ – this is what the code behind the page uses when it does its country search.
Searching on Active Country
There is a second country list that can be used to seed the country search – this is the ‘active’ country list. Only the countries that have currently active jobs with adverts assigned to them will be shown in this list.
To create a country selection list which allows the user to search on the country of a job, use the following Smarty template code.
<select class=”searchSelect” name=”searchcountry” id=”searchcountry” onchange=”getLocationList(‘searchlocation’, ‘searchcountry’)”>
{foreach key=key item=item from=$activeCountryListVals}
{if $item == $jobSearchCountry}
<option label=”{$activeCountryList[$key]}” value=”{$item}” selected>{$activeCountryList[$key]}</option>
{else}
<option label=”{$activeCountryList[$key]}” value=”{$item}”>{$activeCountryList[$key]}</option>
{/if}
{/foreach}
</select>
Please Note:
The ‘onchange’ handler is optional – you must include the javascript file ‘js/comms.js’ in your page if you want to use it. It uses AJAX to fetch a list of states for the chosen country and sets this list in the select control named ‘searchlocation’ (which you must add in also).
The ‘name’ must be ‘searchcountry’ – this is what the code behind the page uses when it does its country search.
Searching on State
To search on state, we should already have the country list. Perform Zone has a partial list of all states connected to their countries and can use AJAX to fetch them. Use the country search above with this code below to achieve a state search:
<select class=”searchSelect” name=”searchlocation” id=”searchlocation”>
{foreach key=key item=item from=$locationListVals}
{if $item == $jobSearchLocation}
<option label=”{$locationList[$key]}” value=”{$item}” selected>{$locationList[$key]}</option>
{else}
<option label=”{$locationList[$key]}” value=”{$item}”>{$locationList[$key]}</option>
{/if}
{/foreach}
</select>
Searching on Region
You can also search on the region in the world a job is in. Perform Zone has a list of regions and countries connected with those regions. It can use AJAX to fetch the countries associated with a region – to do this use the code below:
<select class=”searchSelect” name=”searchregion” id=”searchregion” onchange=”getCountryList(‘searchregion’, ‘searchcountry’, ‘searchstate’, ‘searchlocation’)”>
{foreach key=key item=item from=$regionListVals}
{if $item == $jobSearchRegion}
<option label=”{$regionList[$key]}” value=”{$item}” selected>{$regionList[$key]}</option>
{else}
<option label=”{$regionList[$key]}” value=”{$item}”>{$regionList[$key]}</option>
{/if}
{/foreach}
</select>
Please Note:
The ‘onchange’ handler is optional – it triggers an AJAX call which gets a list of all countries for the selected region. You must include ‘js/comms.js’ in your page for this to work.
Searching on Employer Industry
The search shows jobs based on industry of employer posting that job. Use the following code to do this:
<select class=”searchSelect” name=”clientindustries” id=”clientindustries” >
<option value=”” label=”Any”>Any</option>
{foreach key=key item=item from=$clientIndustryListVals}
{if strtolower($item) == strtolower($clientindustries)}
<option label=”{$clientIndustryList[$key]}” value=”{$item}” selected>{$clientIndustryList[$key]}</option>
{else}
<option label=”{$clientIndustryList[$key]}” value=”{$item}”>{$clientIndustryList[$key]}</option>
{/if}
{/foreach}
</select>
Search on Job Field
This search shows jobs based on what Field the Job is in.
Use the following code for this:
<select class=”searchSelect” name=”searchindustry” id=”searchindustry” onchange=”getJobTypeList(‘searchindustry’, ‘searchjobtype’)”>
{foreach key=key item=item from=$industryListVals}
{if strtolower($item) == strtolower($jobSearchIndustry)}
<option label=”{$industryList[$key]}” value=”{$item}” selected>{$industryList[$key]}</option>
{else}
<option label=”{$industryList[$key]}” value=”{$item}”>{$industryList[$key]}</option>
{/if}
{/foreach}
</select>
Search on Job Field & Job Field Specialisation
This search allows the jobseeker to drill down on Job Field Specialisation after selecting the Job Field.
Use the following code for this:
<select class=”searchSelect” name=”searchjobtype” id=”searchjobtype”>
{foreach key=key item=item from=$functionListVals}
{if strtolower($item) == strtolower($jobSearchJobType)}
<option label=”{$functionList[$key]}” value=”{$item}” selected>{$functionList[$key]}</option>
{else}
<option label=”{$functionList[$key]}” value=”{$item}”>{$functionList[$key]}</option>
{/if}
{/foreach}
</select>
new job type
<select class=”searchSelect” name=”searchjobtype” id=”searchjobtype”>
</select>
Search on Work Type
This search searches on the jobs work type – ‘full time’, ‘part time’ etc. Use the following code to do this search:
<select class=”searchSelect” name=”searchworktype” id=”searchworktype”>
{foreach key=key item=item from=$worktypeListVals}
{if $item == $jobSearchWorkType}
<option label=”{$worktypeList[$key]}” value=”{$item}” selected>{$worktypeList[$key]}</option>
{else}
<option label=”{$worktypeList[$key]}” value=”{$item}”>{$worktypeList[$key]}</option>
{/if}
{/foreach}
</select>
Adding a ‘Hot Jobs’ feature
Sometimes you will want to display on the top few jobs, maybe of a particular priority. You can create a special jobs list page using the ‘page’ parameter and reference it in an iframe. For example:
<iframe src=”jobs.php?page=hotjobs” />
Then in jobs.tpl you will use an ‘if’ statement to provide 2 alternative jobs list pages:
{if $page==”hotjobs”}
Contents to show for hot jobs list.
{else}
Normal jobs page contents
{/if}
You can put default search parameters in the iframe source parameters to define the jobs to be displayed:
<iframe src=”jobs.php?page=hotjobs&searchpriority=1&&searchoffset=0&searchlimit=2&jobsearch=1″ />
searchpriority means only show jobs with priority = 1 (this is set in the job details in Perform Zone).
searchoffset means start at the first job (job = 0) in the list of jobs that the search produces – ie; start with the most recently added job.
searchlimit says how many jobs to display in the search = 2 in this example meaning display top 2 jobs.
jobsearch = 1 tells the system to actually perform the search.