Виджеты Сайта
Хотите, что бы на Вашем сайте отображались последние вакансии с job4web.net?
Есть два типа виджетов, которые Вы можете разместить на Вашем сайте:
- Работа из категории:Этот виджет используется для отображения вакансий из определенной категории. Вы также можете настроить количество отображаемых вакансий. Так Вы можете настроить отображение последних вакансий или отображение вакансий случайных образом.:
Пример кода:- Этот код отображает 5 последних вакансий, опубликованных последние 10 дней из категории "SEO оптимизаторы" с параметром "полный рабочий день", отсортерованны по датте публикации:
<script src="http://job4web.net/api/api.php?action=getJobs
&type=fulltime&category=seo_optimizators&count=5&random=0&days_behind=10&response=js"
type="text/javascript"></script>
<script type="text/javascript">showJobs('jobber-container', 'jobber-list');</script> - Следующий код выводит последние 5 вакансий из всех категорий, всех типов, опубликованных в последних 7 дней в случайном порядке:
<script src="http://job4web.net/api/api.php?action=getJobs
&type=0&category=0&count=5&random=1&days_behind=7&response=js" type="text/javascript"></script>
<script type="text/javascript">showJobs('jobber-container', 'jobber-list');</script>
- Этот код отображает 5 последних вакансий, опубликованных последние 10 дней из категории "SEO оптимизаторы" с параметром "полный рабочий день", отсортерованны по датте публикации:
- action: "getJobs" - all jobs
- type: "0" - all / "fulltime" / "parttime" / "freelance"
- category: "0" - all / "programmers" / "designers" / "administrators" / "managers" / "testers" / "editors"
- count: number of job ads to display
- random: "1" - display randomly / "0" - display ordered by publish date (newest on top)
- days_behind: get only jobs posted in the past X days (type "0" if you don't want to limit this)
- response: "js" - returns jobs as JavaScript code / "json" - returns only a JSON string / "xml" - returns an XML
- Работа по компаниям Виджет: Этот Виджет используется для отображения вакансий по работодателям.
List of parameters to be used in this implementation:- action: "getJobsByCompany" - a single company's jobs
- count: number of job ads to display
- response: "js" - returns jobs as JavaScript code / "json" - returns only a JSON string / "xml" - returns an XML
A code for this get latest 10 jobs published by Google:<script src="http://job4web.net/api/api.php?action=getJobsByCompany
&company=google&count=10&response=js" type="text/javascript"></script>
<script type="text/javascript">showJobs('jobber-container', 'jobber-list');</script>
CSS Styling
You can use some custom css to style the display the job list. Here is a sample code:ul.jobber-list {
list-style-type: none;
margin: 0;
padding: 0;
}
ul.jobber-list li {
margin-bottom: 5px;
}
Note:
- You can notice that there are two script codes for each implementation, the script which points to the api.php class can be included anywhere in your site but the second code should appear at the place where you want to display the jobs.
- There is a live demo script using the api code. Test it now. You can view its source in browser to check its implmentation. You can edit it live to test it before implementing the code live elsewhere.
