Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Article Manager v1.0


RobAnderson

Recommended Posts

The code was changed in the latest version of Header Tags SEO to automatically insert the code to handle the articles. My guess is that that is failing for some reason. But it works for me here and in shops I've installed it into so I don't know what it might be. If you are able, you could try setting up a fresh shop and installing the addons into it to see if that works. If it does, then it is something in your shop, though that seems unlikely.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 3 weeks later...

I can't test it because I don't have a server setup with 5.5 but that code is using mysql_fetch_row. For the latest oscommerce version it needs to be mysqli_fetch_row. It may not work since there isn't a link for it but give it a try.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I can't test it because I don't have a server setup with 5.5 but that code is using mysql_fetch_row. For the latest oscommerce version it needs to be mysqli_fetch_row. It may not work since there isn't a link for it but give it a try.

the problem is not the php 5.5 (I also tried with lower versions), but OSC version 2.3.3. and 2.3.4. any solution?

Link to comment
Share on other sites

As mentioned, it is the MySQL call. If you changed that and it didn't work, then the code needs to be altered. I haven't looked at it so I can't say what is required if that is needed at the moment.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

As mentioned, it is the MySQL call. If you changed that and it didn't work, then the code needs to be altered. I haven't looked at it so I can't say what is required if that is needed at the moment.

ok, solved!

change in the file articles_xsell.hp the line 55 "$ fields = mysql_fetch_row ($ result_1)" in "$ fields = mysqli_fetch_row ($ result_1);"

Link to comment
Share on other sites

  • 1 month later...

hi,

 

i use the article manager to share promotional flyers within the shop.

I currently load PDFs up in a directory and create links to the PDFs for download in the articles text.

I would like have a preview of the PDF shown on the article page. This in essence is not a problem, as I have tested a small piece of code that does exactly that.

 

Now the next step for me is to store the PDF filepath as an article field, so I can dynamically generate a preview image.

 

I searched for PDF in combination with article manager but didn't get any usefull results. I thought someone might have had the same idea already, but perhaps not.

 

So question is, is there something like this already, or others looking for something like this ?

Would it make sense to extend article manager for this, or should I just go and customize my install ...

 

anyone interested to share code/load ?

KEEP CALM AND CARRY ON

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

  • 2 months later...

Hi Folks, I have recently rebuilt an e-shop and installed Article manager (1.57_7) + Header Tags SEO (3.3.2_1)

recently I am seeing this error denying any of the website URLs to be displayed:

 

Parse error: syntax error, unexpected end of file in /www/doc/mywebpageURL/www/includes/header_tags.php on line 443

 

Any idea what is wrong?

 

Thanks!

Edited by Votrok
Link to comment
Share on other sites

Take a look at that line in that file. It is most likely due to some invalid file name. Many sites use the root directory for storage (a very bad idea) and the code in Header Tags SEO tries to make sense of those files and may fail if it can't. The next version will change how they are handled but, for now, you just need to be sure all of the files are valid one, assuming that is the problem.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 months later...

Hello Jack,

I have problem with my phpmyadmin 5.5.27 when try to inject your sql ...

i'm using 2.3.3.4 Oscommerce

 

Do you have a clue how to fix it ? see you soon ...

Error

SQL query:

INSERT INTO configuration( configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function )
VALUES (

NULL , 'Article Image Width', 'ARTICLES_IMAGE_WIDTH', '100', 'Set the width of the image displayed in an article.', '462', 5, now( ) , now( ) , NULL , NULL

);



MySQL said: dot.gif

#1048 - Column 'set_function' cannot be null

Link to comment
Share on other sites

There are a number of problems with that file and new php versions. It should be fixed in the new version but that hasn't been uploaded. Save the following to a file, upload the file to the server and then visit using a url and it should make the needed changes.

<?php
/*
  $Id: article_manager_install.php, v 3.0 by Jack_mcs

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

  Copyright (c) 2003 osCommerce
  Portions Copyright 2009 oscommerce-solution.com

  Released under the GNU General Public License
*/

  require('includes/application_top.php');

  $db_error = false;
  $lines = array();

  $am_check_query = tep_db_query("select 1 from configuration_group where configuration_group_title = 'Article Manager'");
  if (tep_db_num_rows($am_check_query) == 0) {

      $am_check_query = tep_db_query("select max(configuration_group_id) as id from configuration_group ");
      $max = tep_db_fetch_array($am_check_query);
      $configuration_group_id = $max['id'] + 1;
      $sortID = 1;

       $lines[] = "INSERT INTO configuration_group ( configuration_group_id , configuration_group_title , configuration_group_description , sort_order , visible )
         VALUES ($configuration_group_id, 'Article Manager', 'Article Manager site wide options', $configuration_group_id , '1');";

      $fields = " configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added, use_function ";
      $fields_short = " configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added ";

      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Article Image Width', 'ARTICLES_IMAGE_WIDTH', '100', 'Set the width of the image displayed in an article.', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Article Image Height', 'ARTICLES_IMAGE_HEIGHT', '100', 'Set the height of the image displayed in an article.', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Authors List Style', 'MAX_DISPLAY_AUTHORS_IN_A_LIST', '1', 'Used in Authors box. When the number of authors exceeds this number, a drop-down list will be displayed instead of the default list', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Authors Select Box Size', 'MAX_AUTHORS_LIST', '1', 'Used in Authors box. When this value is 1 the classic drop-down list will be used for the authors box. Otherwise, a list-box with the specified number of rows will be displayed.', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";

      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Author in Article Listing', 'DISPLAY_AUTHOR_ARTICLE_LISTING', 'true', 'Display the Author in the Article Listing?', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Topic in Article Listing', 'DISPLAY_TOPIC_ARTICLE_LISTING', 'true', 'Display the Topic in the Article Listing?', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Abstract in Article Listing', 'DISPLAY_ABSTRACT_ARTICLE_LISTING', 'true', 'Display the Abstract in the Article Listing?', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Date Added in Article Listing', 'DISPLAY_DATE_ADDED_ARTICLE_LISTING', 'true', 'Display the Date Added in the Article Listing?', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Topic/Author Filter', 'ARTICLE_LIST_FILTER', 'true', 'Do you want to display the Topic/Author Filter?', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Authors', 'AUTHOR_BOX_DISPLAY', 'true', 'Display the Author box in the destination column', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Articles', 'ARTICLE_BOX_DISPLAY', 'true', 'Display the Articles box in the destination column', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";

      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Articles - All Articles Section', 'ARTICLE_BOX_DISPLAY_ALL_ARTICLES_SECTION', 'true', 'Display an All Articles section in the articles box', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Display Box Articles - All Articles Sort Order', 'ARTICLE_BOX_DISPLAY_ALL_ARTICLES_SECTION_SORT_ORDER', '2', 'Determines the where the All Articles section will be displayed in the infobox.', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Articles - All Articles Links?', 'ARTICLE_BOX_DISPLAY_All_ARTICLES_LINKS', 'true', 'Display links to individual articles. Requires the Display Box Articles - All Articles Section option to be true. ', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Display Box Articles - All Articles Links Limit', 'ARTICLE_BOX_DISPLAY_ALL_ARTICLES_LINKS_LIMIT', '', 'Maximum number of article links to display in the articles infobox. Leave blank for no limit.', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Articles - All Blog Section', 'ARTICLE_BOX_DISPLAY_ALL_BLOG_SECTION', 'true', 'Display an All Blog Articles section in the articles box', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Display Box Articles - All Blog Sort Order', 'ARTICLE_BOX_DISPLAY_ALL_BLOG_SECTION_SORT_ORDER', '1', 'Determines the where the All Blog Articles section will be displayed in the infobox.', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Articles - All Blog Links?', 'ARTICLE_BOX_DISPLAY_All_BLOG_LINKS', 'true', 'Display links to individual articles. Requires the Display Box Articles - All Blog Articles Section option to be true. ', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Display Box Articles - All Blog Links Limit', 'ARTICLE_BOX_DISPLAY_ALL_BLOG_LINKS_LIMIT', '', 'Maximum number of blog article links to display in the articles infobox. Leave blank for no limit.', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Articles - All Topics Section', 'ARTICLE_BOX_DISPLAY_TOPICS_SECTION', 'true', 'Display an All Topics section in the articles box', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Display Box Articles - All Topics Sort Order', 'ARTICLE_BOX_DISPLAY_TOPICS_SECTION_SORT_ORDER', '3', 'Determines the where the All Topics section will be displayed in the infobox.', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Articles - All Topics Links?', 'ARTICLE_BOX_DISPLAY_TOPICS_LINKS', 'true', 'Display links to individual topics. Requires the Display Box Articles - All Topics Section option to be true. ', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Display Box Articles - All Topics Links Limit', 'ARTICLE_BOX_DISPLAY_TOPICS_LINKS_LIMIT', '', 'Maximum number of topics links to display in the articles infobox. Leave blank for no limit.', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Articles - New Articles Section', 'ARTICLE_BOX_DISPLAY_NEW_ARTICLES_SECTION', 'true', 'Display a New Articles section in the articles box', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";;
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Display Box Articles - New Articles Sort Order', 'ARTICLE_BOX_DISPLAY_NEW_ARTICLES_SECTION_SORT_ORDER', '4', 'Determines the where the New Articles section will be displayed in the infobox.', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Articles - New Articles Links?', 'ARTICLE_BOX_DISPLAY_NEW_ARTICLES_LINKS', 'true', 'Display links to individual articles. Requires the Display Box Articles - New Articles Section option to be true. ', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Display Box Articles - New Articles Links Limit', 'ARTICLE_BOX_DISPLAY_NEW_ARTICLES_LINKS_LIMIT', '', 'Maximum number of new article links to display in the articles infobox. Leave blank for no limit.', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Articles - RSS Feed Section', 'ARTICLE_BOX_DISPLAY_RSS_FEED_SECTION', 'true', 'Display an RSS Feed section in the articles box', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Display Box Articles - RSS Feed Sort Order', 'ARTICLE_BOX_DISPLAY_RSS_FEED_SECTION_SORT_ORDER', '5', 'Determines the where the RSS Feed section will be displayed in the infobox.', '" . $configuration_group_id . "', '" . ($sortID++). "', now())";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Articles - Search Articles Section', 'ARTICLE_BOX_DISPLAY_SEARCH_ARTICLES_SECTION', 'true', 'Display a Search Box in the articles box', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Display Box Articles - Search Articles Sort Order', 'ARTICLE_BOX_DISPLAY_SEARCH_ARTICLES_SECTION_SORT_ORDER', '8', 'Determines the where the Search Box will be displayed in the infobox.', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Articles - Submit Article Section', 'ARTICLE_BOX_DISPLAY_SUBMIT_ARTICLE_SECTION', 'true', 'Display a Submit Article section in the articles box', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Display Box Articles - Submit Article Sort Order', 'ARTICLE_BOX_DISPLAY_SUBMIT_ARTICLE_SECTION_SORT_ORDER', '6', 'Determines the where the Submit Article section will be displayed in the infobox.', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Articles - Upcoming Articles Section', 'ARTICLE_BOX_DISPLAY_UPCOMING_SECTION', 'true', 'Display an Upcoming Articles section in the articles box', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Display Box Articles - Upcoming Articles Sort Order', 'ARTICLE_BOX_DISPLAY_UPCOMING_SECTION_SORT_ORDER', '6', 'Determines the where the Upcoming Articles section will be displayed in the infobox.', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Articles - Separate Articles', 'SEPARATE_ARTICLES', 'false', 'Separate each article in the article infobox with a line.', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Articles - Separate Blog Articles', 'SEPARATE_BLOG_ARTICLES', 'false', 'Separate each blog article in the article infobox with a line.', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Articles - Separate New Articles', 'SEPARATE_NEW_ARTICLES', 'false', 'Separate each new article in the article infobox with a line.', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Articles - Separate Topics', 'SEPARATE_TOPICS', 'false', 'Separate each topic in the article infobox with a line.', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";

      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Enable Article Reviews', 'ENABLE_ARTICLE_REVIEWS', 'true', 'Enable registered users to review articles?', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Enable an HTML Editor', 'ARTICLE_ENABLE_HTML_EDITOR', 'No Editor', 'Use an HTML editor, if selected. !!! Warning !!! The selected editor must be installed for it to work!!!)', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'CKEditor\', \'FCKEditor\', \'TinyMCE\', \'No Editor\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Enable Tell a Friend About Article', 'ENABLE_TELL_A_FRIEND_ARTICLE', 'true', 'Enable Tell a Friend option in the Article Information page?', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Enable Version Checker', 'ARTICLE_ENABLE_VERSION_CHECKER', 'false', 'Enables the version checking code to automatically check if an update is available.', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";

      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Location of Prev/Next Navigation Bar', 'ARTICLE_PREV_NEXT_BAR_LOCATION', 'bottom', 'Sets the location of the Previous/Next Navigation Bar<br><br>(top; bottom; both)', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'top\', \'bottom\', \'both\'), ', now(), NULL)";

      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Maximum New Articles Per Page', 'MAX_NEW_ARTICLES_PER_PAGE', '10', 'The maximum number of New Articles to display per page<br>(New Articles page)', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Maximum Article Abstract Length', 'MAX_ARTICLE_ABSTRACT_LENGTH', '300', 'Sets the maximum length of the Article Abstract to be displayed<br><br>(No. of characters)', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Maximum Articles Per Page', 'MAX_ARTICLES_PER_PAGE', '10', 'The maximum number of Articles to display per page<br>(All Articles and Topic/Author pages)', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Maximum Number Articles in Infobox', 'MAX_DISPLAY_ARTICLES_INFOBOX', '6', 'Maximum number of articles to display in the articles infobox.', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Maximum Display Upcoming Articles', 'MAX_DISPLAY_UPCOMING_ARTICLES', '5', 'Maximum number of articles to display in the Upcoming Articles module', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Minimum Number Cross-Sell Products', 'MIN_DISPLAY_ARTICLES_XSELL', '1', 'Minimum number of products to display in the articles Cross-Sell listing.', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Maximum Number Cross-Sell Products', 'MAX_DISPLAY_ARTICLES_XSELL', '6', 'Maximum number of products to display in the articles Cross-Sell listing.', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Maximum Length of Author Name', 'MAX_DISPLAY_AUTHOR_NAME_LEN', '20', 'The maximum length of the author\'s name for display in the Author box', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";

      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Number of Days Display New Articles', 'NEW_ARTICLES_DAYS_DISPLAY', '30', 'The number of days to display New Articles?', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Number of articles to display in the RSS Feed.', 'NEWS_RSS_ARTICLE', '10', 'If you want all of your articles to display in the RSS type in something like 2000.  The default is 10', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields_short . ") VALUES ('Number of characters to display in each RSS article.', 'NEWS_RSS_CHARACTERS', '250', 'If you keep this at 250 it will hide a little bit of each of article from your viewers. They will have to come to your store to finish.  The default is 250', '" . $configuration_group_id . "', '" . ($sortID++). "', now());";
      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Show Article Counts', 'SHOW_ARTICLE_COUNTS', 'true', 'Count recursively how many articles are in each topic.', '" . $configuration_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";

      $colors = array('a' => 'blue','e' => 'steelblue', 'm' => 'red', 'n' => 'purple');
      $letters = array('a', 'e', 'm', 'n') ;
      $ctr = 0;
      foreach ($lines as &$line) {
          if ($ctr == 0) { //skip the configuration group entry
              $ctr++;
              continue;
          }
          $posStart = strpos($line, "'") + 1;
          $posStop  = strpos($line, "'", $posStart);
          $word = substr($line, $posStart, $posStop - $posStart);
          $lgth = strlen($word);
          $char = strtolower($word[0]);
          $color = '';

          foreach ($letters as $letter) {
              if ($letter == $char) {
                  $color = $colors[$char];
                  break;
              }
          }
          $line = substr_replace($line, '<font color=' . $color . '>' . $word . '</font>', $posStart, $lgth);
      }

      $lines[] = "DROP TABLE IF EXISTS topics;";
      $lines[] = "CREATE TABLE topics (
                  topics_id int(11) NOT NULL auto_increment,
                  topics_image varchar(64) default NULL,
                  parent_id int(11) NOT NULL default '0',
                  sort_order int(3) default NULL,
                  date_added datetime default NULL,
                  last_modified datetime default NULL,
                  PRIMARY KEY  (topics_id),
                  KEY idx_topics_parent_id (parent_id)
                );";

      $lines[] = "INSERT INTO topics (topics_id,topics_image, parent_id,sort_order, date_added, last_modified) VALUES (0,NULL, 0, 0, '2007-08-06 08:52:12', NULL);";

      $lines[] = "DROP TABLE IF EXISTS topics_description;";
      $lines[] = "CREATE TABLE topics_description (
                  topics_id int(11) NOT NULL default '0',
                  language_id int(11) NOT NULL default '1',
                  topics_name varchar(32) NOT NULL default '',
                  topics_heading_title varchar(64) default NULL,
                  topics_description text,
                  PRIMARY KEY  (topics_id,language_id),
                  KEY idx_topics_name (topics_name)
                );";
      
      $lines[] = "INSERT INTO topics_description VALUES (0, 1, 'Miscellaneous Articles', 'Miscellaneous', 'Articles that do not fall into a specific category.');";
      
      $lines[] = "DROP TABLE IF EXISTS articles;";
      $lines[] = "CREATE TABLE articles (
                  articles_id int(11) NOT NULL auto_increment,
                  articles_date_added datetime NOT NULL default '0000-00-00 00:00:00',
                  articles_last_modified datetime default NULL,
                  articles_date_available datetime default NULL,
                  articles_status tinyint(1) NOT NULL default '0',
                  articles_is_blog tinyint(1) NOT NULL default 0,
                  articles_sort_order tinyint(5) NOT NULL default '0',
                  authors_id int(11) default NULL,
                  PRIMARY KEY  (articles_id),
                  KEY idx_articles_date_added (articles_date_added)
                ) ;";
      
      $lines[] = "DROP TABLE IF EXISTS articles_description;";
      $lines[] = "CREATE TABLE articles_description (
                  articles_id int(11) NOT NULL auto_increment,
                  language_id int(11) NOT NULL default '1',
                  articles_name varchar(64) NOT NULL default '',
                  articles_description text,
                  articles_image varchar(64) NOT NULL default '',
                  articles_head_desc_tag text,
                  articles_url varchar(255) default NULL,
                  articles_viewed int(5) default '0',
                  PRIMARY KEY  (articles_id,language_id),
                  KEY articles_name (articles_name)
                ) ;";
      
      $lines[] = "DROP TABLE IF EXISTS articles_to_topics;";
      $lines[] = "CREATE TABLE articles_to_topics (
                  articles_id int(11) NOT NULL default '0',
                  topics_id int(11) NOT NULL default '0',
                  KEY idx_a2t_articles_id (articles_id),
                  KEY idx_a2t_topics_id (topics_id)
                ) ;";
                
      $lines[] = "DROP TABLE IF EXISTS articles_blog;";
      $lines[] = "CREATE TABLE articles_blog (
                  unique_id int(11) NOT NULL auto_increment,
                  articles_id int(11) NOT NULL default 0,
                  customers_id int(11) NOT NULL default 0,
                  commenters_name varchar(54) default NULL,
                  comment_date_added datetime NOT NULL default '0000-00-00 00:00:00',
                  comments_status tinyint(1) NOT NULL default '0',
                  comment text NOT NULL default '',
                  language_id int(11) NOT NULL default '1',
                  PRIMARY KEY  (unique_id),
                  KEY idx_articles_id (articles_id)
                ) ;";
      
      $lines[] = "DROP TABLE IF EXISTS authors;";
      $lines[] = "CREATE TABLE authors (
                  authors_id int(11) NOT NULL auto_increment,
                  customers_id int( 11 ) NOT NULL,
                  authors_name varchar(32) NOT NULL default '',
                  authors_image varchar(64) default NULL,
                  date_added datetime default NULL,
                  last_modified datetime default NULL,
                  PRIMARY KEY  (authors_id),
                  KEY IDX_AUTHORS_NAME (authors_name)
                ) ;";
      
      $lines[] = "DROP TABLE IF EXISTS authors_info;";
      $lines[] = "CREATE TABLE authors_info (
                  authors_id int(11) NOT NULL default '0',
                  languages_id int(11) NOT NULL default '0',
                  authors_description text,
                  authors_url varchar(255) NOT NULL default '',
                  url_clicked int(5) NOT NULL default '0',
                  date_last_click datetime default NULL,
                  PRIMARY KEY  (authors_id,languages_id)
                ) ;";
      
      $lines[] = "DROP TABLE IF EXISTS article_reviews;";
      $lines[] = "CREATE TABLE article_reviews (
                  reviews_id int(11) NOT NULL auto_increment,
                  articles_id int(11) NOT NULL default '0',
                  customers_id int(11) default NULL,
                  customers_name varchar(64) NOT NULL default '',
                  reviews_rating int(1) default NULL,
                  date_added datetime default NULL,
                  last_modified datetime default NULL,
                  reviews_read int(5) NOT NULL default '0',
                  approved tinyint(3) unsigned default '0',
                  PRIMARY KEY  (reviews_id)
                ) ;";
      
      $lines[] = "DROP TABLE IF EXISTS article_reviews_description;";
      $lines[] = "CREATE TABLE article_reviews_description (
                  reviews_id int(11) NOT NULL default '0',
                  languages_id int(11) NOT NULL default '0',
                  reviews_text text NOT NULL,
                  PRIMARY KEY  (reviews_id,languages_id)
                ) ;";
      
      
      $lines[] = "DROP TABLE IF EXISTS articles_xsell;";
      $lines[] = "CREATE TABLE articles_xsell (
                  ID int(10) NOT NULL auto_increment,
                  articles_id int(10) unsigned NOT NULL default '1',
                  xsell_id int(10) unsigned NOT NULL default '1',
                  sort_order int(10) unsigned NOT NULL default '1',
                  PRIMARY KEY  (ID)
                ) ;";


      foreach ($lines as $value) {
     //   echo $value.'<br>';
         if (tep_db_query($value) == false) {
             $db_error = true;
      	     break;
         }
      }
  } else {
      $db_error = true;
  }

?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
</head>
<body>

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
  <tr>
<!-- body_text //-->
    <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 'Article Manager Database Installer'; ?></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
      <tr>
        <td class="main">
<?php
  if ($db_error == false) {
    echo 'Database successfully updated for Article Manager!!!';
?>
        </td>
       </tr>
       <tr>
         <td><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
       </tr>

<?php
  } else {
    echo 'Errors encountered during database update.</td></tr>';
  }
?>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
    </table></td>
<!-- body_text_eof //-->

  </tr>
</table>
<!-- body_eof //-->

</body>
</html>

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 1 month later...

having the same Fatal error message on memory size. Using the latest version of this contribution and Header Tags SEO 3.0 on OSC 2.3.4. Changed my DB tables to innodb. not sure what's wrong. It only happens when its listing the articles. 

Edited by d4md
Link to comment
Share on other sites

I don't know what this is in reference to so I can't say much about it. But, if possible, trying clearing the articles and entering them one at a time to see if the problem goes away. It sounds like there is a loop for some reason but I've not seen it happen so I don't know what it might be.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hey Jack, sorry for the late reply. 

 

Here's the error I keep getting on the admin. http://screencast.com/t/KoXG4ZEOABJn. This is a fresh installation of the add on. No articles, no authors, and no topics. I've already switched all my tables to InnoDB, to no avail. When I activate the add on on the boxes, the front end looks like this: http://screencast.com/t/IxX6uoZ0

 

I'm using the latest add on version with osc 2.3.4 (I think or 2.3.3.4).

 

Let me know what you think.

 

Thanks

Link to comment
Share on other sites

First, try clearing the topics table in the database. You can do that in admin if it will let you but you may have to do it by editing the database directly.

 

If the above doesn't fix it, above the line that starts with while ($topics =, please add this

echo 'rows '.tep_db_num_rows($topics_query);

Then try loading the page again. That won't fix anything but it should show the number of topics the code thinks you have and may indicate the problem.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 1 month later...

Hi

 

I got this error message when trying to access 'Topcs/article' section

 

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 72 bytes) in /home/drago167/public_html/egovapours/admin/includes/functions/articles.php on line 52

 

Can you please advise how I can fix this?

Link to comment
Share on other sites

  • 2 months later...
After installing this on oscommerce 2.3.4 running a bootstrap based template, and having PHP 5.4 on the server I an getting this error in the front end. 
 
Fatal error: Class 'alertBlock' not found in /home2/internet/oscommerce/responsive/includes/classes/message_stack.php on line 19
 
Also the backend does not seem to have anywhere to submit a new article. There is no buttons on the 
Topics/Articles page.

 

 
Any ideas?
Edited by AusFiero
Link to comment
Share on other sites

I haven't tried installing it on that version so I don't have an answer for you. But alertBlock is not part of this addon so that would be a failure associated with the BS code.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

It was working before installing this addon. I have highly customised my install and back it up along the way. Can only assume part of the replaced code for this addon has done this. Check for yourself if you like. http://oscommerce.internetroo.com.au/responsive

 

After a little investigation it is to do with the changes in application top as I just uploaded a clean version and it worked. Now to work out what part of the changes did it. 

 

Cheers

Edited by AusFiero
Link to comment
Share on other sites

Ok I solved the problem. the instructions need to be changed. 

Where it says

In includes/application_top.php,

 
FIND:
 
/*** End Header Tags SEO ***/
 
needs to be changed to at the bottom of the file after the last }
 
The reason being header tags SEO bootstrap version does not change anything in application top because the breadcrumb structure on a bootstrap site is dfferent.
Edited by AusFiero
Link to comment
Share on other sites

While the addon can be made to work with the BS version, the current code/instructions are not for that version. I'm sure there are other changes needed as well for that version.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

No other changes that I found, well besides using bootstrap buttons instead of images, but that is not a necessity. 

One thing that does has me stumped though is how to add an article. Am I supposed to have a new or article button or something here? 

 

 

post-15133-0-55865800-1426822007_thumb.jpg

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