- Title: Member
- Status: Offline
- Registered: 2009-03-01
- Posts: 358
Topic: Replace job-category-name with Job Category Name in rss feed title
In _includes class.Feed.php
find:
Code:
global $db;
if ($category != 'all')
{
$sql = 'SELECT id
FROM '.DB_PREFIX.'categories
WHERE var_name = "' . $category . '"';
$result = $db->query($sql);
$row = $result->fetch_assoc();
$this->mCategoryId = $row['id'];
$this->mCategoryVarName = $category;
return 1;
}
replace with:
Code:
global $db;
if ($category != 'all')
{
$sql = 'SELECT id, name
FROM '.DB_PREFIX.'categories
WHERE var_name = "' . $category . '"';
$result = $db->query($sql);
$row = $result->fetch_assoc();
$this->mCategoryId = $row['id'];
$this->mCategoryVarName = $category;
$this->mCategoryName = $row['name'];
return 1;
}
Below in the same file find:
Code:
$properties['description'] = 'Latest jobs for ' . ucwords($this->mCategoryVarName);
replace with:
Code:
$properties['description'] = 'Latest jobs for ' . ucwords($this->mCategoryName);
Works on version 1.8, if using previous versions just leave out the: '.DB_PREFIX.'
Last edited by hobo (2009-10-19 20:33:45)
- Title: Senior Contributor
- Status: Offline
- From: Delhi, India
- Registered: 2009-03-14
- Posts: 230
Re: Replace job-category-name with Job Category Name in rss feed title
Moreover, the category name is being displayed in the feed title. What are you trying to achieve here with this code?
- Title: Member
- Status: Offline
- Registered: 2009-03-01
- Posts: 358
Re: Replace job-category-name with Job Category Name in rss feed title
I got the title in my feed to display here:
http://freejoblistings.ca/transportatio
-in-canada
The "Latest jobs for Inventory Specialist" used to be "Latest jobs for inventory-specialist-job-listings-in-canada".
I am not using 1.8 but I checked out the download to see if it was missing.
Compare with rss category title in demo: http://www.jobberbase.com/demo/rss/finanse-i-bankowosc/
Last edited by hobo (2009-10-20 19:37:47)
- Title: Member
- Status: Offline
- Registered: 2009-03-01
- Posts: 358
Re: Replace job-category-name with Job Category Name in rss feed title
To clarify, when I said "title" I was actually referring to the feed description tag: <description>the change affects this line in feed</description>
- Title: Senior Contributor
- Status: Offline
- From: Delhi, India
- Registered: 2009-03-14
- Posts: 230
Re: Replace job-category-name with Job Category Name in rss feed title
OK...got your point. Sorry for misunderstanding and overlooking too much. This will be fixed in v1.9.
- Title: Senior Contributor
- Status: Offline
- From: Delhi, India
- Registered: 2009-03-14
- Posts: 230
Re: Replace job-category-name with Job Category Name in rss feed title
BTW in your code, this line can be done away with:
Code:
$this->mCategoryVarName = $category;
And instead of this line:
Code:
var $mCategoryVarName = false;
it should be
Code:
var $mCategoryName = false;
Posts [ 6 ]
Guest posting is disabled. You must login or register to post a reply.