Jump to content

valquiria23

Members
  • Content count

    696
  • Joined

  • Last visited

  • Days Won

    7

valquiria23 last won the day on February 18

valquiria23 had the most liked content!

About valquiria23

  • Birthday 01/30/1992

Profile Information

  • Real Name
    Valquiria Fernandez
  • Gender
    Female

Recent Profile Visitors

13,804 profile views

Single Status Update

See all updates by valquiria23

  1. Valeria,

    How are you?

    Listen, i have this file " bm_jcmgoogleads.php " on the Adsense module installation folder.  The question is, do i have to insert that in there? 

    <?php
    /*
      $Id$

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

      Copyright (c) 2010 osCommerce

      Released under the GNU General Public License
    */

      class bm_jcmgoogleads {
        var $code = 'bm_jcmgoogleads';
        var $group = 'boxes';
        var $title;
        var $description;
        var $sort_order;
        var $enabled = false;

        function __construct() {
          $this->title = MODULE_BOXES_JCMGOOGLEADS_TITLE;
          $this->description = MODULE_BOXES_JCMGOOGLEADS_DESCRIPTION;

          if ( defined('MODULE_BOXES_JCMGOOGLEADS_STATUS') ) {
            $this->sort_order = MODULE_BOXES_JCMGOOGLEADS_SORT_ORDER;
            $this->enabled = (MODULE_BOXES_JCMGOOGLEADS_STATUS == 'True');
            
            $this->group = ((MODULE_BOXES_JCMGOOGLEADS_CONTENT_PLACEMENT == 'Left Column') ? 'boxes_column_left' : 'boxes_column_right');
          }
        }

        function execute() {
          global $currencies, $oscTemplate;

          {
                     
            ob_start();
            include('includes/modules/boxes/templates/jcmgoogleads.php');
            $data = ob_get_clean();

            $oscTemplate->addBlock($data, $this->group);
          }
        }

        function isEnabled() {
          return $this->enabled;
        }

        function check() {
          return defined('MODULE_BOXES_JCMGOOGLEADS_STATUS');
        }

        function install() {
          tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable jcmgoogleads Module', 'MODULE_BOXES_JCMGOOGLEADS_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 " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Placement', 'MODULE_BOXES_JCMGOOGLEADS_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 " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_BOXES_JCMGOOGLEADS_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
        }

        function remove() {
          tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
        }

        function keys() {
          return array('MODULE_BOXES_JCMGOOGLEADS_STATUS', 'MODULE_BOXES_JCMGOOGLEADS_CONTENT_PLACEMENT', 'MODULE_BOXES_JCMGOOGLEADS_SORT_ORDER');
        }
        }

     

    Thank You for helping me.

    1. valquiria23

      valquiria23

      just changes all the places where TABLE_CONFIGURATION appears by configuration.

    2. valquiria23

      valquiria23

      Example:

       tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable jcmgoogleads Module', 'MODULE_BOXES_JCMGOOGLEADS_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");

      Now it would be:

       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 jcmgoogleads Module', 'MODULE_BOXES_JCMGOOGLEADS_STATUS', 'True', 'Do you want to add the module to your shop?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");

      Good luck.

      Valqui

    3. Show next comments  3 more
×