Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Article Manager v1.0


RobAnderson

Recommended Posts

My eyes are falling out from reading all this, but stil no answer to my problem.

 

I have the latest OSC, STS and HTC installed. Everythig works perfectly. Now, I installed the latest article manager and it doesn't work. I added an article, it shows in articles box but when I click the link I get a page without header and footer, no styles and an error below:

 

Fatal error: Call to undefined function: clean_html_comments() in /home/shop/public_html/articles.php on line 350

 

If I add require(DIR_WS_FUNCTIONS . 'clean_html_comments.php'); to my application_top, the only thing I get is:

 

Fatal error: Cannot redeclare clean_html_comments() (previously declared in /home/shop/public_html/includes/functions/clean_html_comments.php:13) in /home/shop/public_html/includes/functions/clean_html_comments.php on line 13

 

I tried every solution described in this and other posts, but no luck.

 

Any ideas? :rolleyes:

 

Thanks

Link to comment
Share on other sites

gv, is it a sequence thing? I don't know the order in which PHP works, but maybe you are calling a function before the program knows it exists. That would explain why you can't call it, and you can't add it.

 

 

My eyes are falling out from reading all this, but stil no answer to my problem.

 

I have the latest OSC, STS and HTC installed. Everythig works perfectly. Now, I installed the latest article manager and it doesn't work. I added an article, it shows in articles box but when I click the link I get a page without header and footer, no styles and an error below:

 

Fatal error: Call to undefined function: clean_html_comments() in /home/shop/public_html/articles.php on line 350

 

If I add require(DIR_WS_FUNCTIONS . 'clean_html_comments.php'); to my application_top, the only thing I get is:

 

Fatal error: Cannot redeclare clean_html_comments() (previously declared in /home/shop/public_html/includes/functions/clean_html_comments.php:13) in /home/shop/public_html/includes/functions/clean_html_comments.php on line 13

 

I tried every solution described in this and other posts, but no luck.

 

Any ideas?  :rolleyes:

 

Thanks

Many Thanks,

 

Steve

Link to comment
Share on other sites

Hi

 

Does anyone have ideas how to limit the amount of articles per page in each topic folder and also the articles_xsell.php page within admin?

 

I've tried using code taken from the catalog/articles.php file but without any luck, I have 10000+ articles and it's causing problems especially when trying to view the cross-sell page as it's loading every article!

 

I also just found this contribution for paging the products in admin:

http://www.oscommerce.com/community/contributions,1965

I thought I'd include this incase someone is willing to help and maybe use some of the code, as I have no idea where to begin..

 

Any help would be much appreciated.

 

Thanks

Neil

Link to comment
Share on other sites

Hi - I've installed Article Manager and it works great, apart from one thing.

 

I have uploaded 21 articles into the first topic, yet the article list has no prev/next bar and refuses to display more than ten. I have amended the database record in the configuration table as described in post 163 (page 9 of this thread) and this made no difference. I then figured that if I changed the Maximum Articles Per Page from 10 to 30, I'd at least have the time it takes to write nine more articles to try to sort it out, but it will still display no more than the ten most recent additions.

 

Can anybody shed any light on what's going wrong here? This contribution is amazing and I feel like it could almost have been made for me - I'd like to get it working as it's meant to be.

 

Thanks.

Link to comment
Share on other sites

I am getting the following when I click on Authors:

 

Authors

 

Authors Action

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 '-20, 20' at line 1

 

select authors_id, authors_name, date_added, last_modified from authors order by authors_name limit -20, 20

 

[TEP STOP]

Link to comment
Share on other sites

I have uploaded 21 articles into the first topic, yet the article list has no prev/next bar and refuses to display more than ten. I have amended the database record in the configuration table as described in post 163 (page 9 of this thread) and this made no difference. I then figured that if I changed the Maximum Articles Per Page from 10 to 30, I'd at least have the time it takes to write nine more articles to try to sort it out, but it will still display no more than the ten most recent additions.

 

I'm not quite sure what's going on, but it sounds like you should modify the configuration option "Maximum New Articles Per Page", instead of/as well as "Maximum Articles Per Page". Also (this may sound silly) did you make that modification directly in your database, e.g. through PHPMyAdmin? You know you have an easy-to-use configuration page at http://www.YOURSITE.com/catalog/admin/arti...ed_box=articles ? (2nd link down, in the Admin area)

