Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Article Manager v1.0


RobAnderson

Recommended Posts

thanks uscetech, solved ther error, but got anotherone in articles.php if I want to view all articles.

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'limit 0, 10' at line 1

limit 0, 10

don't know were to find the this syntax, any idea?

 

thanks,

Ruud

Link to comment
Share on other sites

Which version are you using?

 

mmm first now getting this error

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'select a.articles_id, a.articles_date_added, ad.articles_name, ad.art' at line 1

select count(*) as total select a.articles_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_id, au.authors_name, td.topics_id, td.topics_name from articles a left join articles_to_topics a2t on (a.articles_id=a2t.articles_id) left join topics_description td on a2t.topics_id = td.topics_id left join authors au on a.authors_id = au.authors_id, articles_description ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '4' and td.language_id = '4' order by a.articles_date_added desc, ad.articles_name

 

version downloaded V1.5_1

 

modified the query's as found somewhere in this topic to make compatible for mysql v5.

 

here is my source:

<?php
/*
 $Id: articles.php, v1.0 2003/12/04 12:00:00 ra Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

// the following tPath references come from application_top.php
 $topic_depth = 'top';

 if (isset($tPath) && tep_not_null($tPath)) {
$topics_articles_query = tep_db_query("SELECT COUNT(*) as total from " . TABLE_ARTICLES_TO_TOPICS . " where topics_id = '" . (int)$current_topic_id . "'");
$topics_articles = tep_db_fetch_array($topics_articles_query);
if ($topics_articles['total'] > 0) {
  $topic_depth = 'articles'; // display articles
} else {
  $topic_parent_query = tep_db_query("SELECT COUNT(*) as total from " . TABLE_TOPICS . " where parent_id = '" . (int)$current_topic_id . "'");
  $topic_parent = tep_db_fetch_array($topic_parent_query);
  if ($topic_parent['total'] > 0) {
	$topic_depth = 'nested'; // navigate through the topics
  } else {
	$topic_depth = 'articles'; // topic has no articles, but display the 'no articles' message
  }
}
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ARTICLES);

 if ($topic_depth == 'top' && !isset($HTTP_GET_VARS['authors_id'])) {
$breadcrumb->add(NAVBAR_TITLE_DEFAULT, tep_href_link(FILENAME_ARTICLES));
 }

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<?php
// Mofification of Header Tags Contribution
// BOF: WebMakers.com Changed: Header Tag Controller v1.0
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'article_header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'article_header_tags.php');
} else {
?>
 <title><?php echo TITLE ?></title>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v1.0
?>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body >
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<?php
 if ($topic_depth == 'nested') {
$topic_query = tep_db_query("select td.topics_name, td.topics_heading_title, td.topics_description from " . TABLE_TOPICS . " t, " . TABLE_TOPICS_DESCRIPTION . " td where t.topics_id = '" . (int)$current_topic_id . "' and td.topics_id = '" . (int)$current_topic_id . "' and td.language_id = '" . (int)$languages_id . "'");
$topic = tep_db_fetch_array($topic_query);
?>
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
					<td valign="top" class="pageHeading"><?php
/* bof catdesc for bts1a, replacing "echo HEADING_TITLE;" by "topics_heading_title" */
		 if ( tep_not_null($topic['topics_heading_title']) ) {
			 echo $topic['topics_heading_title'];
		   } else {
			 echo HEADING_TITLE;
		   }
/* eof catdesc for bts1a */ ?></td>
		<td valign="top" class="pageHeading" align="right"></td>
	  </tr>
	 <?php if ( tep_not_null($topic['topics_description']) ) { ?>
	 <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
	  <tr>
		<td align="left" colspan="2" class="main"><?php echo $topic['topics_description']; ?></td>
	  </tr>
			<tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
	  <?php } ?>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
