Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Article Manager v1.0


Recommended Posts

What is wrong with this code in articles.php:


function tep_show_topic($counter) {
   global $tree, $topics_string, $tPath_array;


It is breaking my page...


I have the following contribs:


- Master Prods

- Customer Testimonials

- Options as Images


Link to comment
Share on other sites

Hello. I am having trouble getting subtopics to show. I saw that "Bravejoey" was having the same problem, but didn't see anyone reply. Does anyone know how to fix it?



Upon second look, I see that the subtopics are showing in the info box, but is there a way to display them in the "main screen"?

Edited by aldaffodil
Link to comment
Share on other sites

Ok, I figured it out. Here is the solution for getting subtopics to show in case someone else runs into the same problem.


In catalog>articles.php, after:


 ? ?} 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 td.topics_name");
? ?}




 ? ?$number_of_topics = tep_db_num_rows($topics_query);

? ?$rows = 0;
? ?while ($topics = tep_db_fetch_array($topics_query)) {
? ? ?$rows++;
? ? ?$tPath_new = tep_get_topic_path($topics['topics_id']);
? ? ?$width = (int)(100 / 3) . '%';
? ? ?echo ' ? ? ? ? ? ? ? ?<td align="center" class="main" width="' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $tPath_new) . '">'. '<br>' . $topics['topics_name'] . '</a></td>' . "\n";
? ? ?if ((($rows / 3) == floor($rows / 3)) && ($rows != $number_of_topics)) {
? ? ? ?echo ' ? ? ? ? ? ? ?</tr>' . "\n";
? ? ? ?echo ' ? ? ? ? ? ? ?<tr>' . "\n";
? ? ?}
? ?}


Were you see a 3 , such as 100/3, the three represents the MAX_DISPLAY_CATEGORIES_PER_ROW, so set this to however many topics you want displayed per row. I couldn't figure out where to set it, so I just hard coded it. (May the osCommerce Gods strike me down)

Edited by aldaffodil
Link to comment
Share on other sites

nice little fix, but a couple of things I came across while installing it.


1) MAX_DISPLAY_CATEGORIES_PER_ROW is set in the admin area of your shopping cart look in the admin area using these steps: admin > configuration > Maximum values > click "Categories To List Per Row"


2) FILENAME_DEFAULT should be FILENAME_ARTICLES, otherwise you get the index.php instead of the articles.php


3) still doesn't show sub categories if there are articles in the main category. This is also a problem with product categories. I use the ShowSubcatandProducts contribution for my product categories and I adapted it for the article manager if anyone is interested in showing both articles and topics within their main article categories.

Link to comment
Share on other sites



I have found that it's not possible to put forms on a page in article manager.

The code goes in fine, the problem is the preview page. When you confirm that you want to save the article, nothing happens. I guess it's becuase my form is somehow disabling the article preview buttons.


I am confident that my form is coded correctly (<FORM></FORM> etc).


Any suggestions?

Many Thanks,



Link to comment
Share on other sites

  • 2 weeks later...

Any ideas on why the Articles Manager admin editor won't save text in Japanese? Even if I enter English in the Japanese editor fields, it just disappears into the void on saving... The admin editor works fine for Traditional Chinese, and I can enter Japanese directly into the articles_description and topics_description database tables. No doubt this is related to the Japanese language pack being adapted from MS1, but I wonder where to start poking around for a fix.

"Buy the ticket, take the ride..." -HST

Link to comment
Share on other sites