Link to comment
Share on other sites

MOD TO ALLOW DIRECT LINKS TO ARTICLES FROM TOP LEVEL

 

Many people have asked how they can link to articles directly from the top level, rather than put them into topics and sub-topics which require the customer to click twice to get to the actual article text. I've seen various solutions suggested and used, some of which involve substantial modifications to the original code. This mod addresses that need, and has the advantage of only making one small modificiation to the info-box file, so you can easily take advantage of future updates.

 

One interesting use for Article Manager with this mod, is as a replacement for the standard "Information" info-box (Shipping & Returns, Privacy, Contact Us, etc). This lets you more easily add to the original 4 categories, in a way that may be more natural to your customers who don't need to visually hunt through two arbitrary categories to look for a subject that interests them.

 

To use: Create a topic with the name you want to appear in the info-box. Create an article (probably with the same name) inside that topic. The info-box link will now point to that article. If you later decide to create a 2nd article within the topic, the link reverts to the article list as normal.

 

The mod is available at http://www.oscommerce.com/community/contributions,1709

 

(You would not believe how long it took me to to solve this with a couple of lines of code!) Thanks to everyone who has contributed to Article Manager and to this thread :thumbsup:

Link to comment
Share on other sites

I think I've messed up somewhere. I'm getting this on the articles list (articles.php?tpath=3) page:

 

 

 

Free Downloads

 

Please feel free to download and use anything that appears in the free downloads section. All I ask is that you do not redistribute and that you credit me and provide a link back. Thanks and enjoy!

 

Displaying 1 to 1 (of 1 articles) Result Pages: 1

 

TEXT_ARTICLES

 

Photoshop Brushes TEXT_TOPIC Downloads

 

Brushes TEXT_DATE_ADDED Saturday 26 February, 2005

 

Displaying 1 to 1 (of 1 articles) Result Pages: 1

 

 

 

 

Where have I slipped up?

 

Sarah.

Link to comment
Share on other sites

I think I've messed up somewhere. I'm getting this on the articles list (articles.php?tpath=3) page:

Free Downloads 

 

Please feel free to download and use anything that appears in the free downloads section. All I ask is that you do not redistribute and that you credit me and provide a link back. Thanks and enjoy!

 

Displaying 1 to 1 (of 1 articles) Result Pages:  1 

 

TEXT_ARTICLES

 

Photoshop Brushes  TEXT_TOPIC Downloads

 

Brushes TEXT_DATE_ADDED Saturday 26 February, 2005

 

Displaying 1 to 1 (of 1 articles) Result Pages:  1 

Where have I slipped up?

 

Sarah.

 

Those CAPS refer to text strings that are usually found in this file: catalog\includes\languages\english . Can you check that file and see if the entries for those strings are somehow blank? Maybe you've switched to a non-English language that isn't fully translated?

 

Also you might find it useful to know that the latter two are switched on/off in the Admin configuration page:

Display Topic in Article Listing

Display Date Added in Article Listing

 

The code that makes all three display is found in

catalog\includes\modules\article_listing.php , just search for the CAPS text. You could even put /*comment marks*/ around each line of the code to make them disappear, but I'm not suggesting that's a proper solution.

Link to comment
Share on other sites

Those CAPS refer to text strings that are usually found in this file: catalog\includes\languages\english . Can you check that file and see if the entries for those strings are somehow blank? Maybe you've switched to a non-English language that isn't fully translated?

 

Also you might find it useful to know that the latter two are switched on/off in the Admin configuration page:

Display Topic in Article Listing

Display Date Added in Article Listing

 

The code that makes all three display is found in

catalog\includes\modules\article_listing.php , just search for the CAPS text. You could even put /*comment marks*/ around each line of the code to make them disappear, but I'm not suggesting that's a proper solution.

 

Thanks for that, I think I see how it works, but that makes me think something is wrong. I've found the relevant TEXT_TOPIC, TEXT_ARTICLES etc in catalog\includes\languages\english\articles.php and the code has a conditional like this:

 

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

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

define('TABLE_HEADING_ARTICLES', 'Articles');

define('TABLE_HEADING_AUTHOR', 'Author');

define('TEXT_NO_ARTICLES', 'There are currently no articles in this topic.');

define('TEXT_NO_ARTICLES2', 'There are currently no articles available from this author.');

define('TEXT_NUMBER_OF_ARTICLES', 'Number of Articles: ');

define('TEXT_SHOW', 'Display:');

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

define('TEXT_ALL_TOPICS', 'All Topics');

define('TEXT_ALL_AUTHORS', 'All Authors');

define('TEXT_ARTICLES_BY', 'Articles by ');

define('TEXT_ARTICLES', 'Below is a list of articles with the most recent ones listed first.');

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

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

define('TEXT_TOPIC', 'Topic:');

define('TEXT_BY', 'by');

define('TEXT_READ_MORE', 'Read More...');

define('TEXT_MORE_INFORMATION', 'For more information, please visit this authors <a href="http://%s" target="_blank">web page</a>.');

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

define('HEADING_TITLE', 'All Articles');

define('TEXT_ALL_ARTICLES', 'Below is a list of all articles with the most recent ones listed first.');

define('TEXT_CURRENT_ARTICLES', 'Current Articles');

define('TEXT_UPCOMING_ARTICLES', 'Upcoming Articles');

define('TEXT_NO_ARTICLES', 'There are currently no articles listed.');

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

define('TEXT_DATE_EXPECTED', 'Expected:');

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

define('TEXT_TOPIC', 'Topic:');

define('TEXT_BY', 'by');

define('TEXT_READ_MORE', 'Read More...');

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

define('HEADING_TITLE', 'Articles');

}

 

 

So I don't know what's going on. As an example let's take (from my sample text in the previous post). Why is it displaying both the define text and the actual text? The store I have designed has topics i.e. Downloads with articles inside in this case 'Brushes'. I'm not sure what the conditional looks for.

 

Brushes TEXT_DATE_ADDED Saturday 26 February, 2005

 

Help here would be much appriciated ! thanks. Sarah

Link to comment
Share on other sites

So I don't know what's going on. As an example let's take (from my sample text in the previous post). Why is it displaying both the define text and the actual text? The store I have designed has topics i.e. Downloads with articles inside in this case 'Brushes'. I'm not sure what the conditional looks for.

 

Brushes TEXT_DATE_ADDED Saturday 26 February, 2005

 

If your example was working correctly, it would look like this

Below is a list of articles with the most recent ones listed first.

 

Photoshop Brushes  Topic: Downloads

 

Brushes Published: Saturday 26 February, 2005

 

Displaying 1 to 1 (of 1 articles) Result Pages:  1

 

(By the way I'm assuming that the spacing shown is just the effect of pasting it here, and that it's aligned normally when it displays in your browser.)

So it isn't "displaying both the define text and the actual text", it's just that the define label appears, rather than its value. Don't worry too much about the rather strange conditional, you're in the $topic_depth == 'articles' branch. But I still can't tell you why it's happening, since your language file looks just like mine. Ummm, and if it couldn't access that language file I'm pretty sure it would give you that annoying T VALUE error message instead.

 

In your article_listing.php, can you check the code that displays these lines? E.g. for TEXT_ARTICLES at about lines 35-42, it should look like this:

 

?>
     <tr>
       <td class="main"><?php echo TEXT_ARTICLES; ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php

 

If you reply, it would be helpful to know what you were doing immediately before this problem started. Did you just install Article Manager? Did you make any changes to the code, if so, where? Directly in the database? Editing existing article/topic text? Inserting a new article in a previously working topic?

Link to comment
Share on other sites

Has anyone gotten their "Cross-Sell Articles to Products" working yet? I can't :(.

 

I am in the Admin section. I click on Cross-Sell Articles. This loads the page /admin/articles_xsell.php. On this page, it lists all my articles, with columns of ID, Article Name, Associated Products, Cross-sell Actions, and a blank column.

 

For each record, the ID shows, the name shows, and default text/link of "Add/Remove" shows in Cross-sell actions. Obviously Associated Products is blank (--) cuz I cant get it to work yet. And the last column also has a (--) and I have no idea what that is suppose to be anyway...

 

So I find an article in the list, and click on the Add/Remove link, let's say with Article ID 40. This loads /admin/articles_xsell.php?add_related_article_ID=40. The page lists now a column of check-boxes, Product IDs, & Product names. So I find the product I want to associate with the article ID 40 & select the checkbox.

 

There are two form buttons - Save & Cancel. I click on Save. It then RE-loads the exact same page.../admin/articles_xsell.php?add_related_article_ID=40...Nothing happens..

 

I do check the site however, and there is no cross-sell happening at the bottom of the article...

 

Any ideas?

Link to comment
Share on other sites

I'm not quite sure what's going on, but it sounds like you should modify the configuration option "Maximum New Articles Per Page", instead of/as well as "Maximum Articles Per Page". Also (this may sound silly) did you make that modification directly in your database, e.g. through PHPMyAdmin? You know you have an easy-to-use configuration page at http://www.YOURSITE.com/catalog/admin/arti...ed_box=articles ? (2nd link down, in the Admin area)

 

I modified the settings using various combinations/ permutations in the configuration page (thanks, I knew it was there), but still can't get it to display more than ten. That doesn't matter to me now, because my 'previous/next' links are now working.

 

I looked directly into the database and found two lines with references to 'for/next'. Using my usual highly scientific methods ('Eeny, meeny, miney, mo, one of these is going to go...'), I took a stab in the dark and deleted one. My article listings suddenly had a for/next link. Lovely. But my catalog pages didn't. Oops. I reinstated what I'd deleted, and the for/next link was back in my catalog pages. Weirdly, it was still there in my article listings too. I don't understand that, but I'm certainly not complaining about it : )

 

Next up, I decided I'd install the latest addition to Article Manager - 'MOD TO ALLOW DIRECT LINKS TO ARTICLES FROM TOP LEVEL', as I have a couple of uses in mind for this. I'm pretty sure I followed the instructions exactly, but the menu links in my Articles box became URLs instead. I uninstalled it then tried again later, with the same result. I'm hoping you can shed some light on this, as I think my 'accidentally delete something vital, then hurriedly reinstate it' method is only going to work once for me : )

Link to comment
Share on other sites

Next up, I decided I'd install the latest addition to Article Manager - 'MOD TO ALLOW DIRECT LINKS TO ARTICLES FROM TOP LEVEL', as I have a couple of uses in mind for this. I'm pretty sure I followed the instructions exactly, but the menu links in my Articles box became URLs instead. I uninstalled it then tried again later, with the same result. I'm hoping you can shed some light on this, as I think my 'accidentally delete something vital, then hurriedly reinstate it' method is only going to work once for me : )

 

First question: before installing, did you have any topics-with-only-one-article? If you don't, please create this situation from your articles admin section, and see how that topic appears in the infobox.

 

I've tried breaking the contribution code in various ways. One thing that results in something like you describe is at either line starting with

 

$topics_string .= tep_href_link(.....etc

 

If the fullstop/period/dot is missing, the effect is to get a URL in the Articles box. But I can't imagine how that would happen by accident.

 

Together with your previous mysteries, I'm beginning to wonder if you have a more general problem. I don't really know where this might be; perhaps you could start by checking the definitions for some general functions used in the latest mod. Compare your current versions of these against freshly downloaded versions of these files:

 

In catalog/includes/functions/database.php

function tep_db_query()

function tep_db_fetch_array()

 

In catalog/includes/functions/html_output.php

function tep_href_link()

 

But that's really a bit of a stab in the dark for me...

Link to comment
Share on other sites

Is anyone has Article Manager installed with BTS (Basic Template System)? Cause at my setup it messes up my whole website and when I click at the articles.php file it redirects me to the simple Template that OSC comes with...

 

Any suggestions?

Edited by Z3RatuL

There's a diference between living & BEING ALIVE!

Link to comment
Share on other sites

Just a small message from me about this great contrib!

Since I did not read the whole thread it might be mentioned before, but the thing is that I got soms SQL errors in de the author and review pages in the admin section.

 

In wanted to add an author when I recieved the error. I didn't had any authors in my database yet, so my guess is that the split page function messes up the contrib when the authors table is empty.

I tried several options, first one was to comment the line where the split pages function is used. This made my error go away, but I wasn't able to create (insert) a new author.

So i just entered one author directly in the authors table in the mysql command line. This solved my problems immediately. I did the same for the reviews and It works fine now!

 

It might help some of you :)

Link to comment
Share on other sites

I have installed Article Manager in CRE Loaded and everything is working great except that I cannot get the boxes in the left column to display correctly. I used Infobox Admin to create the box. Has anyone installed this contribution in loaded and can you tell me how to create the box so that it displays correctly? Thanks.

Link to comment
Share on other sites

  • 2 weeks later...

would anyone happen to know what i'd need to do to get rid of this warning message.

 

 

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/user1110/public_html/Cart/includes/filenames.php:74) in /home/user1110/public_html/Cart/includes/functions/sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/user110/public_html/Cart/includes/filenames.php:74) in /home/user1110/public_html/Cart/includes/functions/sessions.php on line 67

 

 

 

 

cause it's totally beyond me.

Also the last step in the Readme.text says that I've got to

 

 

 

 

Open catalog/includes/languages/english/article_header_tags.php

 

IF YOU DO have the Header Tags Controller contribution installed:

 

- Replicate the global details from header_tags.php into the indented section at the top of the page, e.g. site e-mail address, title, keywords and description.

 

 

IF YOU DO NOT have the Header Tags Controller contribution installed:

 

- Complete the global details in the indented section at the top of the page, e.g. site e-mail address, title, keywords and description.

 

--------------------------------------------------------------------------

/**** SPANISH TRADUCTION START ****/

Open catalog/includes/languages/espanol/article_header_tags.php

 

IF YOU DO have the Header Tags Controller contribution installed:

 

- Replicate the global details from header_tags.php into the indented section at the top of the page, e.g. site e-mail address, title, keywords and description.

 

 

IF YOU DO NOT have the Header Tags Controller contribution installed:

 

- Complete the global details in the indented section at the top of the page, e.g. site e-mail address, title, keywords and description.

 

/**** SPANISH TRADUCTION END ****/

 

 

 

 

 

Does the fact that I have no clue what that means have anything to do with the Warning message I'm getting? I know that I don't have "Header Tags Controller contributions" installed. I have just a plain ole OSC uploaded without any modifications. Haven't even gone into the admin side to customize content and preferences in any way.

 

Everything was so super-easy till I got to the final step and now--I'm stumped. Can anyone help? Please...

Link to comment
Share on other sites

I have installed Article Manager in CRE Loaded and everything is working great except that I cannot get the boxes in the left column to display correctly. I used Infobox Admin to create the box. Has anyone installed this contribution in loaded and can you tell me how to create the box so that it displays correctly? Thanks.

 

 

Richard,

I finally found the solution to this problem myself. Here are the updated versions of the articles box and the authors box.

 

<?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
*/

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

   for ($i=0; $i<$tree[$counter]['level']; $i++) {
     $topics_string .= "  ";
   }

   $topics_string .= '<a href="';

   if ($tree[$counter]['parent'] == 0) {
     $tPath_new = 'tPath=' . $counter;
   } else {
     $tPath_new = 'tPath=' . $tree[$counter]['path'];
   }

   $topics_string .= tep_href_link(FILENAME_ARTICLES, $tPath_new) . '">';

   if (isset($tPath_array) && in_array($counter, $tPath_array)) {
     $topics_string .= '<b>';
   }

// display topic name
   $topics_string .= $tree[$counter]['name'];

   if (isset($tPath_array) && in_array($counter, $tPath_array)) {
     $topics_string .= '</b>';
   }

   if (tep_has_topic_subtopics($counter)) {
     $topics_string .= ' ->';
   }

   $topics_string .= '</a>';

   if (SHOW_ARTICLE_COUNTS == 'true') {
     $articles_in_topic = tep_count_articles_in_topic($counter);
     if ($articles_in_topic > 0) {
       $topics_string .= ' (' . $articles_in_topic . ')';
     }
   }

   $topics_string .= '<br>';

   if ($tree[$counter]['next_id'] != false) {
     tep_show_topic($tree[$counter]['next_id']);
   }
 }
?>
<!-- topics //-->
         <tr>
           <td>
<?php
 $info_box_contents = array();
//  $info_box_contents[] = array('text' => BOX_HEADING_ARTICLES);
   $info_box_contents[] = array('text'  => '<font color="' . $font_color . '">' . BOX_HEADING_ARTICLES . '</font>');

 new infoBoxHeading($info_box_contents, false, false);

 $topics_string = '';
 $tree = array();

 $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 = '0' and t.topics_id = td.topics_id and td.language_id = '" . (int)$languages_id . "' order by sort_order, td.topics_name");
 while ($topics = tep_db_fetch_array($topics_query))  {
   $tree[$topics['topics_id']] = array('name' => $topics['topics_name'],
                                       'parent' => $topics['parent_id'],
                                       'level' => 0,
                                       'path' => $topics['topics_id'],
                                       'next_id' => false);

   if (isset($parent_id)) {
     $tree[$parent_id]['next_id'] = $topics['topics_id'];
   }

   $parent_id = $topics['topics_id'];

   if (!isset($first_topic_element)) {
     $first_topic_element = $topics['topics_id'];
   }
 }

 //------------------------
 if (tep_not_null($tPath)) {
   $new_path = '';
   reset($tPath_array);
   while (list($key, $value) = each($tPath_array)) {
     unset($parent_id);
     unset($first_id);
     $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)$value . "' and t.topics_id = td.topics_id and td.language_id = '" . (int)$languages_id . "' order by sort_order, td.topics_name");
     if (tep_db_num_rows($topics_query)) {
       $new_path .= $value;
       while ($row = tep_db_fetch_array($topics_query)) {
         $tree[$row['topics_id']] = array('name' => $row['topics_name'],
                                          'parent' => $row['parent_id'],
                                          'level' => $key+1,
                                          'path' => $new_path . '_' . $row['topics_id'],
                                          'next_id' => false);

         if (isset($parent_id)) {
           $tree[$parent_id]['next_id'] = $row['topics_id'];
         }

         $parent_id = $row['topics_id'];

         if (!isset($first_id)) {
           $first_id = $row['topics_id'];
         }

         $last_id = $row['topics_id'];
       }
       $tree[$last_id]['next_id'] = $tree[$value]['next_id'];
       $tree[$value]['next_id'] = $first_id;
       $new_path .= '_';
     } else {
       break;
     }
   }
 }
 tep_show_topic($first_topic_element);

 $info_box_contents = array();
 $new_articles_string = '';
 $all_articles_string = '';

 if (DISPLAY_NEW_ARTICLES=='true') {
   if (SHOW_ARTICLE_COUNTS == 'true') {
     $articles_new_query = tep_db_query("select a.articles_id 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)");
     $articles_new_count = ' (' . tep_db_num_rows($articles_new_query) . ')';
   } else {
     $articles_new_count = '';
   }

   if (strstr($_SERVER['PHP_SELF'],FILENAME_ARTICLES_NEW) or strstr($PHP_SELF,FILENAME_ARTICLES_NEW)) {
     $new_articles_string = '<b>';
   }

   $new_articles_string .= '<a href="' . tep_href_link(FILENAME_ARTICLES_NEW, '', 'NONSSL') . '">' . BOX_NEW_ARTICLES . '</a>';

   if (strstr($_SERVER['PHP_SELF'],FILENAME_ARTICLES_NEW) or strstr($PHP_SELF,FILENAME_ARTICLES_NEW)) {
     $new_articles_string .= '</b>';
   }

   $new_articles_string .= $articles_new_count . '<br>';

 }

 if (DISPLAY_ALL_ARTICLES=='true') {
   if (SHOW_ARTICLE_COUNTS == 'true') {
     $articles_all_query = tep_db_query("select a.articles_id 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 . "'");
     $articles_all_count = ' (' . tep_db_num_rows($articles_all_query) . ')';
   } else {
     $articles_all_count = '';
   }

   if ($topic_depth == 'top') {
     $all_articles_string = '<b>';
   }

   $all_articles_string .= '<a href="' . tep_href_link(FILENAME_ARTICLES, '', 'NONSSL') . '">' . BOX_ALL_ARTICLES . '</a>';

   if ($topic_depth == 'top') {
     $all_articles_string .= '</b>';
   }

   $all_articles_string .= $articles_all_count . '<br>';

 }

$info_box_contents = array();

 $info_box_contents[] = array(
 'align' => 'left',
 'text' => $new_articles_string . $all_articles_string . $topics_string);

new infoBox($info_box_contents);
      $info_box_contents = array();
      $info_box_contents[] = array('align' => 'left',
                                   'text'  => tep_draw_separator('pixel_trans.gif', '100%', '1')
                              );

new infoboxFooter($info_box_contents, true, true);

?>
           </td>
         </tr>
<!-- topics_eof //-->

 

<?php
/*
 $Id: authors.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
*/

 $authors_query = tep_db_query("select authors_id, authors_name from " . TABLE_AUTHORS . " order by authors_name");
 if ($number_of_author_rows = tep_db_num_rows($authors_query)) {
?>
<!-- authors //-->
         <tr>
           <td>
<?php
   $info_box_contents = array();
//    $info_box_contents[] = array('text' => BOX_HEADING_AUTHORS);
   $info_box_contents[] = array('text'  => '<font color="' . $font_color . '">' . BOX_HEADING_AUTHORS . '</font>');


   new infoBoxHeading($info_box_contents, false, false);

   if ($number_of_author_rows <= MAX_DISPLAY_AUTHORS_IN_A_LIST) {
// Display a list
     $authors_list = '';
     while ($authors = tep_db_fetch_array($authors_query)) {
       $authors_name = ((strlen($authors['authors_name']) > MAX_DISPLAY_AUTHOR_NAME_LEN) ? substr($authors['authors_name'], 0, MAX_DISPLAY_AUTHOR_NAME_LEN) . '..' : $authors['authors_name']);
       if (isset($HTTP_GET_VARS['authors_id']) && ($HTTP_GET_VARS['authors_id'] == $authors['authors_id'])) $authors_name = '<b>' . $authors_name .'</b>';
       $authors_list .= '<a href="' . tep_href_link(FILENAME_ARTICLES, 'authors_id=' . $authors['authors_id']) . '">' . $authors_name . '</a><br>';
     }

     $authors_list = substr($authors_list, 0, -4);

     $info_box_contents = array();
     $info_box_contents[] = array('text' => $authors_list);
   } else {
// Display a drop-down
     $authors_array = array();
     if (MAX_AUTHORS_LIST < 2) {
       $authors_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT);
     }

     while ($authors = tep_db_fetch_array($authors_query)) {
       $authors_name = ((strlen($authors['authors_name']) > MAX_DISPLAY_AUTHOR_NAME_LEN) ? substr($authors['authors_name'], 0, MAX_DISPLAY_AUTHOR_NAME_LEN) . '..' : $authors['authors_name']);
       $authors_array[] = array('id' => $authors['authors_id'],
                                      'text' => $authors_name);
     }

     $info_box_contents = array();

     $info_box_contents[] = array('form' => tep_draw_form('authors', tep_href_link(FILENAME_ARTICLES, '', 'NONSSL', false), 'get'),
                                  'text' => tep_draw_pull_down_menu('authors_id', $authors_array, (isset($HTTP_GET_VARS['authors_id']) ? $HTTP_GET_VARS['authors_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_AUTHORS_LIST . '" style="width: 100%" height="25"') . tep_hide_session_id());
   }
new infoBox($info_box_contents);
      $info_box_contents = array();
      $info_box_contents[] = array('align' => 'left',
                                   'text'  => tep_draw_separator('pixel_trans.gif', '100%', '1')
                              );

   new infoboxFooter($info_box_contents, true, true);
?>
           </td>
         </tr>
<!-- authors_eof //-->
<?php
 }
?>

 

Enjoy!

Laurie

Link to comment
Share on other sites

Hello,

 

I have download the Article Manager for testing. It is a very nice module.

 

But I meet some probelms.

 

1.) I can't remove article and catalog.

 

Error message as : Fatal error: Call to undefined function: tep_array_reverse() in /www/admin/includes/functions/articles_general.php on line 155

 

But it can remove the catalog including articles.

 

How can I remove them? Or how can O remove articles individual?

 

2) In article editor, I can't upload image, change text color.

 

Best Regard

Kitty

Link to comment
Share on other sites

For some reason I STILL cannot get my cross-sell to work. I have visited a few members' sites that are in this forum, and I see that many have it working properly.

 

PLEASE spare a moment to help me fix this. I have done an uninstall and reinstall twice now, and still...

 

Did you do adjustments that you can think of?

 

We can comare code and figure it out quickly. Please...

Link to comment
Share on other sites

I have loaded a file that works on another site and I still get the same message. For articles it is going to the No Product display and I get

 

"in .... product_info.php Line 25

 

I know the problem is that it is going to this program when it shouldn't but why?

 

Any takers? This is driving me nuts!

Link to comment
Share on other sites

Somehow part of this post

 

"Warning ereg() ... REG_ENTRY empty in ... product_info.php Line 25"

 

that's it from memory. Does anyone have a working version of tell_a_friend for the articles contribution?

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