Jump to content
Sign in to follow this  
VJ

[Contribution] Links Manager for osC v1.00

Recommended Posts

Is there a way to add nested catagories to this mod?

 

I would like to be able to add other catagories under a parent catatgories etc.

 

Thanks in advance.


_________________________________________________________________________

 

David G Aschenbrener

Tranquil | Sense - Your Stop for Tranquility.

Share this post


Link to post
Share on other sites

No, there isn't. That is planned for the next version but there is no telling when that might be.

 

Jack

Share this post


Link to post
Share on other sites

I will look at to see what someone one charge to implement this option.

 

Then I will make my contributition.

 

Thanks

 

No, there isn't. That is planned for the next version but there is no telling when that might be.

 

Jack


_________________________________________________________________________

 

David G Aschenbrener

Tranquil | Sense - Your Stop for Tranquility.

Share this post


Link to post
Share on other sites

Hi Brett,

 

Thanks for the great work. My default links URLs are replaced with SEO URLs. Yet, I'm having problems with the breadcrumb path which still refers to the default links URLs (links.php?lPath=9). Any idea how to solve this? Any suggestions?

 

Thank you in advance.

Share this post


Link to post
Share on other sites

Hi Brett,

 

Thanks for the great work. My default links URLs are replaced with SEO URLs. Yet, I'm having problems with the breadcrumb path which still refers to the default links URLs (links.php?lPath=9). Any idea how to solve this? Any suggestions?

 

Thank you in advance.

Edited by Shams

Share this post


Link to post
Share on other sites

There's a fix for that posted in this thread but I think I uploaded it in my last version too.

 

Jack

Share this post


Link to post
Share on other sites

Tiny improvement to the "nothing pops up" fix for Links help =>show the hand in Firefox.

Apologies in advance if I repeat something already in this thread.

...There isn't a hand there, so I hope people know it's a link, but it works now!

Hi I had the same problem (no popup). Thanks Jack for the fix. I modified the popup code to show the hand.

For those who like to please the w3c validator and follow standards, the following will pass.

 <script type="text/javascript">document.writeln('<a style="cursor:pointer; cursor:hand" onclick="java script:popup=window.open('  
										+ '\'<?php echo tep_href_link(FILENAME_POPUP_LINKS_HELP); ?>\',\'popup\','  
										+ '\'scrollbars,resizable,width=520,height=570,left=50,top=50\'); popup.focus(); return false;">'  
										+ '<span class="inputRequirement" style="font-size: larger"><?php echo TEXT_LINKS_HELP_LINK; ?><\/span><\/a>');</script>  

			   <?php //  echo '<a href="java script:popupWindow(\'' . tep_href_link(FILENAME_POPUP_LINKS_HELP) . '\')">' . TEXT_LINKS_HELP_LINK . '</a>'; ?>

Be sure there is no space between java and script.

-i.


*** Je suis plus souvent sur le forum français ***

ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15

local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update)

remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9

 

You never get a second chance to make a first impression.

Share this post


Link to post
Share on other sites

Tiny improvement to the "nothing pops up" fix for Links help =>show the hand in Firefox.

Apologies in advance if I repeat something already in this thread.

...There isn't a hand there, so I hope people know it's a link, but it works now!

Hi I had the same problem (no popup). :blink: Thanks Jack for the fix. :thumbsup:

I modified the popup code to show the hand.

For those who like to please the w3c validator and follow standards, the following will pass.

Repeat of Jack's suggestion with slightly modified line :

Replace :

<?php  echo '<a href="java script:popupWindow(\'' . tep_href_link(FILENAME_POPUP_LINKS_HELP) . '\')">' . TEXT_LINKS_HELP_LINK . '</a>'; ?>

with

 <script type="text/javascript">document.writeln('<a style="cursor:pointer; cursor:hand" onclick="java script:popup=window.open('  
										+ '\'<?php echo tep_href_link(FILENAME_POPUP_LINKS_HELP); ?>\',\'popup\','  
										+ '\'scrollbars,resizable,width=520,height=570,left=50,top=50\'); popup.focus(); return false;">'  
										+ '<span class="inputRequirement" style="font-size: larger"><?php echo TEXT_LINKS_HELP_LINK; ?><\/span><\/a>');</script>

Be sure there is no space between java and script.

 

References :

Backslash for closing tags within javascript.

Cross browser cursor : style="cursor: pointer; cursor: hand;"

-i.


*** Je suis plus souvent sur le forum français ***

ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15

local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update)

remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9

 

You never get a second chance to make a first impression.

Share this post


Link to post
Share on other sites

Big thanks to uscetech for posting how to make Ultimate SEO work with Link Manager. Worked great.

Repeated here for conveniance if someone needs it.

-i.

 

This is what I had to do to get "Links Manager V 1.14b" and "Ultimate SEO URLs - 2.1d" to play nice together.

 

In /catalog/includes/classes/seo.class.php

 

In the function href_link, I changed:

 

		if ( !in_array($page, $this->attributes['SEO_PAGES']) || $this->attributes['SEO_ENABLED'] == 'false' ) {
			return $this->stock_href_link($page, $parameters, $connection, $add_session_id);
		}

 

To

 

		if (( !in_array($page, $this->attributes['SEO_PAGES']) || $this->attributes['SEO_ENABLED'] == 'false' ) && ($page != FILENAME_LINKS)) {
			return $this->stock_href_link($page, $parameters, $connection, $add_session_id);
		}

 

Because it was erasing the html link parameters.

 

Then in the function parse_parameters, I added:

 

				case 'lPath':
						switch(true){
					case ($page == FILENAME_LINKS):
						  $url = $this->make_url($page, $this->get_link_name($p2[1]), $p2[0], $p2[1], '.html', $separator);
						  break;
					default:
				  $container[$p2[0]] = $p2[1];
				  break;
					} # end switch
						break;

 

right after the "break;" and right before "case 'cPath':"

 

Then I added the function

 

	function get_link_name($lPath){
		switch(true){
			case ($this->attributes['USE_SEO_CACHE_GLOBAL'] == 'true' && defined('LINK_NAME_' . $lPath)):
				$this->performance['CACHE_QUERY_SAVINGS']++;
				$return = constant('LINK_NAME_' . $lPath);
				$this->cache['LINKS'][$lPath] = $return;
				break;
			case ($this->attributes['USE_SEO_CACHE_GLOBAL'] == 'true' && isset($this->cache['LINKS'][$lPath])):
				$this->performance['CACHE_QUERY_SAVINGS']++;
				$return = $this->cache['LINKS'][$lPath];
				break;
			default:
				$this->performance['NUMBER_QUERIES']++;
				$sql = "SELECT link_categories_name as lName
					FROM ".TABLE_LINK_CATEGORIES_DESCRIPTION."
					WHERE link_categories_id='".(int)$lPath."'
					AND language_id='".(int)$this->languages_id."'
					LIMIT 1";
				$result = $this->DB->FetchArray( $this->DB->Query( $sql ) );
				$lName = $this->strip( $result['lName'] );
				$this->cache['ARTICLES'][$aID] = $lName;
				$this->performance['QUERIES']['TOPICS'][] = $sql;
				$return = $lName;
				break;
		} # end switch
		return $return;
	} # end function

 

right before the function "function get_category_name(&$cID){"

 

In the function SEO_URL, I changed:

 

		$this->reg_anchors = array('products_id' => '-p-',
								   'cPath' => '-c-',
								   'manufacturers_id' => '-m-',
								   'pID' => '-pi-',
								   'tPath' => '-t-',
								   'articles_id' => '-a-',
								   'products_id_review' => '-pr-',
								   'products_id_review_info' => '-pri-',
								   'info_id' => '-i-'
								   );

 

To

 

		$this->reg_anchors = array('products_id' => '-p-',
								   'cPath' => '-c-',
								   'manufacturers_id' => '-m-',
								   'pID' => '-pi-',
								   'tPath' => '-t-',
								   'articles_id' => '-a-',
								   'products_id_review' => '-pr-',
								   'products_id_review_info' => '-pri-',
								   'info_id' => '-i-',
								   'lPath' => '-links-'
								   );

 

After that, then when I click on a link category, it displays the SEO URL instead of lPath=#.

 

But the email link was giving me issues and I made a little change there also. Around line 205 in the file "/catalog/admin/links.php", I changed:

