Love The Up-Date Hate The URL'S

Discussion in 'Article Script / Article Directory Script' started by wealthyaffiliate, Dec 28, 2010.

  1. wealthyaffiliate

    wealthyaffiliate New Member

    Ok development team, you seriously need to come up with a better way of deploying the article url's...

    www.sitedomain/articles/category/sub-category/id-article-title.html

    I know I can use www.sitedomain/article/id-article-title.html
    Even this shortened version is still not a fantastic solution, how do my member base get to know about this shortened url? It needs to be seen when they submit their articles, they have no idea what their article id is.

    You need to get this sorted asp.
    www.sitedomain.com/article-title-id id if we must have it.
    Code a url shortening script integrated.

    Steve,
  2. media

    media New Member

    Than was my original discussion with them...

    Because of the Subrion main script and packages (article, auto and so on) they are adding that extra sub directory like /article/ and so on...

    When I first got the script there was a /blog/ subdirectory and every single article you add, the article was taking that /blog/ supdir in the URL they get rid of that but still extra /article/ subdir is showing up...

    They have to have a system that clears all the URL confusion on the URL path...

    Best way is

    domain/cat-name/8-article-name.html

    eliminate /article/ sub dir
  3. Vasily_B.

    Vasily_B. Project Manager

    Greetings,

    Thanks for your ideas. There are a lot of different points of view for this. Some customers offer one way, others offer different, etc. Everybody has its own way thinking it's the best :) Anyway, right now it seems we found the most appropriate url style for the articles (IMHO). Here is how they look like in our latest version:

    domain.com/article/cat/subcat/id-article-title-alias.html

    There is no way to get rid of /article/ as it stands for the identifier for the view article page. The cms controller should know what page that is and process php code for it. Anyway, you can easily throw subcategories from you path, no problem. If you need that I can explain in details how not to display subcategories in your article URL
  4. wealthyaffiliate

    wealthyaffiliate New Member

    Please Explain how this can be done code side..

    Thanks
    Steve.
  5. Vasily_B.

    Vasily_B. Project Manager

    Hi Steve,

    Here is the solution. Open packages/publishing/includes/classes/ia.front.article.php and find the following code:
    PHP:

    $url = /*$this->iaCore->gPackages['publishing']['url']*/ IA_URL . 'article/' . $item['category_alias'] . $item['id'].'-'.$item['title_alias'].'.html';
     
    change it to the following:
    PHP:

    $path = substr($item['category_alias'], 0, strpos($item['category_alias'], '/') + 1);
    $url = /*$this->iaCore->gPackages['publishing']['url']*/ IA_URL . 'article/' . $path . $item['id'].'-'.$item['title_alias'].'.html';
     
    That should make urls without subcategories :)
  6. wealthyaffiliate

    wealthyaffiliate New Member

    Thanks again..
    Steve,
  7. Vasily_B.

    Vasily_B. Project Manager

    I'm glad to advise :) Did you try it? I checked this on my local version an it worked fine
  8. wealthyaffiliate

    wealthyaffiliate New Member

    Yes this is working for me...
    Thanks again.
    Steve,
  9. Vasily_B.

    Vasily_B. Project Manager

    I'm glad to advise :)
  10. zeroplanet

    zeroplanet New Member

    Hello Vasily_B I triend this method on subrion with pressmag template, but the ia.front.article.php it doesn't appears nowhere, what else do you recomend?

Share This Page