<?php
if (isset($tPath) && strpos('_', $tPath)) {
// check to see if there are deeper topics within the current topic
  $topic_links = array_reverse($tPath_array);
  for($i=0, $n=sizeof($topic_links); $i<$n; $i++) {
	$topics_query = tep_db_query("SELECT COUNT(*) as total from " . TABLE_TOPICS . " t, " . TABLE_TOPICS_DESCRIPTION . " td where t.parent_id = '" . (int)$topic_links[$i] . "' and t.topics_id = td.topics_id and td.language_id = '" . (int)$languages_id . "'");
	$topics = tep_db_fetch_array($topics_query);
	if ($topics['total'] < 1) {
	  // do nothing, go through the loop
	} else {
	  $topics_query = tep_db_query("select t.topics_id, td.topics_name, t.parent_id from " . TABLE_TOPICS . " t, " . TABLE_TOPICS_DESCRIPTION . " td where t.parent_id = '" . (int)$topic_links[$i] . "' and t.topics_id = td.topics_id and td.language_id = '" . (int)$languages_id . "' order by sort_order, td.topics_name");
	  break; // we've found the deepest topic the customer is in
	}
  }
} else {
  $topics_query = tep_db_query("select t.topics_id, td.topics_name, t.parent_id from " . TABLE_TOPICS . " t, " . TABLE_TOPICS_DESCRIPTION . " td where t.parent_id = '" . (int)$current_topic_id . "' and t.topics_id = td.topics_id and td.language_id = '" . (int)$languages_id . "' order by sort_order, td.topics_name");
}

// needed for the new articles module shown below
$new_articles_topic_id = $current_topic_id;
?>
		  </tr>
		</table></td>
	  </tr>
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>
	  <tr>
		<td><?php /*include(DIR_WS_MODULES . FILENAME_NEW_ARTICLES); */ ?></td>
	  </tr>
	</table></td>
  </tr>
</table></td>
<?php
 } elseif ($topic_depth == 'articles' || isset($HTTP_GET_VARS['authors_id'])) {

/* bof catdesc for bts1a */
// Get the topic name and description from the database
$topic_query = tep_db_query("select td.topics_name, td.topics_heading_title, td.topics_description from " . TABLE_TOPICS . " t, " . TABLE_TOPICS_DESCRIPTION . " td where t.topics_id = '" . (int)$current_topic_id . "' and td.topics_id = '" . (int)$current_topic_id . "' and td.language_id = '" . (int)$languages_id . "'");
$topic = tep_db_fetch_array($topic_query);
/* bof catdesc for bts1a */

// show the articles of a specified author
if (isset($HTTP_GET_VARS['authors_id'])) {
  if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only a specific topic
	$listing_sql = "select a.articles_id, a.authors_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_name, td.topics_name, a2t.topics_id from " . TABLE_ARTICLES . " a left join " . TABLE_AUTHORS . " au using(authors_id), " . TABLE_ARTICLES_DESCRIPTION . " ad, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td using(topics_id) where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_status = '1' and au.authors_id = '" . (int)$HTTP_GET_VARS['authors_id'] . "' and a.articles_id = a2t.articles_id and ad.articles_id = a2t.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' and a2t.topics_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' order by a.articles_date_added desc, ad.articles_name";
  } else {
// We show them all
	$listing_sql = "select a.articles_id, a.authors_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_name, td.topics_name, a2t.topics_id from " . TABLE_ARTICLES . " a left join " . TABLE_AUTHORS . " au using(authors_id), " . TABLE_ARTICLES_DESCRIPTION . " ad, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td using(topics_id) where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_status = '1' and au.authors_id = '" . (int)$HTTP_GET_VARS['authors_id'] . "' and a.articles_id = a2t.articles_id and ad.articles_id = a2t.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' order by a.articles_date_added desc, ad.articles_name";
  }
} else {
// show the articles in a given category
  if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only specific catgeory
	$listing_sql = "select a.articles_id, a.authors_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_name, td.topics_name, a2t.topics_id from " . TABLE_ARTICLES . " a left join " . TABLE_AUTHORS . " au using(authors_id), " . TABLE_ARTICLES_DESCRIPTION . " ad, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td using(topics_id) where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_status = '1' and a.articles_id = a2t.articles_id and ad.articles_id = a2t.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' and a2t.topics_id = '" . (int)$current_topic_id . "' and au.authors_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' order by a.articles_date_added desc, ad.articles_name";
  } else {
// We show them all
	$listing_sql = "select a.articles_id, a.authors_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_name, td.topics_name, a2t.topics_id from " . TABLE_ARTICLES . " a left join " . TABLE_AUTHORS . " au using(authors_id), " . TABLE_ARTICLES_DESCRIPTION . " ad, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td using(topics_id) where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_status = '1' and a.articles_id = a2t.articles_id and ad.articles_id = a2t.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' and a2t.topics_id = '" . (int)$current_topic_id . "' order by a.articles_date_added desc, ad.articles_name";
  }
}
?>
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
	   <td valign="top" align="left" class="pageHeading">
	   <?php
	   /* bof catdesc for bts1a, replacing "echo HEADING_TITLE;" by "topics_heading_title" */
		   if ( tep_not_null($topic['topics_heading_title']) ) {
			 echo $topic['topics_heading_title'];
		   } else {
			 echo HEADING_TITLE;
		   }

		 if (isset($HTTP_GET_VARS['authors_id'])) {
		   $author_query = tep_db_query("select au.authors_name, aui.authors_description, aui.authors_url from " . TABLE_AUTHORS . " au, " . TABLE_AUTHORS_INFO . " aui where au.authors_id = '" . (int)$HTTP_GET_VARS['authors_id'] . "' and au.authors_id = aui.authors_id and aui.languages_id = '" . (int)$languages_id . "'");
		   $authors = tep_db_fetch_array($author_query);
		   $author_name = $authors['authors_name'];
		   $authors_description = $authors['authors_description'];
		   $authors_url = $authors['authors_url'];

		   echo TEXT_ARTICLES_BY . $author_name;
		 }

	   /* eof catdesc for bts1a */
	   ?>
	   </td>
