Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Article Manager v1.0


RobAnderson

Recommended Posts

oh oh - I found it *s*

 

I had put a direct email link in "article name"

 

BIG thanks

Helle :-)

 

PS: Do you know how to put in a bullet in the "articles.php" page. I got it right in the "articles_new.php" page, but I can't seem to find the insert point for that image bullet...

 

Hope it's ok that I ask one more question

 

Helle :-)

Edited by HelleM
Link to comment
Share on other sites

Excellent contrib, thanks to everyone who has helped.

 

I was having a problem with getting the correct title to display using header tags controller (HTC) like I have read a few others have so I hope this helps someone out there.

 

The problem I was having was I couldn't get the title I entered for the article to appear in the <head> <title>.

 

In the article_info.php page, I had to change

 

<?php
// BOF: Header Tag Controller v2.5.7
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: Header Tag Controller v2.5.7
?>

 

to this

 

<?php
// BOF: Header Tag Controller v2.5.7
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: Header Tag Controller v2.5.7
?>

 

and then in the includes/article_header_tags.php file I changed

 

// ARTICLE_INFO.PHP
 case ( strstr($_SERVER['PHP_SELF'],'article_info.php') or strstr($PHP_SELF,'article_info.php') ):
$the_article_info_query = tep_db_query("select a.articles_id, ad.articles_name, ad.articles_description, ad.articles_head_title_tag, ad.articles_head_keywords_tag, ad.articles_head_desc_tag, ad.articles_url, a.articles_date_added, a.articles_date_available, a.authors_id from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_DESCRIPTION . " ad where a.articles_id = '" . $HTTP_GET_VARS['articles_id'] . "' and ad.articles_id = '" . $HTTP_GET_VARS['articles_id'] . "'");
$the_article_info_query = tep_db_query("select ad.language_id, a.articles_id, ad.articles_name, ad.articles_description, ad.articles_head_title_tag, ad.articles_head_keywords_tag, ad.articles_head_desc_tag, ad.articles_url, a.articles_date_added, a.articles_date_available, a.authors_id from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_DESCRIPTION . " ad where a.articles_id = '" . (int)$HTTP_GET_VARS['articles_id'] . "' and ad.articles_id = '" . (int)$HTTP_GET_VARS['articles_id'] . "'" . " and ad.language_id ='" .  (int)$languages_id . "'");
$the_article_info = tep_db_fetch_array($the_article_info_query);

if (empty($the_article_info['articles_head_desc_tag'])) {
  $the_desc= NAVBAR_TITLE . '. ' . HEAD_DESC_TAG_ALL;
} else {
  if ( HTDA_ARTICLE_INFO_ON=='1' ) {
	$the_desc= $the_article_info['articles_head_desc_tag'] . ' ' . HEAD_DESC_TAG_ALL;
  } else {
	$the_desc= $the_article_info['articles_head_desc_tag'];
  }
}

if (empty($the_article_info['articles_head_keywords_tag'])) {
  $the_key_words= NAVBAR_TITLE . ', ' . HEAD_KEY_TAG_ALL;
} else {
  if ( HTKA_ARTICLE_INFO_ON=='1' ) {
	$the_key_words= $the_article_info['articles_head_keywords_tag'] . ', ' . HEAD_KEY_TAG_ALL;
  } else {
	$the_key_words= $the_article_info['articles_head_keywords_tag'];
  }
}

if (empty($the_article_info['articles_head_title_tag'])) {
  $the_title= HEAD_TITLE_TAG_ALL . ' - ' . NAVBAR_TITLE;
} else {
  if ( HTTA_ARTICLE_INFO_ON=='1' ) {
	$the_title= HEAD_TITLE_TAG_ALL . ' - ' .  HEAD_TITLE_TAG_ARTICLE_INFO . ' - ' . $topics['topics_name'] . $authors['authors_name'] . ' - ' . clean_html_comments($the_article_info['articles_head_title_tag']);
  } else {
	$the_title= clean_html_comments($the_article_info['articles_head_title_tag']);
  }
}

 

to this

// ARTICLE_INFO.PHP
 case ( strstr($_SERVER['PHP_SELF'],'article_info.php') or strstr($PHP_SELF,'article_info.php') ):
$the_article_info_query = tep_db_query("select a.articles_id, ad.articles_name, ad.articles_description, ad.articles_head_title_tag, ad.articles_head_keywords_tag, ad.articles_head_desc_tag, ad.articles_url, a.articles_date_added, a.articles_date_available, a.authors_id from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_DESCRIPTION . " ad where a.articles_id = '" . $HTTP_GET_VARS['articles_id'] . "' and ad.articles_id = '" . $HTTP_GET_VARS['articles_id'] . "'");
$the_article_info_query = tep_db_query("select ad.language_id, a.articles_id, ad.articles_name, ad.articles_description, ad.articles_head_title_tag, ad.articles_head_keywords_tag, ad.articles_head_desc_tag, ad.articles_url, a.articles_date_added, a.articles_date_available, a.authors_id from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_DESCRIPTION . " ad where a.articles_id = '" . (int)$HTTP_GET_VARS['articles_id'] . "' and ad.articles_id = '" . (int)$HTTP_GET_VARS['articles_id'] . "'" . " and ad.language_id ='" .  (int)$languages_id . "'");
$the_article_info = tep_db_fetch_array($the_article_info_query);

if (empty($the_article_info['articles_head_desc_tag'])) {
  $the_desc= NAVBAR_TITLE . '. ' . HEAD_DESC_TAG_ALL;
} else {
  if ( HTDA_ARTICLE_INFO_ON=='1' ) {
	$the_desc= $the_article_info['articles_head_desc_tag'];
  } else {
	$the_desc= $the_article_info['articles_head_desc_tag'];
  }
}

if (empty($the_article_info['articles_head_keywords_tag'])) {
  $the_key_words= NAVBAR_TITLE . ', ' . HEAD_KEY_TAG_ALL;
} else {
  if ( HTKA_ARTICLE_INFO_ON=='1' ) {
	$the_key_words= $the_article_info['articles_head_keywords_tag'];
  } else {
	$the_key_words= $the_article_info['articles_head_keywords_tag'];
  }
}

if (empty($the_article_info['articles_head_title_tag'])) {
  $the_title= HEAD_TITLE_TAG_ALL . ' - ' . NAVBAR_TITLE;
} else {
  if ( HTTA_ARTICLE_INFO_ON=='1' ) {
	$the_title= clean_html_comments($the_article_info['articles_head_title_tag']);
  } else {
	$the_title= clean_html_comments($the_article_info['articles_head_title_tag']);
  }
}

 

Now in the admin>header tags>pages the article_info.php page shows up red, but all the title, description and keywords is controlled entirely by what is entered in the article title, description and keywords fields.

 

Cheers

Link to comment
Share on other sites

I have verified my install 2 times. Here is my store it is a work in progress so dont mind the mess. The issue that I am having is the articles are not showing up when you click on a link in the right column. If you click on the new articles you can see that there are there but when you click you get this. I dont know where to start. Could anyone please help?

 

Also for some reason it is overridding my stylesheet so that the backround is white not black like the rest of the store

Link to comment
Share on other sites

PS: Do you know how to put in a bullet in the "articles.php" page. I got it right in the "articles_new.php" page, but I can't seem to find the insert point for that image bullet...
Sorry, Helle, for taking so long with an answer to this...

I think the insertion point you are looking for is on line 48 in the file: "catalog/includes/modules/article_listing.php"

Lines 47 to 52 in my copy of article listing says:

<?php
 echo '<a href="' . tep_href_link(FILENAME_ARTICLE_INFO, 'articles_id=' . $articles_listing['articles_id']) . '"><b>' . $articles_listing['articles_name'] . '</b></a> ';
 if (DISPLAY_AUTHOR_ARTICLE_LISTING == 'true' && tep_not_null($articles_listing['authors_name'])) {
  echo TEXT_BY . ' ' . '<a href="' . tep_href_link(FILENAME_ARTICLES, 'authors_id=' . $articles_listing['authors_id']) . '"> ' . $articles_listing['authors_name'] . '</a>';
 }
?>

//Micke

Link to comment
Share on other sites

Hi Micke that was excatly it

THANKS

Helle :-)

 

echo '<img src="images/pil4.gif" align="absmiddle"> <a href="' . tep_href_link(FILENAME_ARTICLE_INFO, 'articles_id=' . $articles_listing['articles_id']) . '"><b>' . $articles_listing['articles_name'] . '</b></a> ';

if (DISPLAY_AUTHOR_ARTICLE_LISTING == 'true' && tep_not_null($articles_listing['authors_name'])) {

echo TEXT_BY . ' ' . '<a href="' . tep_href_link(FILENAME_ARTICLES, 'authors_id=' . $articles_listing['authors_id']) . '"> ' . $articles_listing['authors_name'] . '</a>';

Link to comment
Share on other sites

  • 2 weeks later...

installed Article Manager 1.4 and getting the following error

 

 

Fatal error: Call to undefined function: tep_draw_fckeditor() in /usr/local/psa/home/vhosts/alarisavenue.net/httpdocs/admin/articles.php on line 447

 

when I click on New Topic at the admin tool. This is right after "Topic Description" and the UK flag.

I also get

 

Fatal error: Call to undefined function: tep_draw_fckeditor() in /usr/local/psa/home/vhosts/alarisavenue.net/httpdocs/admin/articles.php on line 753

 

when I click on New Article, just after Article Content and the UK flag.

 

Anyone who can help me there?

 

Thanks

Link to comment
Share on other sites

Hi,

 

I've finally got the Article Manager contribution to work, I experienced the problem with the version of PHP/mySQL my host uses (thanks for the help within this thread).

 

Is there any way to rearrange the order of the articles, see Here. I'd like to move News to the top if possible.

 

I also need to change the font (from Times Roman to Verdana) for the 'Published' information, see Here, but I'm not sure how, any ideas?

 

Since installing this contribution when I try using the search function the following error message is displayed:

 

1054 - Unknown column 'p.products_id' in 'on clause'

select count(distinct p.products_id) as total from products p left join manufacturers m using(manufacturers_id), products_description pd left join specials s on p.products_id = s.products_id, categories c, products_to_categories p2c where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and ((pd.products_name like '%mona%' or p.products_model like '%mona%' or m.manufacturers_name like '%mona%') )

[TEP STOP]

 

Any idea's?

Link to comment
Share on other sites

Hmm

 

Updated to 1.5 using WinMerge. Read the "Update 1_5.txt"

 

Updated these files:

 

product_info.php

catalog/articles_info.php

articles_new.php

catalog/articles.php

includes/modules/article_listing.php

language file articles.php: added definition TEXT_ARTICLES

language file articles_new.php: added definition TEXT_ARTICLES

includes/filenames.php

 

But i cannot see any box or wahtever is surposed to be with a product linked to an article??

 

Anyone??

 

Helle :-)

Link to comment
Share on other sites

okay. uploaded the file and now I get on product_info.php:

 

1146 - Table 'onlinekompagnie.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 = '66' and ad.language_id = '4' and a.articles_status = '1' order by a.articles_last_modified

 

[TEP STOP]

 

 

Helle

Link to comment
Share on other sites

Have you modified the database using the file article_manager_sql.txt? It contains the queries to create necessary tables and add configuration parameters.

 

- Rigadin

Link to comment
Share on other sites

Have you modified the database using the file article_manager_sql.txt? It contains the queries to create necessary tables and add configuration parameters.

 

- Rigadin

 

I downloaded and installed version 1.5 same day it was uploaded to the contrib area. Everything appears to be working except the following:

 

I've got the same problem as HelleM except my database name is different of course. I ran the sql file included in version 1.5 twice with no change in the error message at the bottom of each product info page - this is the only place the error messages appear for me. Looks to me like the sql was missing creating a table or something? While I'm getting better at php coding, mysql is over my head java script:emoticon(':)', 'smid_5')

:)

 

Also wanted to clarify the htmlarea editor - I uploaded the entire folder as instructed but I see no new entry for this editor anywhere in the admin, judging by the number of other users who have asked about this it's an area that needs clarification with this contrib. Is this editor the same as that used for entering products in the catalog, because that is the only editor I seem to have with the same page layout and fields, except with article manager entries I have no field where I can upload an image. I see from the htmlarea folder readme file there are instructions for creating this field. I uploaded the htmlarea folder from article manager version 1.4 since it wasn't included in version 1.5.

 

I also lost my shopping cart box on product info pages, it was in the right column. I don't know if I lost it after installing this or not though, I didn't notice until today it was missing. I made no changes to column_left or column_right files as instructed in the install file as I am using infobox admin to control boxes. I have the article boxes on the left side so not sure why anything might be affected on the right?

 

This is truly a fantastic contrib for OsCommerce and all who have contributed deserve big, big thanks!!

Link to comment
Share on other sites

I found a mistake in includes/modules/articles_pxsell.php that gives a mySql error in some cases.

In the query (line 15), the table ARTICLES should in fact be TABLE_ARTICLES. It worked for me but seems that it's not the case for all. Sorry :-"

 

- Rigadin

Link to comment
Share on other sites

It works - the PXSELL update

 

Just remember to put this in your /yourlanguage/product_info.php:

define('TEXT_PXSELL_ARTICLES', 'Article related to this product:');

 

 

 

One I guess small annoying thing - is in the admin when I preview the article, just before hitting the update button.

 

Is there any way to make the preview font size equal to the final output????

 

Helle :-)

Link to comment
Share on other sites

Hello,

 

I have installed the contribution, all seems oke.

 

 

But nothing happens when I press "Cross-Sell Actions" on the add/remove button.

 

question 1

Must I get a list with products?

 

question 2

In what fill can i thiks it?

 

question 3,

Is it posible to put images in the artikel, how?

 

Thanks.

Link to comment
Share on other sites

Hello,

 

I have installed the contribution, all seems oke.

 

 

But nothing happens when I press "Cross-Sell Actions" on the add/remove button.

 

question 1

Must I get a list with products?

 

question 2

In what fill can i thiks it?

 

question 3,

Is it posible to put images in the artikel, how?

 

Thanks.

Link to comment
Share on other sites

Hi rcplace

 

If you already have an editor installed - you should be able to get it to work together med the article manager - I use an older editor Maxi DVD HTML Editor - and that does it. It has image upload etc.

 

Check your install notes again, you must have missed something - The cross sell works fine. I've just updated to Article Manager 1.5 - no problem

 

Helle :-)

Link to comment
Share on other sites

I have verified my install 2 times. Here is my store it is a work in progress so dont mind the mess. The issue that I am having is the articles are not showing up when you click on a link in the right column. If you click on the new articles you can see that there are there but when you click you get this. I dont know where to start. Could anyone please help?

 

Also for some reason it is overridding my stylesheet so that the backround is white not black like the rest of the store

 

Hi SWSchwartz

I found out, that when I updated to HTC 2.6 - and removed the "old" header tag from all articles pages - the my stylesheet incl. background were fine again

 

Hope it can help you

Helle :-)

Link to comment
Share on other sites

Hi SWSchwartz

I found out, that when I updated to HTC 2.6 - and removed the "old" header tag from all articles pages - the my stylesheet incl. background were fine again

 

Hope it can help you

Helle :-)

 

Another little thing -I like your menu tree - which one is it??

Link to comment
Share on other sites

ehhhhh - was a little fast on the reply just before. On the article_info page the link to the product is gone??

Helle :-(

 

ehh, has anybody found out how come the link to the article shows fine under the product_info page, but is gone on the article_info page after updating to 1.5?

 

Helle :blush:

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