- osCommerce Support Forum
- → Viewing Profile: claireb85
Latest News: (loading..)
Community Stats
- Group Community Member
- Active Posts 14 (0.01 per day)
- Most Active In General Support (8 posts)
- Profile Views 5,752
- Age Age Unknown
- Birthday Birthday Unknown
-
Real Name
Claire
-
Gender
Not Telling
Contact Information
Posts I've Made
In Topic: Information Pages Unlimited v1.0
28 February 2012, 13:33
Nevermind I solved the problem.
In Topic: Information Pages Unlimited v1.0
28 February 2012, 11:46
Hello,
Could someone help me link this in my site. I have used a template so the code is slightly different, what do I change to link it to my pages?
I assume that this is the same principals as changing the links in the infobox but I can't get it to work.
My code is: (this is for links in the header of my site)
I am sure that i have installed the add-on correctly, I just cant figure out how to link it.
I would be really grateful for any help.
Could someone help me link this in my site. I have used a template so the code is slightly different, what do I change to link it to my pages?
I assume that this is the same principals as changing the links in the infobox but I can't get it to work.
My code is: (this is for links in the header of my site)
<?php
/*
$Id$
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2010 osCommerce
Released under the GNU General Public License
*/
class hm_user_menu {
var $code = 'hm_user_menu';
var $group = 'boxes';
var $title;
var $description;
var $sort_order;
var $enabled = false;
function hm_user_menu() {
$this->title = MODULE_BOXES_USER_MENU_TITLE;
$this->description = MODULE_BOXES_USER_MENU_DESCRIPTION;
if ( defined('MODULE_BOXES_USER_MENU_STATUS') ) {
$this->sort_order = MODULE_BOXES_USER_MENU_SORT_ORDER;
$this->enabled = (MODULE_BOXES_USER_MENU_STATUS == 'True');
$this->group = 'box_header_user_menu';
}
}
function execute() {
global $oscTemplate, $button_act, $tab_sel;
if (($tab_sel == tep_href_link(FILENAME_CREATE_ACCOUNT))
|| ($tab_sel == tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS))
|| ($tab_sel == tep_href_link(FILENAME_ACCOUNT))
|| ($tab_sel == tep_href_link(FILENAME_ACCOUNT_PASSWORD))
|| ($tab_sel == tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS))
|| ($tab_sel == tep_href_link(FILENAME_ACCOUNT_NEWSLETTERS))
|| ($tab_sel == tep_href_link(FILENAME_ACCOUNT_HISTORY))
|| ($tab_sel == tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO))
|| ($tab_sel == tep_href_link(FILENAME_ACCOUNT_EDIT))
|| ($tab_sel == tep_href_link(FILENAME_ADVANCED_SEARCH)))
{
$button_act2 = " act";
}
if (($tab_sel == tep_href_link(FILENAME_LOGIN))
|| ($tab_sel == tep_href_link(FILENAME_LOGOFF))
){
$button_act1 = " act";
}
if ($tab_sel == tep_href_link(FILENAME_SHIPPING))
{
$button_act3 = " act";
}
if (tep_session_is_registered('customer_id')) {
$login_link = tep_href_link('logoff.php');
$login_title= MODULE_BOXES_USER_MENU_BOX_TITLE_LOGOFF;
} else{
$login_link = tep_href_link('login.php');
$login_title= MODULE_BOXES_USER_MENU_BOX_TITLE_LOGIN;
}
if (tep_session_is_registered('customer_id')) {
$acc_link = tep_href_link('account.php');
$acc_title= MODULE_BOXES_USER_MENU_BOX_MY_ACCOUNT;
} else{
$acc_link = tep_href_link('create_account.php');
$acc_title= MODULE_BOXES_USER_MENU_BOX_CREATE_ACCOUNT;
}
$data = '<ul class="user_menu">'.
'<li class="'.$button_act3.'"><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '">'.tep_draw_button_header_top().'<span>'.MODULE_BOXES_USER_MENU_BOX_ADVANCED_SEARCH.'</span>'.tep_draw_button_header_bottom().'</a></li>'.
'<li class="'.$button_act3.'"><a href="' . tep_href_link(FILENAME_SHIPPING) . '">'.tep_draw_button_header_top().'<span>'.MODULE_BOXES_USER_MENU_BOX_SHIPPING.'</span>'.tep_draw_button_header_bottom().'</a></li>'.
'<li class="'.$button_act2.'"><a href="' .$acc_link. '">'.tep_draw_button_header_top().'<span>'.$acc_title.'</span>'.tep_draw_button_header_bottom().'</a></li>'.
'<li class="'.$button_act1.'"><a href="'.$login_link.'">'.tep_draw_button_header_top().'<span>'.$login_title.'</span>'.tep_draw_button_header_bottom().'</a></li>'.
'</ul>';
$oscTemplate->addBlock($data, $this->group);
}
function isEnabled() {
return $this->enabled;
}
function check() {
return defined('MODULE_BOXES_USER_MENU_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 Information Module', 'MODULE_BOXES_USER_MENU_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_USER_MENU_CONTENT_PLACEMENT', 'Header Block', 'Should the module be loaded in the left or right column?', '6', '1', 'tep_cfg_select_option(array(\'Header Block\'), ', 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_USER_MENU_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_USER_MENU_STATUS', 'MODULE_BOXES_USER_MENU_CONTENT_PLACEMENT', 'MODULE_BOXES_USER_MENU_SORT_ORDER');
}
}
?>
I am sure that i have installed the add-on correctly, I just cant figure out how to link it.
I would be really grateful for any help.
- osCommerce Support Forum
- → Viewing Profile: claireb85
- Forum Rules






Find content