-
AuthorPosts
-
brentwilliams2 Friend
brentwilliams2
- Join date:
- January 2013
- Posts:
- 231
- Downloads:
- 0
- Uploads:
- 23
- Thanks:
- 4
- Thanked:
- 33 times in 1 posts
May 26, 2013 at 8:11 pm #187777Hi Hero,
The RSS list is showing an incorrect link format:http://www.mysite.com/index.php?option=com_jajobboard&view=jajobs&layout=jaview&cid[0]=118
Instead of the format provided from the main jobs list:
http://www.mysite.com/apartment-jobs/jaview/118-sales-associate
Can you help?
Thanks!
HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
May 27, 2013 at 10:23 am #494075Hi Brent,
Could you tell me how to get that link?
🙂brentwilliams2 Friendbrentwilliams2
- Join date:
- January 2013
- Posts:
- 231
- Downloads:
- 0
- Uploads:
- 23
- Thanks:
- 4
- Thanked:
- 33 times in 1 posts
May 28, 2013 at 2:17 am #494118Hi Hero,
If you go to the “Export Job Data” in the back end, I saw several XML feeds. I used the default RSS feed. I didn’t customize it besides changing the name of the feed – here is my RSS link: http://www.multifamilyinsiders.com/images/stories/jbuploads/6ApartmentJobsFeed.xmlHeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
May 28, 2013 at 7:59 am #494155I got it and i have added it to Jobboard project or future development. Thanks.
brentwilliams2 Friendbrentwilliams2
- Join date:
- January 2013
- Posts:
- 231
- Downloads:
- 0
- Uploads:
- 23
- Thanks:
- 4
- Thanked:
- 33 times in 1 posts
May 28, 2013 at 1:24 pm #494195Hi Hero,
Is there not a quick code fix? I use the RSS feed to distribute my jobs to Twitter and other places…HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
May 29, 2013 at 3:43 am #494243Hi Brent,
Please do as follows:
– Open file administratorcomponentscom_jajobboardasetXMLExportHelper.php and go to line 637
– Change the line code
[PHP]$link = JURI::root().’index.php?option=com_jajobboard&view=jajobs&layout=jaview&cid[0]=’.$data[‘jobid’];[/PHP]to
[PHP]$app = JApplication::getInstance(‘site’);
$router = $app->getRouter(‘site’);
$wrong_route = $router->build( ‘index.php?option=com_jajobboard&view=jajobs&layout=jaview&cid[0]=’.$data[‘jobid’] )->toString();
$correct_route = preg_replace(“|^” . JURI::base(true) . “|”, “”, $wrong_route);
$correct_route = str_replace(‘/index.php’, ‘index.php’, $correct_route);
$link = JURI::root(false) . $correct_route;[/PHP]
Hope this helps.Regards
brentwilliams2 Friendbrentwilliams2
- Join date:
- January 2013
- Posts:
- 231
- Downloads:
- 0
- Uploads:
- 23
- Thanks:
- 4
- Thanked:
- 33 times in 1 posts
May 29, 2013 at 6:29 pm #494332Hi Hero,
That got me closer, but here was the resulting link:http://www.mysite.com//component/jajobboard/jajobs/jaview/136
You can see there is an extra slash, and also it didn’t include the itemid, which meant no modules…
I have figured out how to get the proper link, although the code has several hard-coded elements, so it is not ideal:
$alias = JFilterOutput::stringURLSafe(trim($data['title']));
$app = JApplication::getInstance('site');
$router = $app->getRouter('site');
$wrong_route = $router->build( 'index.php?option=com_jajobboard&view=jajobs&layout=jaview&cid[0]='.$data['jobid'].'&Itemid=MENUID&alias='.$alias )->toString();
$correct_route = preg_replace("|^" . JURI::base(true) . "|", "", $wrong_route);
$correct_route = str_replace('/MENUALIAS', 'MENUALIAS', $correct_route);
$link = JURI::root(false) . $correct_route;In the example above, the user would need to replace the “MENUID” with the id of their main jobs menu. They would also need to change the two instances of “MENUALIAS” to the alias of their main job menu.
That technically works, but I have one follow-up question: Do those feeds automatically clear their cache after a certain period? They didn’t seem to for me…
HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
June 3, 2013 at 7:25 am #494528Hi,
Yes, you could add title / alias / category alias … as you wish because this function can run in Joomla backend, so we need small hack to render link as SEF in email content.
brentwilliams2 Friendbrentwilliams2
- Join date:
- January 2013
- Posts:
- 231
- Downloads:
- 0
- Uploads:
- 23
- Thanks:
- 4
- Thanked:
- 33 times in 1 posts
June 7, 2013 at 5:50 pm #495165For anyone who sees this, you might notice that the link for other RSS feeds are incorrect. For example, the link for the All Jobs posted over the last 7 days… This RSS feed uses different code, so to fix the link there, open up views/jafeeds/tmpl/rss.php
Find the following code:
$itemurl = JURI::root().JRoute::_('index.php?option=com_jajobboard&view=jajobs&layout=jaview&cid[]='.$row->id."&alias=".$item->title);
And change to:
$itemurl = strtolower(str_replace('%20','-',JURI::root().substr(JRoute::_('index.php?option=com_jajobboard&view=jajobs&layout=jaview&cid[]='.$row->id."&Itemid=79&alias=".$item->title),1)));
In the code above, you will see “Itemid=79”. Change the “79” to the menu ID for your main job menu item.
1 user says Thank You to brentwilliams2 for this useful post
-
AuthorPosts
This topic contains 9 replies, has 2 voices, and was last updated by brentwilliams2 11 years, 5 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum