Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Article Manager v1.0


RobAnderson

Recommended Posts

hi, i have installed the article manager. and on page: http://localhost/osc/articles_new.php i got this error:

 

1054 - Unknown column 'a.authors_id' in 'on clause'

 

select count(*) as total from articles a, articles_to_topics a2t 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 = '1' and td.language_id = '1' and a.articles_date_added > SUBDATE(now( ), INTERVAL 'NEW_ARTICLES_DAYS_DISPLAY' DAY)

 

can you tell me where the sql is and how i can fix it?

 

thanks.

 

i have found a way to fix it. can anyone tell me where to set MAX_ARTICLES_PER_PAGE? i don't see where in the admin pages can set that variable. thanks.

Link to comment
Share on other sites

hi, i have installed the article manager. and on page: http://localhost/osc/articles_new.php i got this error:

 

1054 - Unknown column 'a.authors_id' in 'on clause'

 

select count(*) as total from articles a, articles_to_topics a2t 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 = '1' and td.language_id = '1' and a.articles_date_added > SUBDATE(now( ), INTERVAL 'NEW_ARTICLES_DAYS_DISPLAY' DAY)

 

can you tell me where the sql is and how i can fix it?

 

thanks.

 

Hi there, the fix is in post 682 :)

Link to comment
Share on other sites

It'll be something like the code for the language and currency boxes to disappear on the checkout pages which is this:

 

if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
include(DIR_WS_BOXES . 'languages.php');
include(DIR_WS_BOXES . 'currencies.php');

 

in whichever column file you want your articles box to appear in. I'm just going to add the link to articles.php in my existing information infobox, and possibly to the header nav too.

 

I tried similar but couldnt get it working.

 

In the end i have cheated and created a new file and pointed those pages to that column right :)

Link to comment
Share on other sites

Can someone that has this contrib installed please send me a PM including their site.

 

I would love to see this contrib in action before I install it...

 

Thomas

A signature is something that reflects its user. - The dictionary

 

The question is not, 'to code, or not to code'

the question is, 'if we do not code, are we really alive?'

-- anonymous

Link to comment
Share on other sites

from my previous posts:

 

OK so I got articles manager working great on a clean install of oscommerce. I applied it to the test version of my real site which has several contributions installed already, including HTC. And it's all working great *except* for this one thing. I'm not sure if it's a HTC thing or a tinyMCE thing but when I select an individual article it seems to be adding the meta tags to the body instead of the head of the file. There's no difference between the articles.php files for each version of oscommerce.
and

 

thanks, but which bit of code?? LOL Like I said, the articles.php files are the same, as are the articles_header_tags.php files. I'd love for it to be properly in the meta tags Not sure if it's obvious there that the first pic is the vanilla version and the second is the test version, with the offending text at the top.

 

and this is what my meta tags look like:

 

<meta name="reply-to" content="[email protected]">
<meta name="description" content="<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> 	<title>Untitled document</title> 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> testing the articles meta description </body> </html> This is a description for the entire site.">

<meta name="keywords" content="<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> 	<title>Untitled document</title> 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> test, test, test </body> </html>, keyword1, keyword2, keyword3">
<title>Site Name - Articles - test topic - testing the article</title>

 

So the title tag is fine but everything else is broken, and this is also on my vanilla+article manager version now. I've just downloaded the latest version of the contribution and checked it (using BC) against what was there before and it's all the same (apart from minor language and css changes) The contribution works fine when the articles_header_tag.php file isn't present but then I don't get the SEO effect. Any ideas?

Link to comment
Share on other sites

OK have narrowed it down to TinyMCE adding a load of stuff to the meta tag boxes that doesn't need to be there so now I'm looking to change the type of text entry box required so that TinyMCE doesn't kick in there. Is no-one else having this issue then?

Link to comment
Share on other sites

I have just installed Article Manager and published an article. articles.php is empty in my store and articles_new.php shows the error below. I have Header Tags Controller 2.5.5 installed.

 

Fatal error: Call to undefined function clean_html_comments() in /home/httpd/ws2890/blush.se/includes/article_header_tags.php on line 134

 

If I add..

 

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

 

..I will get another error;

 

Fatal error: Cannot redeclare clean_html_comments() (previously declared in /home/httpd/ws2890/blush.se/includes/functions/clean_html_comments.php:13) in /home/httpd/ws2890/blush.se/includes/functions/clean_html_comments.php on line 26

 

 

What should I do?

Link to comment
Share on other sites

Hi,

I am planning to develop a website which visitors can upload their articles with the price and other can search and buy those articles. Do you think this contribution can help me to achieve that? May by combination with other plugins?

