Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution]Skype Contact


wheeloftime

Recommended Posts

  • Replies 70
  • Created
  • Last Reply

Top Posters In This Topic

Hi All,

I got following error when I try to execute sql commands from command line.

I'm not too expert in sql.

 

Any help?

 

cheers

Nirvana

 

 

===============================================================

mysql> INSERT INTO configuration VALUES ('', 'Show infobox header ?', 'INFOBOX_S

KYPE_SHOW_HEADER', 'true', '', @id_config, '1', NULL, now(), NULL, 'tep_cfg_sele

ct_option(array(\'true\', \'false\'),'),

-> ('', 'Show Skype Call option ?', 'SKYPE_SHOW_CALL', 'true', '', @id_confi

g, '2', NULL, now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),'),

 

-> ('', 'Show Skype Chat option ?', 'SKYPE_SHOW_CHAT', 'true', '', @id_confi

g, '3', NULL, now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),'),

 

-> ('', 'Your Skype name', 'SKYPE_ID_NAME', '', '', @id_config, '4', NULL, n

ow(), NULL, NULL),

-> ('', 'Skype button reference', 'SKYPE_BUTTON_LINK', '', 'ie. http://mysta

tus.skype.com/smallclassic/skypename (for options see: http://www.skype.com/shar

e/buttons/advanced.html)', @id_config, '5', NULL, now(), NULL, NULL);

ERROR 1264 (22003): Out of range value adjusted for column 'configuration_id' at

row 1

mysql>

Link to comment
Share on other sites

Hi All,

I got following error when I try to execute sql commands from command line.

I'm not too expert in sql.

 

Any help?

 

cheers

Nirvana

You don't mention the errors you get but I think this won't work because of the @id_config variable which is used. You can either replace that with a number or just execute the commands through phpMyAdmin or something all at once.

Link to comment
Share on other sites

You don't mention the errors you get but I think this won't work because of the @id_config variable which is used. You can either replace that with a number or just execute the commands through phpMyAdmin or something all at once.

 

The error is in the the post at the bottom,

 

ERROR 1264 (22003): Out of range value adjusted for column 'configuration_id' at

row 1

 

I'm not too much familiar with sql and phpMyAdmin doesn't work any more that is why I use command line. I executed all commands all at once by compying and pasting in sql command line window.

 

I replaced @id_config by 0 and executed all commands at once in wsql command window but I get same error.

Link to comment
Share on other sites

The error is in the the post at the bottom,

 

ERROR 1264 (22003): Out of range value adjusted for column 'configuration_id' at

row 1

 

I'm not too much familiar with sql and phpMyAdmin doesn't work any more that is why I use command line. I executed all commands all at once by compying and pasting in sql command line window.

 

I replaced @id_config by 0 and executed all commands at once in wsql command window but I get same error.

Sorry, the error was mentioned at the end of your list I just noticed. Anyhow, try another number but it should be related to the first SQL command

INSERT INTO `configuration_group` VALUES ('', 'Skype Contact', 'Skype contact configuration.', '1', '1');
UPDATE `configuration_group` SET sort_order = last_insert_id() WHERE `configuration_group_id` = last_insert_id();

otherwise you won't get proper related entries. Maybe you should first try to get phpMyAdmin back in line...

Link to comment
Share on other sites

Sorry, the error was mentioned at the end of your list I just noticed. Anyhow, try another number but it should be related to the first SQL command

INSERT INTO `configuration_group` VALUES ('', 'Skype Contact', 'Skype contact configuration.', '1', '1');
UPDATE `configuration_group` SET sort_order = last_insert_id() WHERE `configuration_group_id` = last_insert_id();

otherwise you won't get proper related entries. Maybe you should first try to get phpMyAdmin back in line...

 

I managed to fix phpMyAdmin and executed all sql commands in one go and got following error

 

====================================================

Error

SQL query:

 

INSERT INTO `configuration_group`

VALUES (

 

'', 'Skype Contact', 'Skype contact configuration.', '1', '1'

);

 

 

 

MySQL said:

 

#1264 - Out of range value adjusted for column 'configuration_group_id' at row 1

====================================================

 

I even ran only the first line of command and got the same error so it seems something wrong with the very first line of command

 

Any help?

Link to comment
Share on other sites

I managed to fix phpMyAdmin and executed all sql commands in one go and got following error

 

====================================================

Error

SQL query:

 

INSERT INTO `configuration_group`

VALUES (

 

'', 'Skype Contact', 'Skype contact configuration.', '1', '1'

);

MySQL said:

 

#1264 - Out of range value adjusted for column 'configuration_group_id' at row 1

====================================================

 

I even ran only the first line of command and got the same error so it seems something wrong with the very first line of command

 

Any help?

It seems to be a MySQL 5 related bug reported earlier already (see here).

After some googling one of the solution appears to be

've had this all over the place in admin

 

running xp, apache MySQL 5.0.16-nt, php 5.1.1

 

in some googling it was suggested to comment out the "strict" section of the

 

mysql .ini file. after i did this, the problem, across several admin table insert areas, disappeared.

 

From the German forum:

In application_top.php after

// make a connection to the database... now
tep_db_connect() or die('Unable to connect to database server!');

add the following

tep_db_query("SET SESSION sql_mode=''");

 

HTH

Link to comment
Share on other sites

It seems to be a MySQL 5 related bug reported earlier already (see here).

After some googling one of the solution appears to be

From the German forum:

In application_top.php after

// make a connection to the database... now
tep_db_connect() or die('Unable to connect to database server!');

add the following

tep_db_query("SET SESSION sql_mode=''");

 

HTH

 

Sorry I can't find mysql.ini in my system at all. I have Windows 2003.

Link to comment
Share on other sites

  • 4 weeks later...

i guys i need one help, i can?t make the images appear, i try everything i read in the forum, i go pass the code sql, maybe you can figure out some problem.

 

thanks

 

SQL query:INSERT INTO `configuration_group`

VALUES (

'', 'Skype Contact', 'Skype contact configuration.', '1', '1'

);# Affected rows: 1

UPDATE `configuration_group` SET sort_order = last_insert_id( ) WHERE `configuration_group_id` = last_insert_id( ) ;# Affected rows: 1

SET @id_config = last_insert_id( ) ;# MySQL returned an empty result set (i.e. zero rows).

INSERT INTO configuration

VALUES (

'', 'Show infobox header ?', 'INFOBOX_SKYPE_SHOW_HEADER', 'true', '', @id_config , '1', NULL , now( ) , NULL , 'tep_cfg_select_option(array(\'true\', \'false\'),'

), (

'', 'Show Skype Call option ?', 'SKYPE_SHOW_CALL', 'true', '', @id_config , '2', NULL , now( ) , NULL , 'tep_cfg_select_option(array(\'true\', \'false\'),'

), (

'', 'Show Skype Chat option ?', 'SKYPE_SHOW_CHAT', 'true', '', @id_config , '3', NULL , now( ) , NULL , 'tep_cfg_select_option(array(\'true\', \'false\'),'

), (

'', 'ricardo.sat25', 'SKYPE_ID_NAME', '', '', @id_config , '4', NULL , now( ) , NULL , NULL

), (

'', 'Skype button reference', 'SKYPE_BUTTON_LINK', '', 'ie. http://mystatus.skype.com/smallclassic/ricardo.sat25 (for options see: http://www.skype.com/share/buttons/advanced.html)', @id_config , '5', NULL , now( ) , NULL , NULL

);# Affected rows: 5

 

-----------------------------------------------------------------------------------------------------------------------------

Another thing i would like put this box in the header how i can do that?

 

thanks, best regards

Edited by www.sat25.com
Link to comment
Share on other sites

i guys i need one help, i can?t make the images appear, i try everything i read in the forum, i go pass the code sql, maybe you can figure out some problem.

 

thanks

 

SQL query:INSERT INTO `configuration_group`

VALUES (

'', 'Skype Contact', 'Skype contact configuration.', '1', '1'

);# Affected rows: 1

UPDATE `configuration_group` SET sort_order = last_insert_id( ) WHERE `configuration_group_id` = last_insert_id( ) ;# Affected rows: 1

SET @id_config = last_insert_id( ) ;# MySQL returned an empty result set (i.e. zero rows).

INSERT INTO configuration

VALUES (

'', 'Show infobox header ?', 'INFOBOX_SKYPE_SHOW_HEADER', 'true', '', @id_config , '1', NULL , now( ) , NULL , 'tep_cfg_select_option(array(\'true\', \'false\'),'

), (

'', 'Show Skype Call option ?', 'SKYPE_SHOW_CALL', 'true', '', @id_config , '2', NULL , now( ) , NULL , 'tep_cfg_select_option(array(\'true\', \'false\'),'

), (

'', 'Show Skype Chat option ?', 'SKYPE_SHOW_CHAT', 'true', '', @id_config , '3', NULL , now( ) , NULL , 'tep_cfg_select_option(array(\'true\', \'false\'),'

), (

'', 'ricardo.sat25', 'SKYPE_ID_NAME', '', '', @id_config , '4', NULL , now( ) , NULL , NULL

), (

'', 'Skype button reference', 'SKYPE_BUTTON_LINK', '', 'ie. http://mystatus.skype.com/smallclassic/ricardo.sat25 (for options see: http://www.skype.com/share/buttons/advanced.html)', @id_config , '5', NULL , now( ) , NULL , NULL

);# Affected rows: 5

 

-----------------------------------------------------------------------------------------------------------------------------

Another thing i would like put this box in the header how i can do that?

 

thanks, best regards

The SQL must be run as one block through your phpMyAdmin SQL tab. If you have all the options in your admin that part was okay. If you Skype userid is ricardo.sat25 then the Skype button reference should point to that one so that you indeed get http://mystatus.skype.com/smallclassic/ricardo.sat25

You shouldn't however change that inside the SQL statements but afterwards within the Admin->Skype Contact options.

 

As for putting it inside the header; you can take the code without the box coding from catalog/includes/boxes/skype_contact.php and use that somewhere inside your catalog/includes/header.php.

The reference to skypeCheck.js should also be available within the header.

Link to comment
Share on other sites

hi wheeloftime thanks for the help, can you be more explicit im not a very good in database, if you can help i apreciate.

 

thanks

The idea is that you go to your phpMyAdmin interface, select your database and then click the SQL tab. You are there offered a textbox where you can type, or copy/paste, SQL commands which in case of this contribution are:

INSERT INTO `configuration_group` VALUES ('', 'Skype Contact', 'Skype contact configuration.', '1', '1');
UPDATE `configuration_group` SET sort_order = last_insert_id() WHERE `configuration_group_id` = last_insert_id();

SET @id_config = last_insert_id();

INSERT INTO configuration VALUES ('', 'Show infobox header ?', 'INFOBOX_SKYPE_SHOW_HEADER', 'true', '', @id_config, '1', NULL, now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),'),
('', 'Show Skype Call option ?', 'SKYPE_SHOW_CALL', 'true', '', @id_config, '2', NULL, now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),'),
('', 'Show Skype Chat option ?', 'SKYPE_SHOW_CHAT', 'true', '', @id_config, '3', NULL, now(), NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),'),
('', 'Your Skype name', 'SKYPE_ID_NAME', '', '', @id_config, '4', NULL, now(), NULL, NULL),
('', 'Skype button reference', 'SKYPE_BUTTON_LINK', '', 'ie. http://mystatus.skype.com/smallclassic/skypename (for options see: http://www.skype.com/share/buttons/advanced.html)', @id_config, '5', NULL, now(), NULL, NULL);

Don't change anything, just paste it inside that SQL command box and press the start button (as you probably already did). If all goes right you should read a message that all commands have been done with success.

After this you should find a couple of options in your admin->configuration>Skype Contact menu. This is the place where you write the URL to the picture.

Link to comment
Share on other sites

  • 1 month later...

Hi @ll!

 

I just installed this contribution and it looks good but... why would I write here if there was no but...

 

Before I installed it, I just wanted to have a look at how it works, so I picked Nigels shop and clicked on the chat button using firefox. My skype client was running but I got a message (I think it was from firefox and not from my firewall) telling me that the skype application needs to be launched. Can't remember which one answer option I clicked on that message (I think it was "don't launch" as I just wanted to see what would happen).

 

After that I tried again and didn't get any message about launching skype client and nothing else happened. No chat via skype. Then I thought I'll check with opera and there everything went fine (got the message about launching the skype client).

 

I reinstalled firefox, rebooted my computer but the skype buttons from this contribution just don't work from firefox and I have no idea where I might have switched something off.

 

Could anybody with firefox try to contact me with the skype buttons from my site: http://www.finefoods24.com to check if it's a general problem with firefox or just my environment?

 

Thank you for your help!

 

abra

The First Law of E-Commerce: If the user can't find the product, the user can't buy the product.

 

Feedback and suggestions on my shop welcome.

 

Note: My advice is based on my own experience or on something I read in these forums. No guarantee it'll work for you! Make sure that you always BACKUP the database and the files you are going to change so that you can rollback to a working version if things go wrong.

Link to comment
Share on other sites

The pictures are pulled directly from Skype servers which are non-SSL. What you can do is prevent the Skype box showing when on secured webpages in your shop by calling the Skype infobox in your column_right.php, or column_left.php, like

	if ($request_type != 'SSL') {
	// Skype Contact box only visible when on non-secured pages
	include(DIR_WS_BOXES .'skype_contact.php');
}

 

HTH

 

Hi, i gave this one a go coz i was getting the same unsecure/secure warning and i inserted the following code as suggested:

 

<? if ($request_type != 'SSL'); {include(DIR_WS_BOXES .'skype_contact.php'); }?>

 

I needed to stick in the little <? bits for php but it doesnt seem to show at all. Then after looking into it again without even changing anything i started getting the error:

 

Warning: main(includes/boxes/skype_contact.php): failed to open stream: No such file or directory in C:\home\bwear\www\catalog\includes\header.php on line 355

 

Warning: main(): Failed opening 'includes/boxes/skype_contact.php' for inclusion (include_path='.;C:\PHP\pear') in C:\home\bwear\www\catalog\includes\header.php on line 355

 

The code is placed in my header.php file coz thats the way this particular template was designed... any ideas? Cheers

Link to comment
Share on other sites

The pictures are pulled directly from Skype servers which are non-SSL. What you can do is prevent the Skype box showing when on secured webpages in your shop by calling the Skype infobox in your column_right.php, or column_left.php, like

	if ($request_type != 'SSL') {
	// Skype Contact box only visible when on non-secured pages
	include(DIR_WS_BOXES .'skype_contact.php');
}

 

HTH

 

Hi, i gave this one a go coz i was getting the same unsecure/secure warning and i inserted the following code as suggested:

 

<? if ($request_type != 'SSL'); {include(DIR_WS_BOXES .'skype_contact.php'); }?>

 

I needed to stick in the little <? bits for php but it doesnt seem to show at all. Then after looking into it again without even changing anything i started getting the error:

 

Warning: main(includes/boxes/skype_contact.php): failed to open stream: No such file or directory in C:\home\bwear\www\catalog\includes\header.php on line 355

 

Warning: main(): Failed opening 'includes/boxes/skype_contact.php' for inclusion (include_path='.;C:\PHP\pear') in C:\home\bwear\www\catalog\includes\header.php on line 355

 

The skype_us.php page does exist so dunno why that error would show?? The code is placed in my header.php file coz thats the way this particular template was designed... any ideas? Cheers

Edited by sonictrip.net
Link to comment
Share on other sites

To last post:

 

EDIT: ok, seems like the original file was called skype_us.php but the code calls that page skype_contact.php so after renaming them to match, im now getting the original secure/unsecure warning that this code was supposed to prevent from showing anyway...?? would IE7 be anything to do with it?

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...
My Skype Live Contact is not working. I did everything as i was supposed to do but it's not working. I don't even know what could be wrong. I can't se the images. And the calling doesn't work as well.

 

Hello Medved,

 

Just checked but all works okay when installed properly. Sometimes the Skype server(s) do not cooperate and the picture will miss but at this very moment it is okay. Be sure you activated the web presence within your Skype application otherwise it will not work.

 

regards,

Howard

Link to comment
Share on other sites

Hello Medved,

 

Just checked but all works okay when installed properly. Sometimes the Skype server(s) do not cooperate and the picture will miss but at this very moment it is okay. Be sure you activated the web presence within your Skype application otherwise it will not work.

 

regards,

Howard

Thanks for replay. i couldn't make it work for a log time so i came up with mine own simple solution. And it works now just perfect.

Here is what id did:

 

1.Open catalog/includes/boxes/skype_contact.php

 

2.Find

 

<td>

 

<!--

Skype 'Call me!' button

http://www.skype.com/go/skypebuttons

-->

<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js">

</script>

 

 

<?php

 

if ((INFOBOX_SKYPE_SHOW_HEADER == 'true') && (SKYPE_SHOW_CALL == 'true' || SKYPE_SHOW_CHAT == 'true')) {

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_SKYPE);

 

new infoBoxHeading($info_box_contents, false, false);

}

 

if (SKYPE_SHOW_CALL == 'true') {

$skype_call_string = '<div align="center"><a href="skype:' . SKYPE_ID_NAME . '?call" onclick="return skypeCheck();"><img src="' . SKYPE_BUTTON_LINK . '" style="border: none;" alt="Call me!" /><br>' . TEXT_SKYPE_CALL . '</a></div>';

}

 

if (SKYPE_SHOW_CHAT == 'true') {

$skype_chat_string = '<div align="center"><a href="skype:' . SKYPE_ID_NAME . '?chat" onclick="return skypeCheck();"><img src="' . SKYPE_BUTTON_LINK . '" style="border: none;" alt="Chat with me!" /><br>' . TEXT_SKYPE_CHAT . '</a></div>';

}

 

if (SKYPE_SHOW_CALL == 'true' || SKYPE_SHOW_CHAT == 'true') {

$info_box_contents = array();

$info_box_contents[] = array('text' => $skype_call_string . '<br>' . $skype_chat_string);

 

new infoBox($info_box_contents);

}

?>

</td>

 

Replace with

 

<td align="center">

 

<!--

Skype 'Call me!' button

http://www.skype.com/go/skypebuttons

-->

<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js">

</script>

 

<a href="skype:Your Skype name?call"><img src="http://mystatus.skype.com/smallclassic/Your Skype name" style="border: none;" alt="Call us" /></a>

 

<!--

Skype 'Chat with me' button

http://www.skype.com/go/skypebuttons

-->

<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script>

<a href="skype:Your Skype name?chat"><img src="http://download.skype.com/share/skypebuttons/buttons/chat_green_transparent_97x23.png" style="border: none;" width="97" height="23" alt="Chat with me" /></a>

 

 

 

</td>

 

3.The red part of the code above replace with your skype name.

 

And that's all.

 

I guarantee it will work right away. It works for me very well. The pictures and the calling, perfect. I believe it should work also for those who have SSL because it is still in the skype box. And this box has the code if ($request_type != 'SSL') to prevent from showing when there is a SSL page.

 

If somebody wants to see how it works I will give you a link to the site. If this helps to anybody please let me know.

Link to comment
Share on other sites

Thanks for replay. i couldn't make it work for a log time so i came up with mine own simple solution. And it works now just perfect.

Here is what id did:

 

1.Open catalog/includes/boxes/skype_contact.php

 

2.Find

Replace with

3.The red part of the code above replace with your skype name.

 

And that's all.

 

I guarantee it will work right away. It works for me very well. The pictures and the calling, perfect. I believe it should work also for those who have SSL because it is still in the skype box. And this box has the code if ($request_type != 'SSL') to prevent from showing when there is a SSL page.

 

If somebody wants to see how it works I will give you a link to the site. If this helps to anybody please let me know.

The problem is your admin settings for the Skype box are not set correctly. You have hard coded it now which will of course also work but will be less flexible when you want to change this parameter.

 

regards,

Howard

Link to comment
Share on other sites

The problem is your admin settings for the Skype box are not set correctly. You have hard coded it now which will of course also work but will be less flexible when you want to change this parameter.

 

regards,

Howard

 

Thanks for replay

 

This is how my admin settings look like:

 

3.jpg

 

I don't know what could be wrong there.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...