Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Links Manager for osC v1.00


VJ

Recommended Posts

Hey Jack (or anybody). I'm using v 1.14 by Jack. Works great.

 

Do you know what I'm doing wrong? http://www.thevisiondepot.com/links.php?lPath=4 ... that's my link for Industry Related Organizations.

 

I do have Chemo's Ultimate SEO's installed, so I would expect the link to be like .... http;//www.thevisiondepot.cm/industry-related-organizations.html or something.

 

Any suggestions? Thanks,

Jason

 

Simple 1-2-3 Intructions on how to get, install and configure SSL

 

The Google Sandbox explained

 

Simple to follow instructions on how to change the look of your OSC

 

How To Make A Horrible OSC Website

 

my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP

 

my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...

Link to comment
Share on other sites

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Do you have this line in your htaccess file

RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}

It was not included with the latest Ultimate SEO update for some reason.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Do you have this line in your htaccess file
RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}

It was not included with the latest Ultimate SEO update for some reason.

 

Jack

 

Hi Jack. Thanks ... I did not have that line in .htaccess, and I didn't have the updated seo_class.php, so I put your line in, uploaded the new class, and it works great: http://www.thevisiondepot.com/partners-of-...ot-links-3.html

 

Thanks a bunch,

Jason

 

Simple 1-2-3 Intructions on how to get, install and configure SSL

 

The Google Sandbox explained

 

Simple to follow instructions on how to change the look of your OSC

 

How To Make A Horrible OSC Website

 

my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP

 

my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...

Link to comment
Share on other sites

admin->Configuration->Links? I,ve seen thhis mentioned in the docs and in this furom but I don`t have this menu?

 

everything seems to be working ok but from what i can see the admin->Configuration->Links menu gives you more options?

 

Can anyone suggest how to make this menu appear.

 

Thanks

Link to comment
Share on other sites

I'm not trying to sound like a jerk, but really, go back over, and make sure you've installed the readme instructions correctly -- especially on the admin side of things.

Jason

 

Simple 1-2-3 Intructions on how to get, install and configure SSL

 

The Google Sandbox explained

 

Simple to follow instructions on how to change the look of your OSC

 

How To Make A Horrible OSC Website

 

my toolbox: All things WordPress-related - All things Adobe-related - PHP Designer 2007 - Codecanyon Junkie - Crimson Editor - Winmerge - phpMyAdmin - WS_FTP

 

my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...

Link to comment
Share on other sites

I have rechecked everything several times, it appears to be something missing from the SQL cos when i check the SQL file all the options I expect to see in Admin> Links are there but I can`t find a reference to Links in Configuration within the SQL.

 

I know there as been several versions of the link_setup.php that makes the changes the one i ran was included in LinksManager_V_1.14 also noticed a couple of other peeps earlier in the forum asking the same question but no one answered them.

 

can anyone point me to the SQL that adds the menu into the configuration menu within admin?

 

Thanks

Link to comment
Share on other sites

I have rechecked everything several times, it appears to be something missing from the SQL cos when i check the SQL file all the options I expect to see in Admin> Links are there but I can`t find a reference to Links in Configuration within the SQL.

 

I know there as been several versions of the link_setup.php that makes the changes the one i ran was included in LinksManager_V_1.14 also noticed a couple of other peeps earlier in the forum asking the same question but no one answered them.

 

can anyone point me to the SQL that adds the menu into the configuration menu within admin?

 

Thanks

 

 

Managed to fix it, I looked at the link_setup.php and entered the line "INSERT INTO configuration_group (configuration_group_title, configuration_group_description, sort_order) VALUES ('Links', 'Links Manager configuration options', '99')" into my SQL database and the changed it ID to what the rest of the contrib is and hey presto its all there.

Link to comment
Share on other sites

Not to trough a wrench in things but I tought I might add this in here for folks who like having the ability to get where there goin on the first page.

 

What this does: Add a new table on your admin index.php to the links/add a link, categories, Contact, Status, and featured. It will now be under the Tools links on the left side.

 

Remember to back up!!!!! ONLY file changed is the admin/index.php

 

Change this (aprox.) line 52

			   array('title' => BOX_HEADING_TOOLS,
				 'image' => 'tools.gif',
				 'href' => tep_href_link(FILENAME_BACKUP, 'selected_box=tools'),
				 'children' => array(array('title' => TOOLS_BACKUP, 'link' => tep_href_link(FILENAME_BACKUP, 'selected_box=tools')),
									 array('title' => TOOLS_BANNERS, 'link' => tep_href_link(FILENAME_BANNER_MANAGER, 'selected_box=tools')),
									 array('title' => TOOLS_FILES, 'link' => tep_href_link(FILENAME_FILE_MANAGER, 'selected_box=tools')))));

To this:

			   array('title' => BOX_HEADING_TOOLS,
				 'image' => 'tools.gif',
				 'href' => tep_href_link(FILENAME_BACKUP, 'selected_box=tools'),
				 'children' => array(array('title' => TOOLS_BACKUP, 'link' => tep_href_link(FILENAME_BACKUP, 'selected_box=tools')),
									 array('title' => TOOLS_BANNERS, 'link' => tep_href_link(FILENAME_BANNER_MANAGER, 'selected_box=tools')),
									 array('title' => TOOLS_FILES, 'link' => tep_href_link(FILENAME_FILE_MANAGER, 'selected_box=tools')))),
		   array('title' => BOX_HEADING_LINKS,
				 'image' => 'pixel_trans.gif',
				 'href' => tep_href_link(FILENAME_LINKS, 'selected_box=links'),
				 'children' => array(array('title' => LINKS_ADD, 'link' => tep_href_link(FILENAME_LINKS, 'selected_box=links&page=1&action=new')),
									 array('title' => LINKS_CATEGORIES, 'link' => tep_href_link(FILENAME_LINKS_CATEGORIES, 'selected_box=links')),
									 array('title' => LINKS_CONTACT, 'link' => tep_href_link(FILENAME_LINKS_CONTACT, 'selected_box=links')),
									 array('title' => LINKS_FEATURED, 'link' => tep_href_link(FILENAME_LINKS_FEATURED, 'selected_box=links')),
									 array('title' => LINKS_STATUS, 'link' => tep_href_link(FILENAME_LINKS_STATUS, 'selected_box=links')))));

 

Again this is only if you want the links to the LINKS in your admin

 

Hope this is usefull to someone,

Eric

Link to comment
Share on other sites

most people here are having database problms, i must say it seems to work just fine for me.

'great job and mant thanks' to all who wrote, updated and debuged this contribution.

 

my problem is with the layout, when the url is very long it throws the table out of whack like this:

 

 

 

 

SCREESHOT003.jpg

 

the url column is getting very big and minimizes the space for the description.

i tryed to remove the column for the url in the description by enterin position 0 for it. but not only did it not remove it, it hasnt even moved its position in the table.

 

my questions are these:

1. how can i display a truncated url so it will not affect the table?

2.how do i chnge the position of the columns or hide them, so i could remove the actual url from the table.

3. if i dont want the image , how do i get rid of the frame?

 

hope you guys can help, thanks

currently using OSC2.2MS2 051113 with the following contributions:

 

AJAX Attributemanager 2.1 - All_products 4.4 - Banner manager 1.5b - banner hack picture in manager * description in product listing hack ms2 v2.4 * drop shadow boxes v.1.1 * Easy populater 2.76d-ms2 by surfalot * FCKEditor * header tag controller v2.5.9 * jcssmenu * LoginBox 5.6 * option type feature v1.71 * OSC-Cach-v1.1 * popup_imagecleaned_stilized_2 * Remove from cart button hack * scrolling bestsellers * Article manager1.4 * Links Manager v1.14. * proffessional invoice&packingslip 6.1 * Ultimate SEO URLs

Personaly i think all these features NEED to be in the main core as they are quite basic features that are missing. but then again what do i know?

Link to comment
Share on other sites

You could try changing the options in admin->links.

 

Jack

 

sorry, i didnt make it very clear, i tryed this

 

i tryed to remove the column for the url in the description by enterin position 0 for it. but not only did it not remove it, it hasnt even moved its position in the table.

 

in the admin/configuration/links panel. and when entered position 0 it had no effect at all

currently using OSC2.2MS2 051113 with the following contributions:

 

AJAX Attributemanager 2.1 - All_products 4.4 - Banner manager 1.5b - banner hack picture in manager * description in product listing hack ms2 v2.4 * drop shadow boxes v.1.1 * Easy populater 2.76d-ms2 by surfalot * FCKEditor * header tag controller v2.5.9 * jcssmenu * LoginBox 5.6 * option type feature v1.71 * OSC-Cach-v1.1 * popup_imagecleaned_stilized_2 * Remove from cart button hack * scrolling bestsellers * Article manager1.4 * Links Manager v1.14. * proffessional invoice&packingslip 6.1 * Ultimate SEO URLs

Personaly i think all these features NEED to be in the main core as they are quite basic features that are missing. but then again what do i know?

Link to comment
Share on other sites

Try cleaing the setting so that it is blank.

 

Jack

 

i cleared the url(and the image for that matter)

 

 

SCREESHOT001.jpg

 

 

with no effect.

 

 

SCREESHOT004.jpg

 

 

am i doing something wrong ?

currently using OSC2.2MS2 051113 with the following contributions:

 

AJAX Attributemanager 2.1 - All_products 4.4 - Banner manager 1.5b - banner hack picture in manager * description in product listing hack ms2 v2.4 * drop shadow boxes v.1.1 * Easy populater 2.76d-ms2 by surfalot * FCKEditor * header tag controller v2.5.9 * jcssmenu * LoginBox 5.6 * option type feature v1.71 * OSC-Cach-v1.1 * popup_imagecleaned_stilized_2 * Remove from cart button hack * scrolling bestsellers * Article manager1.4 * Links Manager v1.14. * proffessional invoice&packingslip 6.1 * Ultimate SEO URLs

Personaly i think all these features NEED to be in the main core as they are quite basic features that are missing. but then again what do i know?

Link to comment
Share on other sites

Hi Everyone,

 

I would be grateful if you could help with this, as i have a very heavily modified store and i lost track and my brain is gone into a mush

 

when i installed link manager which appears to be a wonderful contribution, i getthis msg .....looks like Links Manager is already installed. Aborting...

 

yet when i go to admin links i get this in the admin page 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1

 

select l.links_id, l.links_url, l.links_image_url, l.links_date_added, l.links_last_modified, l.links_status, l.links_clicked, ld.links_title, ld.links_description, l.links_contact_name, l.links_contact_email, l.links_reciprocal_url, l.links_status from links l left join links_description ld on l.links_id = ld.links_id order by ld.links_title limit -20, 20

 

[TEP STOP]

 

which indicates the d base isnt installed

 

 

and also i dont get a links link on my catalog pages but when i type manually the name of my site as http://www.passionsuk.com/catalog/links.php i get this error

Fatal error: Cannot redeclare tep_show_category() (previously declared in /hsphere/local/home/passions/passionsuk.com/catalog/includes/header.php:136) in /hsphere/local/home/passions/passionsuk.com/catalog/includes/boxes/categories.php on line 13

 

 

 

please help

 

thanks in advvance,

<bluenotemkvi - removed commercial links>

Edited by BlueNoteMKVI
Link to comment
Share on other sites

i cleared the url(and the image for that matter)

 

am i doing something wrong ?

It works fine here so it must be something to do with your installation. Was this an upgrade or a new installation?

 

Jack

Edited by Jack_mcs

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi Everyone,

 

yet when i go to admin links i get this in the admin page 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1

That's an incompatibility problem with mysql. The fix is in the latest oscommerce security update.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

It works fine here so it must be something to do with your installation. Was this an upgrade or a new installation?

 

Jack

its a new install of the links manager in a modified oscommerce 2.2 ms 2 051113.

i compared my links.php with the one in the package and they are the same(except for right column width) . i did how ever noticed that therre are a few tags(<td>) that are not closed right and dreamweaver marks them in yellow. but that was the same in the links.php of the contrib.

i'll paste the code here (thats the one from my site):

 

<?php
/*
 $Id: links.php,v 1.07 2005/5/28 Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

// define our link functions
 require(DIR_WS_FUNCTIONS . 'links.php');

 $linkSearch = '';
 $linkFound = false;
 $action_search = (isset($_POST['action_search']) ? $_POST['action_search'] : '');
 if (tep_not_null($action_search))
 {
 $linkSearch = $_POST['links_search'];
 $link_query = tep_db_query("select l.links_id, l.links_title, lc.links_id, lc.link_categories_id from " . TABLE_LINKS_DESCRIPTION . " l, " . TABLE_LINKS_TO_LINK_CATEGORIES . " lc where l.links_id = lc.links_id AND links_title LIKE '%" . $linkSearch . "%' and language_id = '" . (int)$languages_id . "'");
 if (tep_db_num_rows($link_query) > 0)
   $linkFound = true;
 } 

// calculate link category path
 if (isset($HTTP_GET_VARS['lPath'])) {
$lPath = $HTTP_GET_VARS['lPath'];
$current_category_id = $lPath;
$display_mode = 'links';
 } elseif (isset($HTTP_GET_VARS['links_id'])) {
$lPath = tep_get_link_path($HTTP_GET_VARS['links_id']);
 } else {
$lPath = '';
$display_mode = 'categories';
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LINKS);

 // links breadcrumb
 $link_categories_query = tep_db_query("select link_categories_name from " . TABLE_LINK_CATEGORIES_DESCRIPTION . " where link_categories_id = '" . (int)$lPath . "'");
 $link_categories_value = tep_db_fetch_array($link_categories_query);

 if ($display_mode == 'links') {
$breadcrumb->add(NAVBAR_TITLE, FILENAME_LINKS);
$breadcrumb->add($link_categories_value['link_categories_name'], FILENAME_LINKS . '?lPath=' . $lPath);
 } else {
$breadcrumb->add(NAVBAR_TITLE, FILENAME_LINKS);
 }

 /****** DIsplay Feature Links ******/  
 if (LINKS_FEATURED_LINK == 'True')
 {
/****** Find the Featured links for the main links page ******/
$openMode = (LINKS_OPEN_NEW_PAGE == 'True') ? 'blank' : 'self';
$link_featured = '';
$link_featured_query = tep_db_query("select l.links_id, l.links_url, l.links_image_url, ld.links_title, ld.links_description, lf.expires_date from " . TABLE_LINKS . " l, " . TABLE_LINKS_DESCRIPTION . " ld, " . TABLE_LINKS_FEATURED . " lf where l.links_id = ld.links_id AND ld.links_id = lf.links_id AND lf.expires_date >= now() order by RAND()" );

if (tep_db_num_rows($link_featured_query) > 0) {
  $lf = tep_db_fetch_array($link_featured_query);

  if (LINKS_TITLES_AS_LINKS == 'True')
	$link_featured = $lf['links_title'];
  else
	$link_featured = '<a href="' . tep_get_links_url($lf['links_id']) . '" target="_' . $openMode . '">' . $lf['links_title'] . '</a>';

  if (LINK_LIST_IMAGE > 0)
  { 
	if (tep_not_null($lf['links_image_url'])) { 
	  $link_featured .= '<br><a href="' . tep_get_links_url($lf['links_id']) .  '" target="_' . $openMode . '">' . tep_links_image($lf['links_image_url'], $lf['links_title'], LINKS_IMAGE_WIDTH, LINKS_IMAGE_HEIGHT) . '</a>';
	} else {
	  $link_featured .= '<br><a href="' . tep_get_links_url($lf['links_id']) .  '" target="_' . $openMode . '">' . tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', $lf['links_title'], LINKS_IMAGE_WIDTH, LINKS_IMAGE_HEIGHT, 'style="border: 3px double black"') . '</a>';
	}
  } 
  if (LINK_LIST_DESCRIPTION > 0)
   $link_featured .= '<br>' . $lf['links_description'];
}	 

/****** Find the Featured Links for the category page ******/
$link_featured_cat = '';
$link_featured_cat_query = tep_db_query("select l.links_id, l.links_url, l.links_image_url, ld.links_title, ld.links_description, lf.expires_date from " . TABLE_LINKS . " l, " . TABLE_LINKS_DESCRIPTION . " ld, " . TABLE_LINKS_FEATURED . " lf, " . TABLE_LINKS_TO_LINK_CATEGORIES . " l2lc where l.links_id = ld.links_id AND ld.links_id = lf.links_id AND l.links_id = l2lc.links_id AND lf.expires_date >= now() AND l2lc.link_categories_id = '" . (int)$current_category_id . "' order by RAND()" );

if (tep_db_num_rows($link_featured_cat_query) > 0) {
  $lf = tep_db_fetch_array($link_featured_cat_query);

  if (LINKS_TITLES_AS_LINKS == 'True')
	$link_featured_cat = $lf['links_title'];
  else
	$link_featured_cat = '<a href="' . tep_get_links_url($lf['links_id']) . '" target="_' . $openMode . '">' . $lf['links_title'] . '</a>';

  if (LINK_LIST_IMAGE > 0)
  { 
	if (tep_not_null($lf['links_image_url'])) { 
	  $link_featured_cat .= '<br><a href="' . tep_get_links_url($lf['links_id']) .  '" target="_' . $openMode . '">' . tep_links_image($lf['links_image_url'], $lf['links_title'], LINKS_IMAGE_WIDTH, LINKS_IMAGE_HEIGHT) . '</a>';
	} else {
	  $link_featured_cat .= '<br><a href="' . tep_get_links_url($lf['links_id']) .  '" target="_' . $openMode . '">' . tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', $lf['links_title'], LINKS_IMAGE_WIDTH, LINKS_IMAGE_HEIGHT, 'style="border: 3px double black"') . '</a>';
	}
  } 
  if (LINK_LIST_DESCRIPTION > 0)
   $link_featured_cat .= '<br>' . $lf['links_description'];
} 
 }
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<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 (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<?php
 if ($display_mode == 'categories') {
?>
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><?php echo TEXT_MAIN_CATEGORIES; ?></td>
  </tr>	   
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <?php if (tep_not_null($link_featured)) { ?>
  <tr>
   <td class="linkFeatured"><table border="0" width="100%" cellspacing="0" cellpadding="2">
	<tr>
	 <td align="center"><?php echo TEXT_FEATURED_HEADING; ?></td>
	</tr>
	<tr>
	 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	</tr>		
	<tr>
	 <td align="center"><?php echo $link_featured; ?></td>
	</tr> 
   </table></td>
  </tr>  
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>				
  <?php } ?>	
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
<?php
$categories_query = tep_db_query("select lc.link_categories_id, lcd.link_categories_name, lcd.link_categories_description, lc.link_categories_image from " . TABLE_LINK_CATEGORIES . " lc, " . TABLE_LINK_CATEGORIES_DESCRIPTION . " lcd where lc.link_categories_id = lcd.link_categories_id and lc.link_categories_status = '1' and lcd.language_id = '" . (int)$languages_id . "' order by lcd.link_categories_name");

$number_of_categories = tep_db_num_rows($categories_query);

if ($number_of_categories > 0) {
  $rows = 0;
  while ($categories = tep_db_fetch_array($categories_query)) {
	$rows++;
	$lPath_new = 'lPath=' . $categories['link_categories_id'];
	$width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';

	echo '				<td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_LINKS, $lPath_new) . '">';

	if (SHOW_LINKS_CATEGORIES_IMAGE == 'True') {
	  if (tep_not_null($categories['link_categories_image'])) {
		echo tep_links_image(DIR_WS_IMAGES . $categories['link_categories_image'], $categories['link_categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>';
	  } else {
		echo tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', $categories['link_categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT, 'style="border: 3px double black"') . '<br>';
	  }
	}

	$categories_count_query = tep_db_query("select link_categories_id from " . TABLE_LINKS_TO_LINK_CATEGORIES . " where link_categories_id = " . $categories['link_categories_id']);
	$linkCount = tep_db_num_rows($categories_count_query);
	echo '<br><b><u>' . $categories['link_categories_name'] . '</b></u></a> ' . '(' . $linkCount . ')<br>' . $categories['link_categories_description'] . '</td>' . "\n";
	if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {
	  echo '			  </tr>' . "\n";
	  echo '			  <tr>' . "\n";
	}
  }
} else {
?>
			<td><?php new infoBox(array(array('text' => TEXT_NO_CATEGORIES))); ?></td>
<?php
}
?>
		  </tr>
		</table></td>
	  </tr>		  
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>
	  <tr>
		<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
		  <tr class="infoBoxContents">
			<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td align="right" align="center"><?php echo tep_draw_form('check_links', tep_href_link(FILENAME_LINKS, '', 'NONSSL'), 'post', 'onSubmit="return true;" onReset="return true"') . tep_draw_hidden_field('action_search', 'process'); ?>
				Search <?php echo tep_draw_input_field('links_search', '', 'maxlength="255", size="30"', false) . tep_image_submit('button_quick_find.png', SEARCH); ?> 
		 	 		 </form></td>
				<td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_LINKS_SUBMIT, tep_get_all_get_params()) . '">' . tep_image_button('button_submit_link.gif', IMAGE_BUTTON_SUBMIT_LINK) . '</a>'; ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
			</table></td>
		  </tr>
		</table></td>
	  </tr>
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>		  
	  <tr>
	   <td><?php include(DIR_WS_MODULES . FILENAME_LINK_SEARCH); ?></td>
	  </tr>		 
	</table></td>
  </tr>
</table></td>
<?php
 } elseif ($display_mode == 'links') {
// create column list
$define_list = array('LINK_LIST_TITLE' => LINK_LIST_TITLE,
					 'LINK_LIST_URL' => LINK_LIST_URL,
					 'LINK_LIST_IMAGE' => LINK_LIST_IMAGE,
					 'LINK_LIST_DESCRIPTION' => LINK_LIST_DESCRIPTION, 
					 'LINK_LIST_COUNT' => LINK_LIST_COUNT);

asort($define_list);

$column_list = array();
reset($define_list);
while (list($key, $value) = each($define_list)) {
  if ($value > 0) $column_list[] = $key;
}

$select_column_list = '';

for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
  switch ($column_list[$i]) {
	case 'LINK_LIST_TITLE':
	  $select_column_list .= 'ld.links_title, ';
	  break;
	case 'LINK_LIST_URL':
	  $select_column_list .= 'l.links_url, ';
	  break;
	case 'LINK_LIST_IMAGE':
	  $select_column_list .= 'l.links_image_url, ';
	  break;
	case 'LINK_LIST_DESCRIPTION':
	  $select_column_list .= 'ld.links_description, ';
	  break;
	case 'LINK_LIST_COUNT':
	  $select_column_list .= 'l.links_clicked, ';
	  break;
  }
}

// show the links in a given category
// We show them all

 $listing_sql = "select " . $select_column_list . " l.links_id, ld.language_id from " . TABLE_LINKS_DESCRIPTION . " ld, " . TABLE_LINKS . " l, " . TABLE_LINKS_TO_LINK_CATEGORIES . " l2lc where l.links_status = '2' and l.links_id = l2lc.links_id and ld.links_id = l2lc.links_id and l2lc.link_categories_id = '" . (int)$current_category_id . "'";
 $lang_set = false;

 $langsort_query = tep_db_query("select languages_id, sort_order from " . TABLE_LANGUAGES . " where sort_order = " . $languages_id . " limit 1");
 $langsort = tep_db_fetch_array($langsort_query);

 $useAll = false;

 if ($langsort['languages_id'] == '1')
 {
if(LINKS_DISPLAY_ENGLISH == 'True')
{
   $listing_sql .= " and ( ld.language_id = '" . $langsort['languages_id'] . "";
   $lang_set = true;
}  
else
{
  $useAll = true;
}
 }

 if ($langsort['languages_id'] == '2')
 {
if(LINKS_DISPLAY_GERMAN == 'True')
{
  if ($lang_set)
	$listing_sql .= "' xor ld.language_id = '" . $langsort['languages_id'] . "";
  else
  {
	$listing_sql .= " and ( ld.language_id = '" . $langsort['languages_id'] . "";
	$lang_set = true;
  }
}
else
{
  $useAll = true;
}
 }  

 if ($langsort['languages_id'] == '3')
 {
if(LINKS_DISPLAY_SPANISH == 'True')
{
  if ($lang_set)
	$listing_sql .= "' xor ld.language_id = '" . $langsort['languages_id'] . "";
  else
  {
	$listing_sql .= " and ( ld.language_id = '" . $langsort['languages_id'] . "";
	$lang_set = true;
  }
}
else
{
  $useAll = true;
}
 } 

 if ($langsort['languages_id'] == '4')
 {
if (LINKS_DISPLAY_FRENCH == 'True')
{
  if ($lang_set)
	$listing_sql .= "' xor ld.language_id = '" . $langsort['languages_id'] . "";
  else
  {
	$listing_sql .= " and ( ld.language_id = '" . $langsort['languages_id'] . "";
	$lang_set = true;
  }
}
else
{
  $useAll = true;
}
 }

 if ($lang_set)
$listing_sql .= "' xor ld.language_id = '99')";
 else if ($useAll)
$listing_sql .= " and ld.language_id = '99'";  
 else
$listing_sql .= "";

if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
  for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
	if ($column_list[$i] == 'LINK_LIST_TITLE') {
	  $HTTP_GET_VARS['sort'] = $i+1 . 'a';
	  $listing_sql .= " order by ld.links_title";
	  break;
	}
  }
} else {
  $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);
  $sort_order = substr($HTTP_GET_VARS['sort'], 1);
  $listing_sql .= ' order by ';
  switch ($column_list[$sort_col-1]) {
	case 'LINK_LIST_TITLE':
	  $listing_sql .= "ld.links_title " . ($sort_order == 'd' ? 'desc' : '');
	  break;
	case 'LINK_LIST_URL':
	  $listing_sql .= "l.links_url " . ($sort_order == 'd' ? 'desc' : '') . ", ld.links_title";
	  break;
	case 'LINK_LIST_IMAGE':
	  $listing_sql .= "ld.links_title";
	  break;
	case 'LINK_LIST_DESCRIPTION':
	  $listing_sql .= "ld.links_description " . ($sort_order == 'd' ? 'desc' : '') . ", ld.links_title";
	  break;
	case 'LINK_LIST_COUNT':
	  $listing_sql .= "l.links_clicked " . ($sort_order == 'd' ? 'desc' : '') . ", ld.links_title";
	  break;
  }
}
?>
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
<?php
// Get the right image for the top-right;-)
$image = 'table_background_list.gif';
if ($current_category_id) {
  $image_query = tep_db_query("select link_categories_image from " . TABLE_LINK_CATEGORIES . " where link_categories_id = '" . (int)$current_category_id . "'");
  $image_value = tep_db_fetch_array($image_query);

  if (tep_not_null($image_value['link_categories_image'])) {
	$image = $image_value['link_categories_image'];
  }
}
?>
		<td align="right"><?php echo tep_links_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><?php echo sprintf(TEXT_MAIN_LINKS, $link_categories_value['link_categories_name']); ?></td>		
  </tr>	  
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <?php if (tep_not_null($link_featured_cat)) { ?>
  <tr>
   <td class="linkFeatured"><table border="0" width="100%" cellspacing="0" cellpadding="2">
	<tr>
	 <td align="center"><?php echo TEXT_FEATURED_HEADING; ?></td>
	</tr>
	<tr>
	 <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	</tr>		
	<tr>
	 <td align="center"><?php echo $link_featured_cat; ?></td>
	</tr> 
   </table></td>
  </tr>  
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>				
  <?php } ?>		 
  <tr>
	<td>
	<?php if (LINKS_DISPLAY_FORMAT_STANDARD == 'True')
	  include(DIR_WS_MODULES . FILENAME_LINK_LISTING);
	 else
	  include(DIR_WS_MODULES . 'link_listing_vertical.php');
	?>
	</td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
		   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_LINKS, '') . '">' . tep_image_button('button_categories.gif', 'Link Categories') . '</a>'; ?></td>
			<td align="right" align="center"><?php echo tep_draw_form('check_links', tep_href_link(FILENAME_LINKS, 'lPath=1', 'NONSSL'), 'post', 'onSubmit="return true;" onReset="return true"') . tep_draw_hidden_field('action_search', 'process'); ?>
			Search <?php echo tep_draw_input_field('links_search', '', 'maxlength="255", size="30"', false) . tep_image_submit('button_quick_find.png', SEARCH); ?> 
		 	 	 </form></td>
			<td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_LINKS_SUBMIT, tep_get_all_get_params()) . '">' . tep_image_button('button_submit_link.gif', IMAGE_BUTTON_SUBMIT_LINK) . '</a>'; ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
   <td><?php include(DIR_WS_MODULES . FILENAME_LINK_SEARCH); ?></td>
  </tr> 
</table></td>
<?php
 }
?>
<!-- body_text_eof //-->
<td width="0" valign="top"><table border="0" width="0" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

currently using OSC2.2MS2 051113 with the following contributions:

 

AJAX Attributemanager 2.1 - All_products 4.4 - Banner manager 1.5b - banner hack picture in manager * description in product listing hack ms2 v2.4 * drop shadow boxes v.1.1 * Easy populater 2.76d-ms2 by surfalot * FCKEditor * header tag controller v2.5.9 * jcssmenu * LoginBox 5.6 * option type feature v1.71 * OSC-Cach-v1.1 * popup_imagecleaned_stilized_2 * Remove from cart button hack * scrolling bestsellers * Article manager1.4 * Links Manager v1.14. * proffessional invoice&packingslip 6.1 * Ultimate SEO URLs

Personaly i think all these features NEED to be in the main core as they are quite basic features that are missing. but then again what do i know?

Link to comment
Share on other sites

any thoughts on else can cause it ?

currently using OSC2.2MS2 051113 with the following contributions:

 

AJAX Attributemanager 2.1 - All_products 4.4 - Banner manager 1.5b - banner hack picture in manager * description in product listing hack ms2 v2.4 * drop shadow boxes v.1.1 * Easy populater 2.76d-ms2 by surfalot * FCKEditor * header tag controller v2.5.9 * jcssmenu * LoginBox 5.6 * option type feature v1.71 * OSC-Cach-v1.1 * popup_imagecleaned_stilized_2 * Remove from cart button hack * scrolling bestsellers * Article manager1.4 * Links Manager v1.14. * proffessional invoice&packingslip 6.1 * Ultimate SEO URLs

Personaly i think all these features NEED to be in the main core as they are quite basic features that are missing. but then again what do i know?

Link to comment
Share on other sites

No, I don't know what to suggest. The code you are having problems with has been in the contribution for some time and works for everyone else, as far as I know. So it has to be something in your code that is causing the problem.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

No, I don't know what to suggest. The code you are having problems with has been in the contribution for some time and works for everyone else, as far as I know. So it has to be something in your code that is causing the problem.

 

Jack

 

 

Hi jack thanks for your reply sorry wasnt around for few days so you said its cause of incompatability problem with osc and i need the security update? where i get that from?

 

and the asnwer to your other quesiton the store was live built on v 2.2 osc then i upgraded it wtih a heavily modified template. and added some codes to it too.

 

thanks again for your prompt support

 

http://www.passionsuk.com

Link to comment
Share on other sites

Jack,

 

I tried not to bother you with this, but no one else has been able to help me. Instead of me rehashing everything, please refer to this thread:

 

http://www.oscommerce.com/forums/index.php?sho...=236860&hl=

 

My links page is dead all cause the $random_product code wants to suddenly add in numbers, no matter how I edit the code. I've tried using different symbols than $, but no avail. This happened to me one before on a different page, but I don't remember which page nor what the fix was, but it was a symbol switch.

 

Thanks in advance for any help you can provide.

Link to comment
Share on other sites

Just installed Links Manager (running STS Template as well) and I have an issue. The links page displays the categories and the appropriate link count within the category, but when you click on the category, nothing is displayed. *BUT* if I set the link to be a featured link -- then they display as featured links. Any suggestions?

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...