$siteURL = sprintf("%s/%s-links-%s.html", HTTP_CATALOG_SERVER, $catname, $category['link_categories_id']);

 

To

 

$siteURL = sprintf("%s%s-links-%s.html", HTTP_CATALOG_SERVER . DIR_WS_CATALOG, strtolower($catname), $category['link_categories_id']);

 

The catalog dir was missing from the link and I like all lowercase links so I added that also. Now its working fine ;)

 

 

To all :

For the same mail message, I also changed in catalog/admin/links.php,

from :

if ($links_status_array[$links_status] == 'Approved')

to :

if ($links_status['id'] == 2)

which is better for multi-language stores.

Seemed to work but didn't test for various statuses to make sure mail wan't sent. There are more changes like that to make.

-i.

Edited by IndiaStarker

*** Je suis plus souvent sur le forum français ***

ms2fr, Header Tags 2.5.5b, Order logging before payment, Better PayPal Description perso, Free shipping per product, Must agree to terms, Country State Selector, World Zones, Visible countries, Store Pick Up, several shipping modules, Personal Invoice Number, 'On the Fly' Auto Thumbnailer using GD Library, More_Pics_6 for 2.2 ms2, Ultimate SEO URLs 2-2.1d/e,Virement Bancaire, Estimated Shipping 1.5, xml_guide, SP+,Step By Step 1.8, Order Editor 2.6.3, Google Analytics, Dynamic Sitemap 2.0, OSC-Expeditor, Recover Cart Sales, Links Manager 1.15

local : linux 2.6 Fedora Core 3, server : APACHE 2.0.54, MySQL 4.1.18, php : 4.4.0 (on strike refuse to update)

remote : IcoOpenBSD 4.x, server : IcodiaSecureHttpd, MySQL 4.1.24, php : 4.4.9

 

You never get a second chance to make a first impression.

Share this post


Link to post
Share on other sites

Hi,

 

I have followed the install instructions for version 1.15 but when i come to add the sql file into my database i am presented with the following error:

 

SQL query:

 

INSERT INTO configuration( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added )

VALUES (

 

'Title for the Link InfoBox to your site', 'LINKS_MANAGER_MYINFO_TITLE', 'Our Link-Information', 'Title for the Link InfoBox to your site', '10050', '100', now( )

)

MySQL said:

 

#1062 - Duplicate entry '0' for key 1

 

Can anyone point me in the right direction here?

 

Many Thanks

D4

Share this post


Link to post
Share on other sites

It's a problem with that version. If you go back a few pages, I think someone posted a fix.

 

Jack

Share this post


Link to post
Share on other sites

A new version of Links Manager is now available. Due to the many changes made, I have renamed it and started a

new support thread. Trying to support both versions in one thread, especially one this large, would cause too many problems. So if you use the new version, please ask your questions in that thread. I will continue to support my versions that apply to this thread for those that don't want to update.

 

Jack

Share this post


Link to post
Share on other sites
Hi All,

 

Firstly, great contribution...

 

I have a FRESH install of Oscommerce 2.2ms2-051113 with only CCGV installed.

Apache 2.0.55, PHP 5.1.1, MySQL 4.1

 

I performed the install of Links Manager 1.2 (by Nventa 8 Apr 2006).

 

1. VERY SLOW PAGE LOAD: when selecting a link category on catalog/links.php. Has anyone else experienced this?

 

