Jump to content

Search the Community

Showing results for tags 'link navbar'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News and Announcements
    • News and Announcements
  • osCommerce Online Merchant v2.x
    • General Support
    • osCommerce Online Merchant Community Bootstrap Edition
    • Add-Ons
  • Development
  • General
    • General Discussions
    • Live Shop Reviews
    • Security
    • Developer Feedback
  • Club osC's Announcements
  • PayPal's Announcements
  • Sage Pay's Announcements
  • Solomono - new level osCommerce templates's Announcements
  • German Community's OSCOM v2.x
  • German Community's Allgemein

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Real Name


Location


Interests


Website

Found 1 result

  1. hello, using frozen 2341 and php 7.1. I am trying to add a link to the navbar. i guess now you have to add a navbar module to admin>modules.navbar modules. i took, as a model, the reviews navbar module, but this is for an about us page. I created the three files below. In the navbar the link shows up but as --MODULE_NAVBAR_ABOUTUS_PUBLIC_TEXT-- instead of just About Us. I am missing something??? but just can not see what it is. catalog\includes\modules\navbar_modules <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2016 osCommerce Released under the GNU General Public License */ class nb_aboutus { var $code = 'nb_aboutus'; var $group = 'navbar_modules_home'; var $title; var $description; var $sort_order; var $enabled = false; function __construct() { $this->title = MODULE_NAVBAR_ABOUTUS_TITLE; $this->description = MODULE_NAVBAR_ABOUTUS_DESCRIPTION; if ( defined('MODULE_NAVBAR_ABOUTUS_STATUS') ) { $this->sort_order = MODULE_NAVBAR_ABOUTUS_SORT_ORDER; $this->enabled = (MODULE_NAVBAR_ABOUTUS_STATUS == 'True'); switch (MODULE_NAVBAR_ABOUTUS_CONTENT_PLACEMENT) { case 'Home': $this->group = 'navbar_modules_home'; break; case 'Left': $this->group = 'navbar_modules_left'; break; case 'Right': $this->group = 'navbar_modules_right'; break; } } } function getOutput() { global $oscTemplate; ob_start(); require('includes/modules/navbar_modules/templates/aboutus.php'); $data = ob_get_clean(); $oscTemplate->addBlock($data, $this->group); } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_NAVBAR_ABOUTUS_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 About Us Module', 'MODULE_NAVBAR_ABOUTUS_STATUS', 'True', 'Do you want to add the module to your Navbar?', '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_NAVBAR_ABOUTUS_CONTENT_PLACEMENT', 'Left', 'Should the module be loaded in the Left or Right or the Home area of the Navbar?', '6', '1', 'tep_cfg_select_option(array(\'Left\', \'Right\', \'Home\'), ', 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_NAVBAR_ABOUTUS_SORT_ORDER', '535', '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_NAVBAR_ABOUTUS_STATUS', 'MODULE_NAVBAR_ABOUTUS_CONTENT_PLACEMENT', 'MODULE_NAVBAR_ABOUTUS_SORT_ORDER'); } } catalog\includes\modules\navbar_modules\templates <?php // in a template so that shopowners // don't have to change the main file! echo MODULE_NAVBAR_ABOUT_US_PUBLIC_TEXT; catalog\includes\languages\english\modules\navbar_modules <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2016 osCommerce Released under the GNU General Public License */ define('MODULE_NAVBAR_ABOUTUS_TITLE', 'About Us'); define('MODULE_NAVBAR_ABOUTUS_DESCRIPTION', 'Show About Us Link in Navbar.'); define('MODULE_NAVBAR_ABOUTUS_PUBLIC_TEXT', '<li><a href="' . tep_href_link('aboutus.php') . '"><i class="fa fa-comment"></i><span class="hidden-sm"> About Us</span></a></li>'); TY Z
×