Jump to content
Latest News: (loading..)

Fredi

Members
  • Content count

    52
  • Joined

  • Last visited

  • Days Won

    1

Fredi last won the day on January 26

Fredi had the most liked content!

3 Followers

About Fredi

  • Rank
    Fredi
  • Birthday 03/13/1950

Profile Information

  • Real Name
    Fredi
  • Gender
    Male
  • Location
    ISRAEL
  • Interests
    osCommerce Content&language support
    osC 2.3.4.1 BS
  • Website
  • Skype
    ffrubin

Recent Profile Visitors

6,877 profile views
  1. Fredi

    Article Manager v1.0

    Ok, I will try it today. Thank You Jack.
  2. Fredi

    Article Manager v1.0

    Box "Articles". Screenshots boxes Articles and new BS box Categories. Difference in usability. On mobile devices, the lines in the Boxing Articles are located very close to each other and there is no way to select the one you want. The second screenshot of boxing articles is my attempt to make it more convenient.
  3. Fredi

    Article Manager v1.0

    Hello Jack, Guten morgen! My request: The article manager must be adapted to the modern requirements of Gogle. Google requires an adaptation for mobile devices from our stores. This is primarily needed for the Articles menu. A style that is not adapted to mobile devices. Cannot select menu item. It is desirable that the menu format be similar with the menu of products. Danke.
  4. Fredi

    Article Manager v1.0

    Thanks Jack!
  5. Fredi

    Article Manager v1.0

    Made a correction. Restored block: /********************* BUILD TOPICS ********************/ if (ARTICLE_BOX_DISPLAY_TOPICS_SECTION == 'true') { $articlesArray['all_topics']['sort_order'] = ARTICLE_BOX_DISPLAY_TOPICS_SECTION_SORT_ORDER; $boldTags = GetBoldTags('article-topics.php'); $articlesArray['all_topics']['string'] = '<span class="h5"><b><a href="' . tep_href_link('article-topics.php', '', 'SSL') . '">' . $boldTags['start'] . BOX_ARTICLE_TOPICS . $boldTags['stop'] . '</a></b></span><br />'; if (ARTICLE_BOX_DISPLAY_TOPICS_LINKS == 'true') { $articlesArray['all_topics']['string'] .= preg_replace('/(<br \/>)+$/', '', $topics_string); } $articlesArray['all_topics']['string'] .= (SEPARATE_TOPICS == 'true' ? '<hr class="separatorArticle">' : '<br />'); } Menu work.
  6. Fredi

    Article Manager v1.0

    Let's wait for a response from @Jack_mcs . For me, the module of articles (blogs) is very important, because I have a large amount of information important for the work of the store. The article manager is a little naughty kid. It has unnecessary functions, such as adding articles by the user - this option is not needed in the store. The module is built on the principle of the Catalog, but the management and menu are unnecessarily complex. Many unnecessary additional features.
  7. Fredi

    Article Manager v1.0

    https://github.com/gburton/Responsive-osCommerce Updated to Bootstrap 4 PHP-7.0 <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2018 osCommerce Released under the GNU General Public License */ class bm_articles { var $code = 'bm_articles'; var $group = 'boxes'; var $title; var $description; var $sort_order; var $enabled = false; function __construct() { $this->title = MODULE_BOXES_ARTICLES_TITLE; $this->description = MODULE_BOXES_ARTICLES_DESCRIPTION; if ( defined('MODULE_BOXES_ARTICLES_STATUS') ) { $this->sort_order = MODULE_BOXES_ARTICLES_SORT_ORDER; $this->enabled = (MODULE_BOXES_ARTICLES_STATUS == 'True'); $this->group = ((MODULE_BOXES_ARTICLES_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right'); } } function execute() { global $languages_id, $currencies, $oscTemplate; $topicCtr = 0; $topics_string = ''; $articlesArray = array(); $tree = array(); function GetBoldTags($page, $id = 0) { $boldTags = array(); if (basename($_SERVER['PHP_SELF']) === $page) { if ($id == 0) { $boldTags['start'] = '<b>'; $boldTags['stop'] = '</b>'; } else if ((int)$_GET['articles_id'] == $id) { $boldTags['start'] = '<b>'; $boldTags['stop'] = '</b>'; } } else { $boldTags['start'] = ''; //fill these in to prevent STRICT errors $boldTags['stop'] = ''; } return $boldTags; } function SortBySetting($a, $b) { return strnatcasecmp($a["sort_order"], $b["sort_order"]); } function tep_show_topic($counter, $tree, &$topics_string) { global $tPath_array, $topicCtr; for ($i=0; $i<$tree[$counter]['level']; $i++) { $topics_string .= "&nbsp;&nbsp;"; } // $topics_string .= '<h5>-&nbsp;<a href="'; $topics_string .= '<span class="articleLinkMarker">-&nbsp;<a href="'; if ($tree[$counter]['parent'] == 0) { $tPath_new = 'tPath=' . $counter; } else { $tPath_new = 'tPath=' . $tree[$counter]['path']; } $topics_string .= tep_href_link('articles.php', $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 .= ' -&gt;'; } $topics_string .= '</a>'; if (SHOW_ARTICLE_COUNTS == 'true') { $articles_in_topic = tep_count_articles_in_topic($counter); if ($articles_in_topic > 0) { $topics_string .= '&nbsp;(' . $articles_in_topic . ')'; } } $topics_string .= '</span><br />'; if (tep_not_null(ARTICLE_BOX_DISPLAY_TOPICS_LINKS_LIMIT) && $topicCtr >= ARTICLE_BOX_DISPLAY_TOPICS_LINKS_LIMIT) { $topics_string .= '<span class="articleLinkMarker">-&nbsp;<a href="' . tep_href_link('article-topics.php', '', 'SSL') . '">' . '<div style="float:right; color:red;">...more</div>' . '</a></span><br />'; return; } $topicCtr++; if ($tree[$counter]['next_id'] != false) { tep_show_topic($tree[$counter]['next_id'], $tree, $topics_string); } } /** <!-- topics //--> **/ if (ARTICLE_BOX_DISPLAY_TOPICS_SECTION == 'true') { $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 ( isset($tPath) && tep_not_null($tPath) ) { //Correct from Raiwa $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; } } } $topicCtr = 1; tep_show_topic($first_topic_element, $tree, $topics_string); } /********************* BUILD ALL ARTICLES ********************/ if (ARTICLE_BOX_DISPLAY_ALL_ARTICLES_SECTION == 'true') { $articles_all_count = ''; if (SHOW_ARTICLE_COUNTS == 'true') { $articles_new_query = tep_db_query("SELECT a.articles_id from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t, " . TABLE_TOPICS_DESCRIPTION . " td, " . TABLE_AUTHORS . " au, " . TABLE_ARTICLES_DESCRIPTION . " ad where a.authors_id = au.authors_id and a2t.topics_id = td.topics_id and (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_is_blog = 0 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_new_query) ? tep_db_num_rows($articles_new_query) : ''); } $articlesArray['all_articles']['sort_order'] = ARTICLE_BOX_DISPLAY_ALL_ARTICLES_SECTION_SORT_ORDER; $boldTags = array(); $boldTags = GetBoldTags('articles.php'); $articlesArray['all_articles']['string'] = '<span class="h4"><b>'; $articlesArray['all_articles']['string'] .= '<a href="' . tep_href_link('articles.php', '', 'SSL') . '">' . $boldTags['start'] . BOX_ALL_ARTICLES . $boldTags['stop'] . '</a>'; $articlesArray['all_articles']['string'] .= '&nbsp;' . $articles_all_count . '</span><br />'; if (ARTICLE_BOX_DISPLAY_All_ARTICLES_LINKS == 'true') { $allArticles = tep_get_all_articles_array(); $ctr = 0; foreach ($allArticles as $all) { if (! tep_not_null(ARTICLE_BOX_DISPLAY_ALL_ARTICLES_LINKS_LIMIT) || (tep_not_null(ARTICLE_BOX_DISPLAY_ALL_ARTICLES_LINKS_LIMIT) && $ctr < ARTICLE_BOX_DISPLAY_ALL_ARTICLES_LINKS_LIMIT)) { $boldTags = GetBoldTags('article_info.php', $all['id']); $articlesArray['all_articles']['string'] .= '<span class="h4">-&nbsp;<a href="' . tep_href_link('article_info.php', 'articles_id='.$all['id'], 'SSL') . '">' . $boldTags['start'] . $all['text'] . $boldTags['stop'] . '</a></span>' . (SEPARATE_ARTICLES == 'true' ? '<hr class="separatorArticle">' : '<br />'); } else { $articlesArray['all_articles']['string'] .= '<span class="h5">-&nbsp;<a class="list-group-item list-group-item-action" href="' . tep_href_link('articles.php', '', 'SSL') . '">' . $boldTags['start'] . '<div style="float:right; color:red;">...more</div>' . $boldTags['stop'] . '</span></a>'; break; } $ctr++; } } } /********************* ADD BLOG TOPICS ********************/ if (ARTICLE_BOX_DISPLAY_ALL_BLOG_SECTION == 'true') { $articles_all_count = ''; if (SHOW_ARTICLE_COUNTS == 'true') { $articles_new_query = tep_db_query("SELECT a.articles_id from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t, " . TABLE_TOPICS_DESCRIPTION . " td, " . TABLE_AUTHORS . " au, " . TABLE_ARTICLES_DESCRIPTION . " ad where a.authors_id = au.authors_id and a2t.topics_id = td.topics_id and (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_is_blog = 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_new_query) ? tep_db_num_rows($articles_new_query) : ''); } $articlesArray['blog']['sort_order'] = ARTICLE_BOX_DISPLAY_ALL_BLOG_SECTION_SORT_ORDER; $boldTags = array(); $boldTags = GetBoldTags('article_blog.php'); $articlesArray['blog']['string'] = '<span class="h5"><b>'; $articlesArray['blog']['string'] .= '<a href="' . tep_href_link('articles.php', 'showblogarticles=true', 'SSL') . '">' . $boldTags['start'] . BOX_ALL_BLOG_ARTICLES . $boldTags['stop'] . '</a>'; $articlesArray['blog']['string'] .= '&nbsp;' . $articles_all_count . '</span><br />'; if (ARTICLE_BOX_DISPLAY_All_BLOG_LINKS == 'true') { $allArticles = tep_get_all_blog_articles_array(); $ctr = 0; foreach ($allArticles as $all) { if (! tep_not_null(ARTICLE_BOX_DISPLAY_ALL_BLOG_LINKS_LIMIT) || (tep_not_null(ARTICLE_BOX_DISPLAY_ALL_BLOG_LINKS_LIMIT) && $ctr < ARTICLE_BOX_DISPLAY_ALL_BLOG_LINKS_LIMIT)) { $boldTags = GetBoldTags('article_blog.php', $all['id']); $articlesArray['blog']['string'] .= '<span class="h5">-&nbsp;<a href="' . tep_href_link('article_blog.php', 'articles_id='.$all['id'], 'SSL') . '">' . $boldTags['start'] . $all['text'] . $boldTags['stop'] . '</a></span>' . (SEPARATE_BLOG_ARTICLES == 'true' ? '<hr class="separatorBlogArticle">' : '<br />'); } else { $articlesArray['blog']['string'] .= '<span class="h5">-&nbsp;<a href="' . tep_href_link('articles.php', '', 'SSL') . '">' . $boldTags['start'] . '<div style="float:right; color:red;">...more</div>' . $boldTags['stop'] . '</a></span><br />'; break; } $ctr++; } } } /********************* SORT THE DISPLAY ********************/ usort($articlesArray, "SortBySetting"); $content = ''; foreach ($articlesArray as $line) { $content .= $line['string']; } /********************* DISPLAY IT ALL ********************/ $data = '<div class="card">' . ' <div class="card-header">' . MODULE_BOXES_ARTICLES_BOX_TITLE . '</div>' . ' <div class="card-body">' . $content . '</div>' . '</div>'; $oscTemplate->addBlock($data, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_BOXES_ARTICLES_STATUS'); } function install() { tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Article Manager Authors Infobox', 'MODULE_BOXES_ARTICLES_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_ARTICLES_CONTENT_PLACEMENT', 'Left Column', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Left Column\', \'Right Column\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_ARTICLES_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())"); } function remove() { tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_BOXES_ARTICLES_STATUS', 'MODULE_BOXES_ARTICLES_CONTENT_PLACEMENT', 'MODULE_BOXES_ARTICLES_SORT_ORDER'); } } ?>
  8. Fredi

    Article Manager v1.0

    Error fixed, articles box not work prop. not see categories. 😞
  9. Fredi

    Article Manager v1.0

    Thank You Raiwa! I fixed the code. Now everything works fine!
  10. Fredi

    Article Manager v1.0

    Hello Jack The module is working, but an error is displayed: Undefined variable: tPath in /home/---/---/---/includes/modules/boxes/bm_articles.php on line 121 //------------------------ line#121 if (tep_not_null($tPath)) { $new_path = ''; reset($tPath_array); How can this error be corrected? Thanks.
  11. I think half of the problem is solved. Need to adjust the second part. Change infile tpl_cm_pi_description_tabs.php <li><a href="#tab-1">Product Info</a></li> <li><a href="#tab-2">Tech Info</a></li> <li><a href="#tab-3">Stock</a></li> <li><a href="#tab-4">QR Codes</a></li> <li><a href="#tab-5">Shipping</a></li> <li><a href="#tab-6">Privacy</a></li> <li><a href="#tab-7">Warranty</a></li> To <li><a href="#tab-1"><?php echo TPD_INFO; ?></a></li> <li><a href="#tab-2"><?php echo TPD_DESC; ?></a></li> <li><a href="#tab-3"><?php echo TPD_STOCK; ?></a></li> <li><a href="#tab-4"><?php echo TPD_QRC; ?></a></li> <li><a href="#tab-5"><?php echo TPD_SHIP; ?></a></li> <li><a href="#tab-6"><?php echo TPD_PRIV; ?></a></li> <li><a href="#tab-7"><?php echo TPD_WARRANT; ?></a></li> Add to englisg.php and other languages files. /**** cm_pi_description_tabs ****/ //NOTE: text must be on one line define('TPD_INFO', 'Product Info'); define('TPD_DESC', 'Tech Info'); define('TPD_STOCK', 'Stock'); define('TPD_QRC', 'QR Codes'); define('TPD_SHIP', 'Shipping'); define('TPD_PRIV', 'Privacy'); define('TPD_WARRANT', 'Warranty'); /**** End cm_pi_description_tabs ****/
  12. Hello Zahid, Your addon is very good and easy to install. But there is one problem: it does not supported multiple languages. This is the name of the tabs and the contents of some of them. To example: Condition. Delivery. My site already contains languages files, for example, languages/-LANG-/shipping.php, languages/-LANG-/condition.php Files shipping.txt and condition.txt - are not a very convenient and universal solution. How to add language constants? How can I change the code so that the addon would support many languages? Thanks, Fred.
  13. The installation instructions say that you need to install the module: Bootstrap-Select Plugin I can not find him. Prompt please how to do this.
  14. Hello, How can I enable this module in the version Responsive-osCommerce-2341-Frozen ? I did not find the code for correction in the file product_info.php Thanks.
  15. Fredi

    Content Modules Tabs

    Thank You, Jack! Mod work OK.
×