I would appreciate your kind help.

Link to comment
Share on other sites

i have searched this forum (and its very long.. :) ) looking for a way to dsplay a few (2-5) of the newest articles in my index.php page . there are a few solutions but none are quite polished enough. i was hoping to massage the articles displaying block of articles.php and place it in index.php some how limit the loop to the lates 5 and doubling the displayed content so users can see a good chunk of the article. i would really hope to stagger the output so its not one continuous block but maybe something like , and article/banner ad - thenbelow banner ad/article and so on. i would also like to add an image for each articles so it can be shown next to it in the index, but i suppose that would require more than just a small hack. so will delay it....

any ideas on how to proceed? has this been answered before ? if so can any one point me to the right place ?

thanks in advance

currently using OSC2.2MS2 051113 with the following contributions:

 

AJAX Attributemanager 2.1 - All_products 4.4 - Banner manager 1.5b - banner hack picture in manager * description in product listing hack ms2 v2.4 * drop shadow boxes v.1.1 * Easy populater 2.76d-ms2 by surfalot * FCKEditor * header tag controller v2.5.9 * jcssmenu * LoginBox 5.6 * option type feature v1.71 * OSC-Cach-v1.1 * popup_imagecleaned_stilized_2 * Remove from cart button hack * scrolling bestsellers * Article manager1.4 * Links Manager v1.14. * proffessional invoice&packingslip 6.1 * Ultimate SEO URLs

Personaly i think all these features NEED to be in the main core as they are quite basic features that are missing. but then again what do i know?

Link to comment
Share on other sites

in the mean time i took this code from articles-new.php and tinkered with it so i can fit it in to any table i want.

i modified its look to remove author name and date added and trippled the amount of shown text to give it a bit more body, i also wraped it in a border andspaced out the articles to look better(in my humble opinion) on my front page.

bare in mind this code will only display the new articles based on your definitions in the admin panel - it suites me but you might want to set it other wise.

as always backup backup and backup - even though this changes nothing of the main code just adds a table

 

you can view this here i havent finished playing about with the front page so this is just temporary , to show what the modification looks like.

 

<!-- changes to add articles in index page  or any other html table cell--->	

<table width="100%" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#1f1f1f" bgcolor="#fafafa">
			<?php
 $articles_new_array = array();
 $articles_new_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 . "' and a.articles_date_added > SUBDATE(now( ), INTERVAL '" . NEW_ARTICLES_DAYS_DISPLAY . "' DAY) order by a.articles_date_added desc, ad.articles_name";

 $articles_new_split = new splitPageResults($articles_new_query_raw, MAX_NEW_ARTICLES_PER_PAGE);
?>
			<tr>
			  <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
				<?php
 if ($articles_new_split->number_of_rows > 0) {
$articles_new_query = tep_db_query($articles_new_split->sql_query);

while ($articles_new = tep_db_fetch_array($articles_new_query)) {
?>
				<tr>
				  <td valign="top" class="main" width="75%">
					<?php
 echo '<a href="' . tep_href_link(FILENAME_ARTICLE_INFO, 'articles_id=' . $articles_new['articles_id']) . '"><b>' . $articles_new['articles_name'] . '</b></a> ';
 // removed authors name
 //if (DISPLAY_AUTHOR_ARTICLE_LISTING == 'true' && tep_not_null($articles_new['authors_name'])) {
 // echo TEXT_BY . ' ' . '<a href="' . tep_href_link(FILENAME_ARTICLES, 'authors_id=' . $articles_new['authors_id']) . '"> ' . $articles_new['authors_name'] . '</a>';
 // remove the slashes to bring back( dont take out this little curly bracket here on the right ->  }  
?>						</td>
		  </tr>
				<?php
  if (DISPLAY_ABSTRACT_ARTICLE_LISTING == 'true') {
?>
				<tr>
				  <td class="main" style="padding-left:15px"><?php echo clean_html_comments(substr($articles_new['articles_head_desc_tag'],0, MAX_ARTICLE_ABSTRACT_LENGTH*3)) . ((strlen($articles_new['articles_head_desc_tag']) >= MAX_ARTICLE_ABSTRACT_LENGTH*3) ? '...' : ''); ?></td>
		  </tr>
				<tr>
				  <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '20'); ?></td>
		  </tr>
				<?php
  } 
//}
} // End of listing loop
 } else {
?>
				<tr>
				  <td class="main"><?php echo sprintf(TEXT_NO_NEW_ARTICLES, NEW_ARTICLES_DAYS_DISPLAY); ?></td>
		  </tr>
				<?php
 }
?>				  <!--removed spaces - remove comments to replace  <tr>
				  <td><(?)php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
		  </tr> -->
				</table></td>
	  </tr>

			</table>

currently using OSC2.2MS2 051113 with the following contributions:

 

AJAX Attributemanager 2.1 - All_products 4.4 - Banner manager 1.5b - banner hack picture in manager * description in product listing hack ms2 v2.4 * drop shadow boxes v.1.1 * Easy populater 2.76d-ms2 by surfalot * FCKEditor * header tag controller v2.5.9 * jcssmenu * LoginBox 5.6 * option type feature v1.71 * OSC-Cach-v1.1 * popup_imagecleaned_stilized_2 * Remove from cart button hack * scrolling bestsellers * Article manager1.4 * Links Manager v1.14. * proffessional invoice&packingslip 6.1 * Ultimate SEO URLs

Personaly i think all these features NEED to be in the main core as they are quite basic features that are missing. but then again what do i know?

Link to comment
Share on other sites

Got another hiccup with the header tags on Article Manager, it's saying 'Site Name - Articles - topic name' and I can't find where to edit the variables for the site name, also it would be nice if it would use the same format as the main header tags title! I'm probably missing something obvious...

 

Fredrik you need to read the bit of the instructions that says 'if you DO NOT have Header Tags Controller installed...'

Link to comment
Share on other sites

I'm desing an infobox for Articles Manager. I'm modified of mazza and paz infobox. It's addapted to individual boxes. You can see it in www.gccompeticion.com

 

sorry, my english isn't good!

 

New new_articles.php module.

 

<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<?php echo mws_header('PUT HERE THE TITTLE OF NEW ARTICLES'); ?>
  <td height=10>
<?php
$articles_new_array = array();
$articles_new_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_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";

$articles_new_split = new splitPageResults($articles_new_query_raw, MAX_NEW_ARTICLES_PER_PAGE);
?>
<?php
if ($articles_new_split->number_of_rows > 0) {
 $articles_new_query = tep_db_query($articles_new_split->sql_query);
?>
<div class="cbox" id="newa">
<table class="listing" cellpadding=4 cellspacing=0>
<?php
 while ($articles_new = tep_db_fetch_array($articles_new_query)) {
?>
<tr>
<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_ARTICLE_INFO, 'articles_id=' . $articles_new['articles_id']) . '"><b>' . $articles_new['articles_name']. '</b></a>' ?></td>
<td class="main" width=150><?php echo '<a href="' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $articles_new['topics_id']) . '">' . $articles_new['topics_name'] . '</a>'; ?><br><?php echo tep_date_long($articles_new['articles_date_added']); ?></td>
</tr>
<tr>
<td class="main" colspan="2" style="padding-left:10px"><?php echo clean_html_comments(substr($articles_new['articles_head_desc_tag'],0, MAX_ARTICLE_ABSTRACT_LENGTH)) . ((strlen($articles_new['articles_head_desc_tag']) >= MAX_ARTICLE_ABSTRACT_LENGTH) ? '...' : ''); ?><br><hr></td>
</tr>
<?php
} // End of listing loop
echo '</table></div>';  
} else {
?><?php
}
?>
  <br></td>
<?php echo mws_footer(''); ?>
 </tr>
</table>

 

 

In index.php:

 

<?php require(DIR_WS_MODULES . 'new_articles.php');?>

Edited by el_Juanky
Link to comment
Share on other sites

I have installed Article Manager 1.5.

Seems to be working fine so far. But there is one thing I would like to change:

When you view the articles page, the author and topic links are not in the correct order.

Here is how it appears:

Looking at Depression Differently by Dr. Gregg Topic: Depression

Jantz

 

It should appear like this:

 

Looking at Depression Differently by Dr. Gregg Jantz

Topic: Depression

 

It appears the code that needs to be changed is in articles_listing.php.

 

 

After posting another article, it appears that the position of the entire link for the author is determined by how long the article title is. Is there a way to just force the title and author link to be on one line and the topic to be on a second line?

 

Anyone know what needs to be changed in this code

 

After posting another article, it appears that the position of the entire link for the author is determined by how long the article title is. Is there a way to just force the title and author link to be on one line and the topic to be on a second line?

 

Anyone know what needs to be changed in this code

Link to comment
Share on other sites

I've installed version 1.5_1 and everything is ok however the WYSIWYG is not there.

I have it installed in other parts of my site (Description, Main Page, Shipping, Privacy, Newsdesk and Conditions) but it just doesnt show up in the Articles Manager - any ideas?

 

Many thanks

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