<?php
// optional Article List Filter
if (ARTICLE_LIST_FILTER) {
  if (isset($HTTP_GET_VARS['authors_id'])) {
	$filterlist_sql = "select distinct t.topics_id as id, td.topics_name as name from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t, " . TABLE_TOPICS . " t, " . TABLE_TOPICS_DESCRIPTION . " td where a.articles_status = '1' and a.articles_id = a2t.articles_id and a2t.topics_id = t.topics_id and a2t.topics_id = td.topics_id and td.language_id = '" . (int)$languages_id . "' and a.authors_id = '" . (int)$HTTP_GET_VARS['authors_id'] . "' order by td.topics_name";
  } else {
	$filterlist_sql= "select distinct au.authors_id as id, au.authors_name as name from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t, " . TABLE_AUTHORS . " au where a.articles_status = '1' and a.authors_id = au.authors_id and a.articles_id = a2t.articles_id and a2t.topics_id = '" . (int)$current_topic_id . "' order by au.authors_name";
  }
  $filterlist_query = tep_db_query($filterlist_sql);
  if (tep_db_num_rows($filterlist_query) > 1) {
	echo '<td align="right" class="main">' . tep_draw_form('filter', FILENAME_ARTICLES, 'get') . TEXT_SHOW . ' ';
	if (isset($HTTP_GET_VARS['authors_id'])) {
	  echo tep_draw_hidden_field('authors_id', $HTTP_GET_VARS['authors_id']);
	  $options = array(array('id' => '', 'text' => TEXT_ALL_TOPICS));
	} else {
	  echo tep_draw_hidden_field('tPath', $tPath);
	  $options = array(array('id' => '', 'text' => TEXT_ALL_AUTHORS));
	}
	echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);
	while ($filterlist = tep_db_fetch_array($filterlist_query)) {
	  $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);
	}
	echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"');
	echo '</form></td>' . "\n";
  }
}
?>
	  </tr>
	 <?php if ( tep_not_null($topic['topics_description']) ) { ?>
	 <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
   </tr>
   <tr>
	  <td align="left" colspan="2" class="main"><?php echo $topic['topics_description']; ?></td>
   </tr>
   <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
   </tr>
	  <?php } ?>
	 <?php if (tep_not_null($authors_description)) { ?>
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>
	  <tr>
		<td class="main" colspan="2" valign="top"><?php echo $authors_description; ?></td>
	  <tr>
	  <?php } ?>
	  <?php if (tep_not_null($authors_url)) { ?>
	  <tr>
		<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
	  </tr>
	  <tr>
		<td class="main" colspan="2" valign="top"><?php echo sprintf(TEXT_MORE_INFORMATION, $authors_url); ?></td>
	  <tr>
	  <tr>
		<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
	  </tr>
	  <?php } ?>
	</table></td>
  </tr>
  <tr>
	<td><?php include(DIR_WS_MODULES . FILENAME_ARTICLE_LISTING); ?></td>
  </tr>