Japanese language definitions for Article Manager--translated by an associate in Japan. (You'll need to drop these into the appropriate language files.)


// Article Manager

define('BOX_HEADING_ARTICLES', '????');

define('BOX_ALL_ARTICLES', '???٤Ƥε???');

define????('BOX_NEW_ARTICLES', '??????????');

define('TEXT_DISPLAY_NUMBER_OF_ARTICLES', '<b>%d</b> ??

<b>%d</b> (of <b>%d</b> ????)??ɽ????');


<b>%d</b> (of <b>%d</b> ??????????)')??ɽ????;

define('TABLE_HEADING_AUTHOR', '????');

define('TABLE_HEADING_ABSTRACT', '????');

define('BOX_HEADING_AUTHORS', '???Ԥˤ??뵭??');

define('NAVBAR_TITLE_DEFAULT', '????');


define('HEADING_ARTICLE_NOT_FOUND', '?????????Ĥ????ޤ???');

define('TEXT_ARTICLE_NOT_FOUND', '?׵??ε??????ܥ????ȤǤϤ??褦?Ǥ??ޤ?????');

define('TEXT_MORE_INFORMATION', '?ܺ٤Ϥ??ε??????????Ȳ??????? <a href="%s" target="_blank"><u>web page</u></a>.');

define('TEXT_DATE_ADDED', '???ε?????%s??ȯ?Ԥ????ޤ???');

define('TEXT_DATE_AVAILABLE', '<font color="#FF0000">???ε?????%s??ȯ?Ԥ????ޤ???</font>');

define('TEXT_BY', 'by ');

define('TEXT_CURRENT_REVIEWS', '???ߤΥ??ӥ塼:');

define('BOX_TEXT_TELL_A_FRIEND', 'ͧ?ͤ˾Ҳ????롣');

define('TEXT_TELL_A_FRIEND', '???ε?????ͧ?ͤ˾Ҳ?????:');

define('TEXT_XSELL_ARTICLES', '???ε????˴?Ϣ????????:');


define('HEADING_TITLE', '???ӥ塼 ');

define('NAVBAR_TITLE', '???ӥ塼');

define('TEXT_NO_ARTICLE_REVIEWS', '???ߡ????ε??????Ф??????ӥ塼?Ϥ????ޤ?????');

define('TEXT_OF_5_STARS', '5????????%s ');

define('TEXT_REVIEW_VIEWS', '?ɤ???????: ');

define('TEXT_READ_REVIEW', '???ӥ塼???ɤ?...');


define('NAVBAR_TITLE', '???ӥ塼');

define('HEADING_TITLE', '???ӥ塼 ');

define('SUB_TITLE_ARTICLE', '????:');

define('SUB_TITLE_FROM', '?м?:');

define('SUB_TITLE_DATE', '????:');

define('SUB_TITLE_REVIEW', '???ӥ塼:');

define('SUB_TITLE_RATING', '?졼??:');

define('TEXT_OF_5_STARS', ' 5 ????????%s');


define('NAVBAR_TITLE', '???ӥ塼');

define('HEADING_TITLE', '?Υ??ӥ塼?????? \'');

define('SUB_TITLE_FROM', '?м?:');

define('SUB_TITLE_REVIEW', '???ʤ??Υ??ӥ塼:');

define('SUB_TITLE_RATING', '?졼??:');

define('TEXT_APPROVAL_WARNING', 'Note: ???ʤ??Υ??ӥ塼?Ͼ?ǧ????ɽ???????ޤ?');

define('TEXT_BAD', '<small><font


define('TEXT_GOOD', '<small><font



define('TABLE_HEADING_NEW_ARTICLES', '%s???ο?????????');

if ( ($topic_depth == 'articles') || (isset($HTTP_GET_VARS['authors_id'])) ) {

define('HEADING_TITLE', $topics['topics_name']);

define('TABLE_HEADING_ARTICLES', '????');

define('TABLE_HEADING_AUTHOR', '????');

define('TEXT_NO_ARTICLES', '???Υȥԥå??ˤϵ??????????ޤ?????');

define('TEXT_NO_ARTICLES2', '???????Ԥ????ѤǤ??뵭???Ϥ????ޤ?????');

define('TEXT_NUMBER_OF_ARTICLES', '??????: ');

define('TEXT_SHOW', 'ɽ??:');

define('TEXT_NOW', '\' ????');

define('TEXT_ALL_TOPICS', '???ȥԥå?');

define('TEXT_ALL_AUTHORS', '??????');

define('TEXT_ARTICLES_BY', '?ˤ??뵭?? ');

define('TEXT_ARTICLES', '?????ε????ꥹ?ȤǤϺǿ??Τ??Τۤɾ??̤˼??????Ƥ??ޤ???');

define('TEXT_DATE_ADDED', '????:');

define('TEXT_AUTHOR', '????:');

define('TEXT_TOPIC', '?ȥԥå?:');

define('TEXT_BY', '?ˤ???');

define('TEXT_READ_MORE', '?ܺ٤?...');

define('TEXT_MORE_INFORMATION', '?ܺ٤Ϥ??????Ԥ? <a href="http://%s" target="_blank">web ?????Ȥ??Ʋ?????</a>.');

} elseif ($topic_depth == '?ȥå?') {

define('HEADING_TITLE', '???٤Ƥε???');

define('TEXT_ALL_ARTICLES', '???٤Ƥε????Υꥹ?ȤǤ????ǿ??Τ??Τ???????ɽ?????ޤ???');

define('TEXT_CURRENT_ARTICLES', '???ߤε???');

define('TEXT_UPCOMING_ARTICLES', '???٤ε???');

define('TEXT_NO_ARTICLES', '?ꥹ?Ȥ??뵭???Ϥ????ޤ?????');

define('TEXT_DATE_ADDED', 'ȯ??:');

define('TEXT_DATE_EXPECTED', 'ͽ??:');

define('TEXT_AUTHOR', '????:');

define('TEXT_TOPIC', '?ȥԥå?:');

define('TEXT_BY', '?ˤ???');

define('TEXT_READ_MORE', '???????ɤ?...');

} elseif ($topic_depth == '?ͥ??ƥå?') {

define('HEADING_TITLE', '????');


define('NAVBAR_TITLE', '??????????');

define('HEADING_TITLE', '??????????');

define('TEXT_NEW_ARTICLES', '???ε????????? %s ???˲ä??????ޤ?????');

define('TEXT_NO_NEW_ARTICLES', '???? %s ???֤˲ä????줿?????Ϥ????ޤ?????');

define('TEXT_DATE_ADDED', 'ȯ??:');

define('TEXT_AUTHOR', '????:');

define('TEXT_TOPIC', '?ȥԥå?:');

define('TEXT_BY', '?ˤ???');

define('TEXT_READ_MORE', '???????ɤ?');

"Buy the ticket, take the ride..." -HST

Link to comment
Share on other sites

Oops, a couple of mistakes above.


define('BOX_NEW_ARTICLES', '??????????');


And of course we shouldn't have translated the elseif statements!


} elseif ($topic_depth == 'top') {


} elseif ($topic_depth == 'nested') {



Edited by bglkk

"Buy the ticket, take the ride..." -HST

Link to comment
Share on other sites

3) still doesn't show sub categories if there are articles in the main category. This is also a problem with product categories. I use the ShowSubcatandProducts contribution for my product categories and I adapted it for the article manager if anyone is interested in showing both articles and topics within their main article categories.

Could you share this fix with us ?


I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!


Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Hi all.


I recall that, earlier on, someone else was having the SAME problem I'm having...



My PREV || NEXT page navigation links don't show up to go to the next page of articles.



Anyone got any ideas????



I have had the same problem and it appeared to be a bug in the 1.2 release. The sql query applied during installation included a PREV_NEXT_BAR_LOCATION configuration key while all files refer to ARTICLE_PREV_NEXT_BAR_LOCATION when checking if showing "split into pages" tab is needed.


I have corrected the typo and released it as 1.2b version in the contribution area (check it out at http://www.oscommerce.com/community/contributions,1709).


If you already have Article Manager installed you only need to change one record in the configuration table (e.g. using phpmyadmin).

Link to comment
Share on other sites

I have completed the install, and for the most part it seems to be working. Except...


The Admin end seems to work fine, articles are added to the database.


The front end (Catalog) shows the article box, AND the article categories that I have added. BUT under "New Articles" and "All Articles" AND when you go to the category itself, there are NO articles.


Again, I have confirmed that the tables contain the meta data for the articles, though I can not find the atricle text itself...


Any ideas?

Link to comment
Share on other sites

How Can I split one article into multiple pages ??


I good idea would be to split it into PARTS.




Your Article - Part One

Your Article - Part Two


etc, etc...



Link to comment
Share on other sites

i read the all 17 pages ...


please guys begin your post by :




- BUG ?!



not in capitals


cause it's such a mess ....


i worked with strider on the Browse by Categories and i think it would be a good idea to try to use it and hack it for article manager cause it allows several way of showing main category ( topics) and sub categoryes ( sub topics or even articles)


but the tings is the contribution is based around an image for the categories , taht mean for the topic and even the sub topic

i understand that rob didnt implement taht because i thinks about using html area to deal with images but ... i think we could like in product or category pages choose an image that would be shown in top right or left of the page , maybe on the same line of the title of the topic or article ...


i think people should take the best of article content manger contribution to add it to this article manager one ...


also here are my request :


REQ 1 : salvo please release your code and instruction to add an image to artcile or topic to the contribution download area except if rob is willing to add them and release a new version


REQ 2 : very important is to be able to give a sort order to topic and article


REQ 3 : being able to activate or desactivate the topics , since we can only do it to articles .


Sugestions : we should also try to find different way to show artivles in the infoboxes : dropdown, or full tree with topic and subtopic with/without articles , and even javascript or dhtml .. if anyone want to have javascript code to take as exemple i can provide different script like http://www.softcomplex.com/products/tigra_tree_menu_pro/


end note : seems to me taht rob did a nice piece of work and people should give a hand and not hesitate to post their work even if not finished to get some help here ! rob cannot do all alone ... ill try to help for the Browse by Categories hack ..


Link to comment
Share on other sites

I know this problem has been discussed here before, but I wasn't able to find the solution. I've installed the contribution and everything seems to work correctly on the admin side - I can add authors and articles and topics, and they get written to the database as they should. Unfortunately, if an article is on the "top" level, it doesn't display in /catalog/articles.php. If I move the same article into a Topic, it displays just fine. Anyone know what I've done wrong?


Thanks in advance,



P.S. - This contribution is excellent - it made my job a lot easier. Thanks for the great work.

Link to comment
Share on other sites

You're right, it must be in a category to show up. But I've just realised...this is good news!!! :D :D :D


I wanted to create articles that didn't show up in the article manager (additional product info, links from elsewhere, hidden pages accessible only from affiliate schemes etc...). Now I can! Create them at the root level, and you can link to it, but it doesn't show up anywhere else. It's not in new articles, or articles by author either.


Here's my test, check it out, then look by author etc... to see.


Hidden Article link

Many Thanks,



Link to comment
Share on other sites

Well, that certainly explains it! Thanks MikeyJ and Devink. I'm glad I didn't spend too long trying to find my mistake! The funny thing is I always planned to have topics anyway.


Thanks again!



Link to comment
Share on other sites

Another (hopefully minor) problem has cropped up. When I try to use the admin tool for cross-selling in articles, I get a parse error on line 258 of articles_xsell.php. I saw that Donrob posted about this a while back, but I didn't see a solution posted anywhere. Has anyone run into this problem? More importantly, does anyone know how I can fix it? I didn't make any changes to articles_xsell.php.





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.

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