2. LINK SUBCATEGORIES: I really need an ability to have a sub-category within the link category. Has anyone figured out how to do this? (I should think it would be too hard, but I'm not a coding/sql expert).

 

3. ADMIN ERRORS: When selecting 'New Link' on the /catalog/admin/links.php I get top of page errors, however the functionality of the page still works.

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in C:\Program Files\Apache Group\Apache2\htdocs\catalog\admin\links.php on line 177

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in C:\Program Files\Apache Group\Apache2\htdocs\catalog\admin\links.php on line 177

Warning: reset() [function.reset]: Passed variable is not an array or object in C:\Program Files\Apache Group\Apache2\htdocs\catalog\admin\includes\classes\object_info.php on line 17

Warning: Variable passed to each() is not an array or object in C:\Program Files\Apache Group\Apache2\htdocs\catalog\admin\includes\classes\object_info.php on line 18

 

This error also occurs when creating a 'new Link' on catalog/admin/link_categories.php

 

Any help would be appreciated.

 

Otherwise, a great contribution.

 

Did you find the solution? Im getting same error!

Thanks

Share this post


Link to post
Share on other sites

Hey everyone,

I like this contrib i just cant work out how to change the email for the links submission, i want a different email to the store email for links as it appears I get alot of spam from the link requests...also does anyone have any solutions for spam with this contrib...?

Timon

Natural Body Skin Care

 

P.s... Im using Links Manager v1.00

Edited by timon

Share this post


Link to post
Share on other sites
Hey everyone,

I like this contrib i just cant work out how to change the email for the links submission, i want a different email to the store email for links as it appears I get alot of spam from the link requests...also does anyone have any solutions for spam with this contrib...?

Timon

Natural Body Skin Care

 

P.s... Im using Links Manager v1.00

Links Manager II has options to control spam. You might want to try upgrading.

 

Jack

Share this post


Link to post
Share on other sites

After installing this contribution I want to approve some links but I get this messages:

 

Warning: file(includes/tld.txt) [function.file]: failed to open stream: No such file or directory in /virtualusers/10046/sites/tim.acenius.com/public_html/admin/includes/functions/validations.php on line 85

 

Warning: Variable passed to each() is not an array or object in /virtualusers/10046/sites/tim.acenius.com/public_html/admin/includes/functions/validations.php on line 86

 

Warning: eregi() [function.eregi]: REG_EMPTY in /virtualusers/10046/sites/tim.acenius.com/public_html/admin/includes/functions/validations.php on line 97

 

 

Can anyone help me with this? Now it is unable to approve links...

Share this post


Link to post
Share on other sites

This doesn't appear to be a Links Manager problem. The error is saying it can't find includes/tld.txt, which is a standard oscommerce file. Perhaps it was deleted somehow with this installation.

 

Jack

Share this post


Link to post
Share on other sites
This doesn't appear to be a Links Manager problem. The error is saying it can't find includes/tld.txt, which is a standard oscommerce file. Perhaps it was deleted somehow with this installation.

 

Jack

 

Thanks! For some reason this file was missing, maybe removed during the installation...

 

Anyway, many thanks!

Share this post


Link to post
Share on other sites

Hi Jack,

 

using link manager II v1.23 and looked at the sub categories, the subcategory is there and it works.

 

However when selecting in admin and when submitting a link on the links page it shows as if its a main category.

 

Is it not possible for the categories to be selectable >main cat>subcat rather than a list of what appears to be just main categories.

 

Thanks


Getting better with mods but no programmer am I.

Share this post


Link to post
Share on other sites

Hi Jack,

 

using link manager II v1.23 and looked at the sub categories, the subcategory is there and it works.

 

However when selecting in admin and when submitting a link on the links page it shows as if its a main category.

 

Is it not possible for the categories to be selectable >main cat>subcat rather than a list of what appears to be just main categories.

I don't understand your question. Are you saying you can't select sub-categories in admin?

 

Also, please post questions about Links Manager II in its support thread.

Edited by Jack_mcs

Share this post


Link to post
Share on other sites

Hi Jack,

 

Another great contribution.

 

I have everything working great but had a question that I might have something wrong or there is a small bug not sure.

 

I am using the latest version of the add on and I am in the Links Manager II admin area. I click on the Links link and I have my list of links there. I click on the edit button for one of them and at the bottom of that page there is the pull down box with pending, approved and they are approved. Then I go to the link on the left that says Links Status and all of the links that are approved all have a question mark there. They do say in the table that they are approved but the question mark is still there. Did I do something wrong or is there a bug in this part of it?

 

Joe

Share this post


Link to post
Share on other sites

I am using the latest version of the add on and I am in the Links Manager II admin area. I click on the Links link and I have my list of links there. I click on the edit button for one of them and at the bottom of that page there is the pull down box with pending, approved and they are approved. Then I go to the link on the left that says Links Status and all of the links that are approved all have a question mark there. They do say in the table that they are approved but the question mark is still there. Did I do something wrong or is there a bug in this part of it?

That link status section is meant to show, at a glance, if the link exists on the other site or not. The status column won't be updated until that table is updated via the cron job that checks the links. I will change that in a future version though.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×