</table></td>
<?php
 } else { // default page
?>
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><?php include(DIR_WS_MODULES . FILENAME_ARTICLES_UPCOMING); ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td class="main"><?php echo '<b>' . TEXT_CURRENT_ARTICLES . '</b>'; ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 $articles_all_array = array();
 $articles_all_query_raw = "select a.articles_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_id, au.authors_name, td.topics_id, td.topics_name from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_DESCRIPTION . " ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' order by a.articles_date_added desc, ad.articles_name";
 $listing_sql = $articles_all_query_raw;

 //$articles_all_split = new splitPageResults($articles_all_query_raw, MAX_ARTICLES_PER_PAGE);

?>
  <tr>
	<td><?php include(DIR_WS_MODULES . FILENAME_ARTICLE_LISTING); ?></td>
  </tr>






  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>

  <tr>
	</table></td>
  </tr>
<?php
 if (($articles_all_split->number_of_rows > 0) && ((ARTICLE_PREV_NEXT_BAR_LOCATION == 'bottom') || (ARTICLE_PREV_NEXT_BAR_LOCATION == 'both'))) {
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="smallText"><?php echo $articles_all_split->display_count(TEXT_DISPLAY_NUMBER_OF_ARTICLES); ?></td>
		<td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE . ' ' . $articles_all_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
	  </tr>
	</table></td>
  </tr>
<?php
 }
?>
</table></td>
<?php } ?>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

everything else seems to work fine.

thanks Ruud

Link to comment
Share on other sites

Replace

 

$articles_all_query_raw = "select a.articles_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_id, au.authors_name, td.topics_id, td.topics_name from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_DESCRIPTION . " ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' order by a.articles_date_added desc, ad.articles_name";

 

With

 

$articles_all_query_raw = "select a.articles_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_id, au.authors_name, td.topics_id, td.topics_name from (" . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t) left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_DESCRIPTION . " ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' order by a.articles_date_added desc, ad.articles_name";
Link to comment
Share on other sites

  • 2 weeks later...

I am having two problems with the Article Manager install.

 

1) After the install it doesn't show up in the admin area under catalog.

 

2) It stops my site from working due to the register_globals.

 

 

Has anyone else had these problems and what was done to resolve this?

Link to comment
Share on other sites

I am having two problems with the Article Manager install.

 

1) After the install it doesn't show up in the admin area under catalog.

 

2) It stops my site from working due to the register_globals.

 

 

Has anyone else had these problems and what was done to resolve this?

Link to comment
Share on other sites

I just installed Article Manager v1.5. It seems to be installed correctly. However, I have my osc shop without info boxes so Im wondering how to utilize the contribution. I do have on my product_info page a reviews button so Im think I can somehow have an articles page. Could I just add a new page "Articles" with links from there?

 

Thanks for all the great work.

Link to comment
Share on other sites

Ive just installed this contribution but when I go to view an article I recieve the following error.

 

Fatal error: Cannot redeclare tep_show_category() (previously declared in /var/www/workplace-essentials.co.uk/httpdocs/includes/boxes/categories.php:4) in /var/www/workplace-essentials.co.uk/httpdocs/includes/boxes/categories.php on line 4

 

what part of the contribution code is redeclareing the category?

 

Any help would be much apreciated.

 

To have a look at what I mean Visit My Website

Link to comment
Share on other sites

Ok I found the problem, somewhere in the article code its calling up column left. I dont use columns anymore as mine is a modified layout.

Had to strip out all calls for columns?

Link to comment
Share on other sites

I have installed Article Manager v1.5 and all seems to be working . . . . Kind of. I have searched high and low in these forums and can't seem to figure out what I'm missing here.

 

Problem #1:

I can add articles etc., but I don't see anywhere for people to contribute (or upload) their articles to my site. I thought this was a feature added back in v1.2? Also, there is noplace to add images for these articles in my Articles Manager admin. I even tried uninstalling everything and rolling back to v1.4 with the same results.

 

Problem #2:

For some reason, when I click on an article link, my header shifts out of whack! You can see this in the area of my "shopping cart".

 

Problem #3:

The posting date for my articles is not in the correct font. Not sure where it's pulling that one from, but I don't like it.

 

I have changed the language files a bit for use as a bulletin board called "Adoptions" . . . you'll see it on the right column.

My site is not live yet (or at least not advertized to general public), but can be seen here: http://www.ruffhousedoggiedaycare.com/shoppingcart

 

There are a few cosmetic bugs with the infobox header (corners) for my articles box, but I'll fix that by added a seperate class.

 

Any help on these issues is appreciated.

Edited by tonybeam
Link to comment
Share on other sites

Problem #4

I am getting this code at the bottom of all my product pages and losing the right column:

 

1146 - Table 'oceanpoi_osc1.ARTICLES' doesn't exist

 

select distinct ax.articles_id, ad.articles_name, a.articles_last_modified from articles_xsell ax LEFT JOIN ARTICLES a USING(articles_id) LEFT JOIN articles_description ad USING(articles_id) where ax.xsell_id = '31' and ad.language_id = '1' and a.articles_status = '1' order by a.articles_last_modified

 

[TEP STOP]

 

I did figure out the solution to Problem #1 though . . . evidently those features are due out in v2.0

Link to comment
Share on other sites

Problem #4

I am getting this code at the bottom of all my product pages and losing the right column:

 

1146 - Table 'oceanpoi_osc1.ARTICLES' doesn't exist

 

select distinct ax.articles_id, ad.articles_name, a.articles_last_modified from articles_xsell ax LEFT JOIN ARTICLES a USING(articles_id) LEFT JOIN articles_description ad USING(articles_id) where ax.xsell_id = '31' and ad.language_id = '1' and a.articles_status = '1' order by a.articles_last_modified

 

[TEP STOP]

 

I did figure out the solution to Problem #1 though . . . evidently those features are due out in v2.0

 

I ended up just reverting back to my old product_info.php file. It resolved Problem #4. I think this was supposed to link a product to an article or something, but I don't really need that feature anyway.

Link to comment
Share on other sites

Hi,

 

I'm stuck again... I have a nested topic structure like:

 

Topic 01

Topic 01_01

Article

Article

Topic 01_02

Article

Article

Article

Article

 

Topic 02

Topic 02_01

Article

Article

Topic 02_02

Article

Article

Article

Article

 

Topic 03

Topic 03_01

Article

Article

Topic 03_02

Article

Article

Article

Article

 

What I'm trying to do is display an unordered list like

 

Topic 01

Topic 01_01

Topic 01_02

Topic 02

Topic 02_01

Topic 02_02

Topic 03

Topic 03_01

Topic 03_02

 

That is, just the topics without the articles. What would be the easiest way to go about it?

 

Thank you! Thank you! Thank you! :)

Link to comment
Share on other sites

I am slowly getting this to work :-(

 

I finally got this to display in the admin section. However when I click on the Article Manager Link it takes me to the cookie_usage.php page of the cart - WTF?

 

What am I doing now? I really need to get this working so I can finish my cart...

 

Please anyone can you give me some advise or instructions on this?

Link to comment
Share on other sites

Ive noticed that the icon (articles.gif) for the articles is missing in catalog/images/icons

If your using the xsell feature in your product info then you need to upload and article icon otherwise it will display the article name and then the article name again as a hyperlink next to it.

 

 

 

Along the same lines as above what can I do to get my article hyperlink aligned at middle instead of bottom next to my icon.

the code that needs altering is as follows:

 

'text' => tep_image(DIR_WS_IMAGES.'icons/article.gif', $xsell['articles_name']).' <a href="' . tep_href_link(FILENAME_ARTICLE_INFO, 'articles_id=' . $xsell['articles_id']) . '">' . $xsell['articles_name'] . '</a><br>');

 

Its from the articles_pxsell.php in includes/modules

 

Please see one of my current product pages to see what I mean => Sack Trucks

The article xsell link is near the footer.

 

Any help would be much appreciated.

 

Thanks.

Edited by Rochdalemark
Link to comment
Share on other sites

In includes/modules/article_listing.php I'd like to have the rows split into even and odd rows, like the product listing pages. This way I'll be able to give an alternating background color so it's easier to look at the page and tell what's going on. Is this something fairly simple to do and, if so, does anyone know how? Thanks so much. Here is a link to the page in question.

Edited by beachkitty85
Link to comment
Share on other sites

  • 5 weeks later...

I have slowly been working on this and finally gotten it to samewhat work on my site.

 

1) I got the article section to display on the site. And I even got an "All Articles" link to display. When you click on this it takes you to the article.php page. But there is no list of articles - although in the backend I have several.

 

2) At the bottom of each of the product in the store is a section with the title: TEXT_PXSELL_ARTICLES but no articles are listed there.

 

 

Can someone help get this to finally work? I am willing to pay a little bit of money to have this working if someone does not want to offer their help for free.

 

the site is www.chineseherbs.net

Edited by eglwolf
Link to comment
Share on other sites

  • 2 weeks later...

I just installed Rticle manager 1.5 with admin on my testsite and it is perfecj, just what I needed.

 

Anyways, I have found two problems:

 

1. the file /images/icons/article.gif is missing. Not really that big of a deal to fix but still.

2. I get "TEXT_PXSELL_ARTICLES" where the cross selling articles title should be.

 

I wrote an article and put two items as cross selling products in it. If i look at the article via "all articles"/articles everything is fine but when I enter the referenced product I get the articl in product listning as intended but there is this TEXT_PXSELL_ARTICLES in the heading of the infobox.

 

I traced it (I think) back to /includes/languages/english/article_info.php. Is that the place where you set the TEXT_PXSELL_ARTICLES?

 

Is there any work done to get a way to get others to post articles direct and only to approve them for the admin (without going via the admin panel?)

 

Also, the installation notes claims:

NOTE: if you DO NOT have WYSIWYG HTMLArea MS2 v1.7 installed:

Add the htmlarea folder (and all files inside) to:

admin/htmlarea/...

There is no such thing in the contrib.

Link to comment
Share on other sites

Little image hack

This "contrib" allows you to attach heading images to the articles listing.

 

Sorry, I forgot explain the image names, so

article:

/article_info.php/articles_id/1

Image

/images/magazin-1.jpg

 

article:

/article_info.php/articles_id/2

Image

/images/magazin-2.jpg

 

etc

working demo:

http://www.anrodiszlec.hu/articles.php/tPath/1

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...