Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • brentwilliams2 Friend
    #187777

    Hi 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 Friend
    #494075

    Hi Brent,

    Could you tell me how to get that link?
    🙂

    brentwilliams2 Friend
    #494118

    Hi 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.xml

    HeR0 Friend
    #494155

    I got it and i have added it to Jobboard project or future development. Thanks.

    brentwilliams2 Friend
    #494195

    Hi Hero,
    Is there not a quick code fix? I use the RSS feed to distribute my jobs to Twitter and other places…

    HeR0 Friend
    #494243

    Hi 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 Friend
    #494332

    Hi 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 Friend
    #494528

    Hi,

    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 Friend
    #495165

    For 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.

Viewing 9 posts - 1 through 9 (of 9 total)

This topic contains 9 replies, has 2 voices, and was last updated by  brentwilliams2 11 years, 3 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum