osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

bookmark code

This is a discussion on bookmark code within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hi, This is the bookmark code to place a box in the store that people can bookmark your site with. ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Modification Help

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 12-31-2002, 06:25 PM
Active Member
 
Join Date: Oct 2002
Location: Arkansas
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
modom
Default bookmark code

Hi,

This is the bookmark code to place a box in the store that people can bookmark your site with.

<!-- Add Favorites //-->
<?php
if (strstr ($HTTP_USER_AGENT, "MSIE")) {
$self = "http://".$HTTP_HOST.$REQUEST_URI;
?>

<?php
/*$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => BOX_INFORMATION_BOOKMARK
);
new infoBoxHeading($info_box_contents, false, false);

$rows = 0;
$info_box_contents = array();*/

if ($HTTP_GET_VARS['products_id']) {
$product_box_info = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.language_id = '" . $languages_id . "'");
$product_box_info_values = tep_db_fetch_array($product_box_info);
$text = "<a href=\"javascript:window.external.AddFavorite('$se lf','$HTTP_HOST Online Shop - " . str_replace("'", "\'", $product_box_info_values["products_name"])."')\">Bookmark ".$product_box_info_values['products_name']."</a>";
}
else {
$text = "<a href=\"javascript:window.external.AddFavorite('$se lf','$HTTP_HOST Online Shop')\">Bookmark Us</a>";
}

$info_box_contents[] = array('align' => 'center',
'text' => $text);

new infoBox($info_box_contents);
?>

I have removed the <tr> and <td> tags and also commented out the first lines at the top to remove the header of the box.

How can I get this code completely out of the box and turn the text link into a graphic link?

I have tried commenting out this code various ways but it just removes the whole box section:

$info_box_contents[] = array('align' => 'center',
'text' => $text);

new infoBox($info_box_contents);

Any help would be appreciated.

Thanks!
__________________
Sincerely,
Melinda

www.designhosting.biz
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 01-01-2003, 07:00 AM
Member
 
Join Date: Nov 2002
Location: Pennsylvania
Posts: 93
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
|3ackdraft
Default

do you need the Bookmark in a box?

Here is the code for a simple bookmark script.

Put this in the <head>

Code:
<script language="JavaScript">
<!-- Begin
function bookmark() {
	bookmarkurl="http://www.yoursite.com"
	bookmarktitle="WebPage Title"
	if (document.all) 	window.external.AddFavorite(bookmarkurl,bookmarktitle)
}
//  End -->
</script>
put this in the <body>
Code:
<a href="javascript:bookmark()"><img src="your_bookmark_image.gif" alt="bookmark our site"></a>
Mike
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 01-01-2003, 08:31 AM
Active Member
 
Join Date: Oct 2002
Location: Arkansas
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
modom
Default

Thank you so much!

I tried it and it is working in the header.php. I put head tags above the copyright notice like this:
<head>
<script language="JavaScript">
<!-- Begin
function bookmark() {
bookmarkurl="http://www.mdesigns.biz"
bookmarktitle="WebPage Title"
if (document.all) window.external.AddFavorite(bookmarkurl,bookmarkti tle)
}
// End -->
</script>
</head>
<?php
/*
$Id: header.php,v 1.36 2002/08/15 17:29:47 dgw_ Exp $

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

Copyright (c) 2001 osCommerce

Released under the GNU General Public License
*/

I hope this is the way you do it.
__________________
Sincerely,
Melinda

www.designhosting.biz
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 01-03-2003, 08:33 AM
Member
 
Join Date: Nov 2002
Location: Pennsylvania
Posts: 93
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
|3ackdraft
Default

Melinda

In this example I am using default.php
don't put this in the header.php

This is a javascript and 9 times out of 10 you put your javascript functions in the head or your html document.

Code:
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 
<title><?php echo TITLE; ?></title>
<base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">

<script language="JavaScript"> 
<!-- Begin 
function bookmark() { 
bookmarkurl="http://www.mdesigns.biz" 
bookmarktitle="WebPage Title" 
if (document.all) window.external.AddFavorite(bookmarkurl,bookmarktitle) 
} 
// End --> 
</script>

</head>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Code Card Verification??? jasonabc osCommerce 2.2 Installation Help 4 11-24-2004 12:52 PM
Where to get colour code tyz6970 osCommerce 2.2 Modification Help 4 08-02-2004 08:46 AM
Adding Mod by hand. Where does this bit of code go? nfmg osCMax v1.7 General Mods Discussion 1 06-29-2004 06:20 PM


All times are GMT -8. The time now is 08:51 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax