Results 1 to 3 of 3

Article Manager v1.0

This is a discussion on Article Manager v1.0 within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; This will keep "articles" in breadcrumb and add the topic names afterwards, instead of replacing the "articles" root with the ...

      
  1. #1
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,500
    Rep Power
    567


    Post Article Manager v1.0

    This will keep "articles" in breadcrumb and add the topic names afterwards, instead of replacing the "articles" root with the topic name and preventing the user from returning to articles once in the topics.

    new format:
    catalog >> articles>> topic name
    old format:
    catalog >> topic name

    in applications_top.php
    FIND:
    // add topic names or the author name to the breadcrumb trail
    if (isset($tPath_array)) {
    for ($i=0, $n=sizeof($tPath_array); $i 0) {
    $topics = tep_db_fetch_array($topics_query);
    $breadcrumb->add($topics['topics_name'], tep_href_link(FILENAME_ARTICLES, 'tPath=' . implode('_', array_slice($tPath_array, 0, ($i+1)))));
    } else {
    break;
    }
    }
    } elseif (isset($HTTP_GET_VARS['authors_id'])) {
    $authors_query = tep_db_query("select authors_name from " . TABLE_AUTHORS . " where authors_id = '" . (int)$HTTP_GET_VARS['authors_id'] . "'");
    if (tep_db_num_rows($authors_query)) {
    $authors = tep_db_fetch_array($authors_query);
    $breadcrumb->add(NAVBAR_TITLE_DEFAULT, tep_href_link(FILENAME_ARTICLES));
    }
    }

    REPLACE WITH:
    // add topic names or the author name to the breadcrumb trail
    if (isset($tPath_array)) {
    for ($i=0, $n=sizeof($tPath_array); $i 0) {
    $topics = tep_db_fetch_array($topics_query);
    $breadcrumb->add(NAVBAR_TITLE_DEFAULT, tep_href_link(FILENAME_ARTICLES));
    $breadcrumb->add($topics['topics_name'], tep_href_link(FILENAME_ARTICLES, 'tPath=' . implode('_', array_slice($tPath_array, 0, ($i+1)))));
    } else {
    break;
    }
    }
    } elseif (isset($HTTP_GET_VARS['authors_id'])) {
    $authors_query = tep_db_query("select authors_name from " . TABLE_AUTHORS . " where authors_id = '" . (int)$HTTP_GET_VARS['authors_id'] . "'");
    if (tep_db_num_rows($authors_query)) {
    $authors = tep_db_fetch_array($authors_query);
    $breadcrumb->add('Articles by ' . $authors['authors_name'], tep_href_link(FILENAME_ARTICLES, 'authors_id=' . $HTTP_GET_VARS['authors_id']));
    $breadcrumb->add(NAVBAR_TITLE_DEFAULT, tep_href_link(FILENAME_ARTICLES));
    }
    }

    just this file is included not a full package

    More...
    Michael Sasek
    osCMax Developer


    osCmax installation service - Have our professionals install osCmax on your server - same day service!
    osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0

    Stay Up To Date with everything osCMax:
    Free osCMax Newsletters - Security notices, New Releases, osCMax News
    osCMax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  2. #2
    Active Member MindTwist's Avatar
    Join Date
    Jun 2007
    Location
    Barcelona, Spain
    Posts
    408
    Rep Power
    7


    Default Re: Article Manager v1.0

    Michael,
    Quick question in case you can help, I implemented this fix and it does what it says.
    But when I look at an article, I get:

    Top - Catalog - Articles - Topic - Article Title - Articles

    So I get an unneedeed Articles there at the end (which links back to the same place the first articles). Would you know how to fix that...?

  3. #3
    Active Member MindTwist's Avatar
    Join Date
    Jun 2007
    Location
    Barcelona, Spain
    Posts
    408
    Rep Power
    7


    Default Re: Article Manager v1.0

    LOL, nevermind... I think this post came from some kind of automated script that posts new contributions on oscommerce on this forums?

Similar Threads

  1. Article Manager v1.0
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 08-08-2007, 05:26 AM
  2. Article Manager v1.0
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 06-20-2007, 01:22 PM
  3. Reviews in Article Info (Article Manager)
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 05-10-2007, 03:00 PM
  4. Article Manager
    By pglock in forum osCMax v2 Features Discussion
    Replies: 2
    Last Post: 03-26-2006, 12:10 PM
  5. Article Manager with MS2-MAX
    By oakhill in forum osCMax v1.7 General Mods Discussion
    Replies: 1
    Last Post: 03-30-2005, 04:25 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •