PDA

View Full Version : Article Manager v1.0



michael_s
10-15-2007, 06:15 AM
To Fix the bug in the name of the news to the breadcrumb trail:
When you select an other language than English, it shows english title if existing , if not = nothing.



In application_top.php, change this :

CODE
// add the articles name to the breadcrumb trail
if (isset($HTTP_GET_VARS['articles_id'])) {
$article_query = tep_db_query("select articles_name from " . TABLE_ARTICLES_DESCRIPTION . " where articles_id = '" . (int)$HTTP_GET_VARS['articles_id'] . "'");
if (tep_db_num_rows($article_query)) {
$article = tep_db_fetch_array($article_query);
if (isset($HTTP_GET_VARS['authors_id'])) {
$breadcrumb->add($article['articles_name'], tep_href_link(FILENAME_ARTICLE_INFO, 'authors_id=' . $HTTP_GET_VARS['authors_id'] . '&articles_id=' . $HTTP_GET_VARS['articles_id']));
} else {
$breadcrumb->add($article['articles_name'], tep_href_link(FILENAME_ARTICLE_INFO, 'tPath=' . $tPath . '&articles_id=' . $HTTP_GET_VARS['articles_id']));
}
}
}


By this :

CODE
// add the articles name to the breadcrumb trail
if (isset($HTTP_GET_VARS['articles_id'])) {
$article_query = tep_db_query("select articles_name from " . TABLE_ARTICLES_DESCRIPTION . " where articles_id = '" . (int)$HTTP_GET_VARS['articles_id'] . "' and language_id = '" . (int)$languages_id . "'");
if (tep_db_num_rows($article_query)) {
$article = tep_db_fetch_array($article_query);
if (isset($HTTP_GET_VARS['authors_id'])) {
$breadcrumb->add($article['articles_name'], tep_href_link(FILENAME_ARTICLE_INFO, 'authors_id=' . $HTTP_GET_VARS['authors_id'] . '&articles_id=' . $HTTP_GET_VARS['articles_id']));
} else {
$breadcrumb->add($article['articles_name'], tep_href_link(FILENAME_ARTICLE_INFO, 'tPath=' . $tPath . '&articles_id=' . $HTTP_GET_VARS['articles_id']));
}
}
}

More... (http://addons.oscommerce.com/info/1709)