-
AuthorPosts
-
mpolakovic Friend
mpolakovic
- Join date:
- December 2013
- Posts:
- 12
- Downloads:
- 0
- Uploads:
- 1
- Thanked:
- 1 times in 1 posts
February 17, 2014 at 1:41 am #194855I am trying to set up an xml job feed through the “export job data” menu. I have all the data elements working fine except for “company”. Is there some trick to getting the company name to display in the feed? I tried selecting “Company name” as the source for this field, but it always returns blank.
Thanks!
mpolakovic Friendmpolakovic
- Join date:
- December 2013
- Posts:
- 12
- Downloads:
- 0
- Uploads:
- 1
- Thanked:
- 1 times in 1 posts
February 17, 2014 at 2:58 am #522923Sorry, didn’t mean to post this in the “solved” section. Can someone move it out please?
Thanks!HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
February 18, 2014 at 3:20 am #523093It returns blank as that field is not in the Job Table. It is a field in the Employer Table. Actually, it requires PHP knowledge to get this done as you need to customise export function (eg. binding the database, setting up the xml template, mapping the company field with xml…). I am afraid I could not provide detailed guide on this.
brentwilliams2 Friendbrentwilliams2
- Join date:
- January 2013
- Posts:
- 231
- Downloads:
- 0
- Uploads:
- 23
- Thanks:
- 4
- Thanked:
- 33 times in 1 posts
March 26, 2014 at 3:34 pm #528264Hi mpolakovic,
Here is what you need to do:Open up administrator/…/com_jajobboard/asset/XMLExportHelper.php
Search for:
$sql = "SELECT a.*, b.*, a.id as jobid from #__ja_jobs a LEFT JOIN #__users b ON a.user_id = b.id WHERE 1=1 $strCategory $strDes $strLocation $strTitle $strType
Replace with this:
$sql = "SELECT a.*, b.*, c.user_id_value, a.id as jobid from #__ja_jobs a
LEFT JOIN #__users b ON a.user_id = b.id
INNER JOIN #__ja_jobs_value c ON a.id = c.id
WHERE 1=1 $strCategory $strDes $strLocation $strTitle $strType
ORDER BY a.id DESC $limit ";That will pull the company name associated with the job post. Next, search for:
$value = str_replace('%EXPIRE_DATE%', date('Y-m-d'), $value);
Below that line, you can add your own custom variables. So for company name, add this:
$value = str_replace('%JOB_COMPANY%', $data['user_id_value'], $value);
Here are some more variables that might help:
$value = str_replace('%JOB_ID%', $data['jobid'], $value);
$value = str_replace('%JOB_TITLE%', $data['title'], $value);
$value = str_replace('%JOB_CITY%', $data['city'], $value);$jobdetail = $data['job_detail'];
$jobdetail = str_replace("Â","",$jobdetail);
$jobdetail = strip_tags($jobdetail, '<p><li><ul><div>');
$jobdetail = preg_replace("/<(*)[^>]*?(/?)>/i",'<$1$2>', $jobdetail);$value = str_replace('%JOB_DESC%', $jobdetail, $value);
$location_id_alias = getLocation($data['location_id']);
$value = str_replace('%JOB_STATE%', trim($location_id_alias), $value);
$category_alias = getCategories($data['cat_id']);
$value = str_replace('%JOB_CAT%', $category_alias, $value);All of these can be used when you click XML Schemes > Configure XML Structure. Please note that the new options will not show up in the drop down menu – you have to manually type them in.
-
AuthorPosts
This topic contains 4 replies, has 3 voices, and was last updated by brentwilliams2 10 years, 8 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum