Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem with Javascript Infobox v1.1a- Help is appreciated


ZoMBiE

Recommended Posts

Hi guys, a quick question to anyone who either has this installed and saw this problem, or for anyone who has some good mysql and php skill and can decipher this install file.

 

Ok, so I am trying to install this contribution to make some popups:

http://www.oscommerce.com/community/contributions,3064

 

I can edit all of the files fine during the install process, but on the last part, it doesn't work. The readme says you go to your admin->catalog-> javascript infobox and click on install. I see the install button, but when I click it, it takes me back to my admin login page.

 

Now, I have this installed, and I don't know if it's conflicting with this:

http://www.oscommerce.com/community/contributions,1359

if anyone's familiar with that. So, because of this, I had to go to admin->administrator-> file access-> and add the 2 files into the administration "allow" list so they will run properly. Since that worked fine, I don't really think that this is the problem. I can access them and everything, it's just that when I'm trying to run the js_infobox_manager.php file, the button logs me out and I am back at the main page to login again.

 

One idea that I had was to take the js_infobox_manager.php, look for any mysql code, and enter the information manually into my database, then "trick" the contribution into thinking that it's already installed. but I don't know how to do that. For example, there's this block of code:

 

 

 

############################################################################

# THIS IS ALL INSTALL/UNINSTALL CODE - PUT IN THIS FILE FOR EASE OF USE #

############################################################################

# Script install code

if ($HTTP_GET_VARS['install']=='now' && (!$exists)) {

# No Attribution

echo '<tr><td class="main">';

$install_sql = "CREATE TABLE `jsib` (`id` tinyint(3) unsigned NOT NULL auto_increment,

`language_id` int(11) NOT NULL default '1',`find_replace` tinyint(1) NOT NULL default '0',

`find_word` varchar(64) default NULL,`replace_word` varchar(64) default NULL,

`manual_word` varchar(64) default NULL,`click` tinyint(1) NOT NULL default '0',

`shadowcolor` varchar(16) default NULL,`shadowcapacity` tinyint(3) default NULL,

`center` tinyint(1) NOT NULL default '0',`sticky` tinyint(1) NOT NULL default '0',

`category_desc` tinyint(1) NOT NULL default '0',`dynamic` tinyint(1) NOT NULL default '0',

`product_info` tinyint(1) NOT NULL default '0',`manual_code` tinyint(1) NOT NULL default '0',

`manual_pages` varchar(255) default NULL,`height` int(4) default NULL,`width` int(4)

default NULL,

`location` tinyint(4) default NULL,`position` tinyint(4) default NULL,`offsetx` tinyint(4) default NULL,

`offsety` tinyint(4) default NULL,`fgcolor` varchar(16) default NULL,`bgcolor` varchar(16) default NULL,

`border` tinyint(3) default NULL,`textfont` varchar(64) default NULL,`textsize` tinyint(4) default NULL,

`textcolor` varchar(16) default NULL,`closecolor` varchar(16) default NULL,

`closesize` tinyint(3) default NULL,`closefont` varchar(64) default NULL,

`captionsize` tinyint(3) default NULL,`captionfont` varchar(64) default NULL,

`capcolor` varchar(16) default NULL,`fullhtml` tinyint(1) NOT NULL default '0',

`followmouse` tinyint(1) NOT NULL default '0',`timeout` int(8) default NULL,

`delay` int(8) default NULL,`padxl` tinyint(4) default NULL,`padxr` tinyint(4) default NULL,

`padyt` tinyint(4) default NULL,`padyb` tinyint(4) default NULL,

`background` varchar(255) default NULL,`closeclick` tinyint(1) NOT NULL default '0',

`capicon` varchar(255) default NULL,`caption` varchar(64) default NULL,`body` text,

`code` text default NULL,PRIMARY KEY (`id`),KEY `category_desc` (`category_desc`),KEY

`dynamic` (`dynamic`),KEY `product_info` (`product_info`),KEY `manual_code` (`manual_code`))

TYPE=MyISAM";

 

# Configuration group insert SQL

$sort_order_query = "SELECT MAX(sort_order) as max_sort FROM `configuration_group`";

$sort = tep_db_fetch_array( tep_db_query($sort_order_query) );

$next_sort = $sort['max_sort'] + 1;

$insert_group = "INSERT INTO `configuration_group` VALUES ('', 'JS InfoBox', 'Options for JS

InfoBoxes', '".$next_sort."', '1')";

# Configuration insert SQL

$insert_values = array();

$insert_values[] = "INSERT INTO `configuration` VALUES ('', 'Enable JS InfoBox?', 'JS_INFOBOX',

'false', '', GROUP_INSERT_ID, 1, NOW(), NOW(), NULL,'tep_cfg_select_option(array(''true'', ''false''),

')";

$insert_values[] = "INSERT INTO `configuration` VALUES ('', 'Category Descriptions Installed?',

'JS_CAT_DESC', 'false', 'If you have category descriptions installed an active set this option to

true', GROUP_INSERT_ID, 2, NOW(), NOW(), NULL, 'tep_cfg_select_option(array(''true'', ''false''),')";

$insert_values[] = "INSERT INTO `configuration` VALUES ('', 'Apply to Additional Dynamic Pages',

'JS_DYN_PAGES', 'false', 'If you have other contributions that draw the content from the database and

want to apply the JSIB to them set to true.', GROUP_INSERT_ID, 3, NOW(), NOW(), NULL,

'tep_cfg_select_option(array(''true'', ''false''),')";

$insert_values[] = "INSERT INTO `configuration` VALUES ('', 'Define Additional Dynamic Pages',

'JS_DYN_PAGES_VALUES', '', 'List the Additional Dynamic Pages you want to use. Define using a comma

to seperate - DO NOT LEAVE SPACES! (Example: newsdesk.php,information.php)', GROUP_INSERT_ID, 4, NOW(),

NOW(), NULL, NULL)";

 

 

The first part of that is easy, you can just paste the table "jsib" part into phpmyadmin. But the next 4 lines won't work, because it can't recognize GROUP_INSERT_ID. Does anyone know what to do about that? And I'm assuming that's not all I need to do to "trick" the mod into thinking it's already installed...

 

I don't care about the uninstalling or fixing, etc. I can do that manually, but installing it is a pain. Any ideas?

 

 

OR, if someone knows a better mod or easier way of having javascript popups on the site, that could work just as good! I really appreciate any help someone can offer, thanks!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...