Jump to content
Jack_mcs

Links Manager II

Recommended Posts

You can enter the details for a new link by clicking the new link button in the Links Manager II admin page. Enter the contact details as your own, but the url and description to match the site you wish to link to. Turn off link checking for that url - it isn't going to work until your link is approved anyway. You then just look up the appropriate link page url to feed to the other site.

 

Simple ;)

 

Paul

 

Great!.. ok.. sounds good to me. Means to an end!!!

 

Iceman

Share this post


Link to post
Share on other sites
Firstly, thanks for a great contribution! Just implemented 1.18 on www.greatgiftsgalore.co.uk which (now!) uses a modified/compatible version of Ultimate SEO. I've Made a few changes/fixes and thought I'd post them here for others.

 

In catalog/links_submit.php before <!doctype

 

Changed:

$breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_LINKS));

 

To:

$breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_LINKS_SUBMIT));

 

The breadcrumb link was wrong.

 

In catalog/links.php (around line 93) added:

if  ($link_featured_cat == $link_featured) $link_featured_cat = '';

 

BEFORE

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

 

This stops getting two identical featured links if you end up with only one active....

 

And around line 104 commented out the existing code and replaced it (left it in for comparison):

 

// $breadcrumb->add($pathStr[$i], FILENAME_LINKS . '?parentID=' . tep_get_category_id($pathStr[$i]));
$breadcrumb->add($pathStr[$i], tep_href_link(FILENAME_LINKS, 'lPath=' . tep_get_category_id($pathStr[$i])));

 

I'm only using (and only ever will use) 1 level of category, so I wanted to get rid of the parentid=0 parameters. So around line 198 I replaced this:

$lPath_new = 'parentid=' . $categories['parent_id'] . '&lPath=' . $categories['link_categories_id'];

 

WITH:

$lPath_new = 'lPath=' . $categories['link_categories_id'];

 

It may be best to test for nested categories, and if none found use the new code, else use old. I did this for the next section, so will probably go back and fix it now I've noticed :rolleyes:

 

Finally, around line 485 I replaced:

					<?php
				  $prev_query = tep_db_query("select parent_id from " . TABLE_LINK_CATEGORIES . " where link_categories_id = '" . $lPath . "'");
				  if (tep_db_num_rows($prev_query)) {
				   $prev = tep_db_fetch_array($prev_query);  

				?>
				   <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_LINKS, 'lPath='.$prev['parent_id']) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
				<?php
					}
				?>				 
				<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.gif', SEARCH); ?> 
		 	 		 </form></td>
				<td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_LINKS_SUBMIT, tep_get_all_get_params()'lPath=' . $lPath) . '">' . tep_image_button('button_submit_link.gif', IMAGE_BUTTON_SUBMIT_LINK) . '</a>'; ?></td>

 

WITH:

					<?php
				  $prev_query = tep_db_query("select parent_id from " . TABLE_LINK_CATEGORIES . " where link_categories_id = '" . $lPath . "'");
				  if (tep_db_num_rows($prev_query)) {
				   $prev = tep_db_fetch_array($prev_query);  
				   if ($parentid != 0) {  
				?>
				   <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_LINKS, 'lPath='.$prev['parent_id']) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
				<?php
					}
				  else{
				  ?>
				   <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_LINKS) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
				<?php
				   }
					}
				?>				 
				<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.gif', SEARCH); ?> 
		 	 		 </form></td>
				<?php if ($lPath != 0) { ?>
				<td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_LINKS_SUBMIT, tep_get_all_get_params()'lPath=' . $lPath) . '">' . tep_image_button('button_submit_link.gif', IMAGE_BUTTON_SUBMIT_LINK) . '</a>'; ?></td>
				<?php }
				else
				{ ?>
				 <td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_LINKS_SUBMIT) . '">' . tep_image_button('button_submit_link.gif', IMAGE_BUTTON_SUBMIT_LINK) . '</a>'; ?></td>
				<?php } ?>

 

This will fix up the button parameters for correct SEO links (including getting rid of the -link-0.html), and in the case of single level categories eliminate the parentid parameter altogether (and the unnecessary sort one from the submit link button).

 

The submit_link.php file is still not SEO optimised in terms of parameters, but I've disallowed it in robots.txt anyway...

 

Hope I've managed to keep out the typos, and that this helps someone.

 

Paul

 

I have ultimate SEO installed and I get this error..

 

Not Found

The requested URL /shop/business-links-3.html was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/1.3.39 Server at herasonlinemarket.com Port 80

 

So I added the above.. that I have in quotes from page the second to the last page.

and when I did that I get this errors

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/hera/public_html/shop/links.php on line 506

 

that line is in this part of the code is colored in red.. please help how do I fix this. I just don't have enough knowledge for find it thank you.

 

noppie

 

<?php

$prev_query = tep_db_query("select parent_id from " . TABLE_LINK_CATEGORIES . " where link_categories_id = '" . $lPath . "'");

if (tep_db_num_rows($prev_query)) {

$prev = tep_db_fetch_array($prev_query);

if ($parentid != 0) {

?>

<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_LINKS, 'lPath='.$prev['parent_id']) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>

<?php

}

else{

?>

<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_LINKS) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>

<?php

}

}

?>

<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.gif', SEARCH); ?>

</form></td>

<?php if ($lPath != 0) { ?>

<td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_LINKS_SUBMIT, tep_get_all_get_params()'lPath=' . $lPath) . '">' . tep_image_button('button_submit_link.gif', IMAGE_BUTTON_SUBMIT_LINK) . '</a>'; ?></td>

<?php }

else

{ ?>

<td class="main" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_LINKS_SUBMIT) . '">' . tep_image_button('button_submit_link.gif', IMAGE_BUTTON_SUBMIT_LINK) . '</a>'; ?></td>

<?php } ?>


Peace is possible.. Please don't give up.

 

"War is --the old betraying the young"

Share this post


Link to post
Share on other sites

You have to be sure to use Ultimate SEO version d or e (possibly others ones). If you don't have a command for links in your .htaccess file, then you probably don't have the correct version.

 

Jack

Share this post


Link to post
Share on other sites
You have to be sure to use Ultimate SEO version d or e (possibly others ones). If you don't have a command for links in your .htaccess file, then you probably don't have the correct version.

 

Jack

 

thank you Jack

 

I found the fix on the SEO Ulitmate forum

SEO Ulitmate fix

 

Options +FollowSymLinks
RewriteEngine On
RewriteBase /shop/

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}
[color="#FF0000"]RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}[/color]


Peace is possible.. Please don't give up.

 

"War is --the old betraying the young"

Share this post


Link to post
Share on other sites

I get the following problem when I click on a link category on my site:

 

The requested URL /link-links-3.html was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

In addition the links page is not showing up in the same color scheme as the rest fo the site. You can see the difference here:

 

http://www.medicadepot.com

 

and

 

http://www.medicadepot.com/links.php

 

Anyone that can help me out with this, I would really really appreciate it.

 

I am using osCommerce 2.2-MS2 and I have installed SEO URL's as well. Again any help would be greatly appreciated. Also I have the Links Manager II V 1.18.

Edited by medicadepot

Share this post


Link to post
Share on other sites
I get the following problem when I click on a link category on my site:

 

The requested URL /link-links-3.html was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Did you try reading back through the thread? This question gets asked often and is even mentioned a few posts up.

 

Jack

Share this post


Link to post
Share on other sites

hello,

 

i'm a french user to oscommerce and i'av installed Linkmanager II but i'm a problem:

 

Warning: Division by zero in /home/mondomaine/www/admin/includes/classes/split_page_results.php on line 33

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 '-0, MAX_LINKS_DISPLAY' 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_reciprocal_disable, l.links_status from links l left join ( links_description ld ) on ( l.links_id = ld.links_id ) order by ld.links_title limit -0, MAX_LINKS_DISPLAY

 

 

can you help me

 

thanks

 

jolilola

Share this post


Link to post
Share on other sites

i come to do update the BDD to update_changes_v_1.09_to_1.10.txt and

i have an error:

 

#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 '")

INSERT INTO links_status VALUES ( '2', '2', 'Approved')")

INSERT INTO' at line 1

 

 

that is my probleme??? to explain

 

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 '-0, MAX_LINKS_DISPLAY' 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_reciprocal_disable, l.links_status from links l left join ( links_description ld ) on ( l.links_id = ld.links_id ) order by ld.links_title limit -0, MAX_LINKS_DISPLAY

Share this post


Link to post
Share on other sites

Try applying the split_page_results.php patch from the oscommerce updates.

 

Jack

Share this post


Link to post
Share on other sites
Try applying the split_page_results.php patch from the oscommerce updates.

 

Jack

 

Hi Jack,

 

I seem to be having a similar problem to some other users although there doesn't seem to be a fix. I have read through the 15 pages of this thread and am still not having any joy. I have added the above split_page_results.php patch but still no success.

 

My error message is:

 

1064 - You have an error in your SQL syntax near '( links_description ld, links_to_link_categories l2c, link_categories lc ) on (l' at line 1

 

select l.links_status from links l LEFT JOIN ( links_description ld, links_to_link_categories l2c, link_categories lc ) on (l.links_status = 2 and ld.language_id = '1' and l2c.links_id = l.links_id and lc.parent_id = '0') LIMIT 10000

 

I am running MySQL version 3.23.56.

 

Any ideas would be greatly appreciated. I take it, there is a problem with the sql statement and compatibility with version 3 of mysql.

 

Regards, Jamie

Share this post


Link to post
Share on other sites

That version of mysql is very old so it is probably a bug issue. I recall that a version around that one had some serious issues and LEFT JOIN wasn't fixed untill after 4.0 was released.

 

Jack

Share this post


Link to post
Share on other sites

I've never tried it but there isn't any reason why it shouldn't work. You might want to ask in the STS thread though.

 

Jack

Share this post


Link to post
Share on other sites
That version of mysql is very old so it is probably a bug issue. I recall that a version around that one had some serious issues and LEFT JOIN wasn't fixed untill after 4.0 was released.

 

Jack

 

 

Hi Jack, Thanks for the reply. Would you be able to tell me the last stable version of the Links Manager contribution that I would be able to install without the "LEFT JOIN" MySQL syntax so it will (hopefully) work with MySQL Version 3.23.

 

Cheers, Jamie

Share this post


Link to post
Share on other sites

All of the Links Manager II versions will probably fail the same way. You can try an early version of Links Manager, though you will lose a lot of featured. You will probably need to choose a version from around 2003, maybe 2004, since that is when your version of mysql was in use, as I recall.

 

Jack

Share this post


Link to post
Share on other sites

Hi Jack,

 

Wow that's a lot of code you made here, it works perfect. Thanks for the great contribution.

 

I have one question though; the images that appear on my linkpage are a bit ugly. I was wondering if the scaling ratio could be changed. Do you know in witch file I'll have to look?

 

Thanks again.

Share this post


Link to post
Share on other sites
Hi Jack,

 

Wow that's a lot of code you made here, it works perfect. Thanks for the great contribution.

 

I have one question though; the images that appear on my linkpage are a bit ugly. I was wondering if the scaling ratio could be changed. Do you know in witch file I'll have to look?

 

Thanks again.

Thank you. :)

 

The size of the images are controlled by the image width and height settings in admin->Configuration->Links. You can try leaving one of them blank if your images are not about the same dimensions.

 

Jack

Share this post


Link to post
Share on other sites
Thank you. :)

 

The size of the images are controlled by the image width and height settings in admin->Configuration->Links. You can try leaving one of them blank if your images are not about the same dimensions.

 

Jack

 

 

Again; WOW what a lot of options, I didn't even know about that Config screen. But now I do and I have changed it a little bit and my linkspage looks very good now.

 

Thanks again :lol: for the reply and the time for making this contribution.

Share this post


Link to post
Share on other sites

I have added this contribution to a clients site and I get this error when going to a category in the links section:

Warning: Cannot modify header information - headers already sent by (output started at /home/azoutdri/public_html/links.php:90) in /home/azoutdri/public_html/includes/classes/seo.class.php on line 1046

Warning: Cannot modify header information - headers already sent by (output started at /home/azoutdri/public_html/links.php:90) in /home/azoutdri/public_html/includes/classes/seo.class.php on line 1047

Warning: Cannot modify header information - headers already sent by (output started at /home/azoutdri/public_html/links.php:90) in /home/azoutdri/public_html/includes/classes/seo.class.php on line 1046

Warning: Cannot modify header information - headers already sent by (output started at /home/azoutdri/public_html/links.php:90) in /home/azoutdri/public_html/includes/classes/seo.class.php on line 1047

Warning: Cannot modify header information - headers already sent by (output started at /home/azoutdri/public_html/links.php:90) in /home/azoutdri/public_html/includes/classes/seo.class.php on line 1046

Warning: Cannot modify header information - headers already sent by (output started at /home/azoutdri/public_html/links.php:90) in /home/azoutdri/public_html/includes/classes/seo.class.php on line 1047

It only shows up when you get to the links section by clicking on the links page and then the links category

http://azoutdrive.com/links.php > http://azoutdrive.com/links-links-1.html?parentid=0

If you get rid of "?parentid=0" the error goes away....

I have checked both pages referenced in the error for white space but there is none so i dont know what to do. I would also like to get rid of the categories and just have one page for links instead of choosing a category. Is this possible?

Share this post


Link to post
Share on other sites
I have added this contribution to a clients site and I get this error when going to a category in the links section:

 

It only shows up when you get to the links section by clicking on the links page and then the links category

http://azoutdrive.com/links.php > http://azoutdrive.com/links-links-1.html?parentid=0

If you get rid of "?parentid=0" the error goes away....

I have checked both pages referenced in the error for white space but there is none so i dont know what to do. I would also like to get rid of the categories and just have one page for links instead of choosing a category. Is this possible?

Do you have a version of Ultimate SEO installed that works with Links Manager?

 

To not use categories, turn off the Display Links in Categories option.

 

Jack

Share this post


Link to post
Share on other sites
Do you have a version of Ultimate SEO installed that works with Links Manager?

 

To not use categories, turn off the Display Links in Categories option.

 

Jack

 

I have Ultimate_SEO_URLs_v2-2.2e installed and I dont have any idea if it is supposed to work with links manager II. I have it installed on my other sites and it works fine on those....

 

Turning off the categories worked though and now I am not getting an error.

 

Once again you have come to the rescue Jack, Thanks!

Share this post


Link to post
Share on other sites

Looking at my other sites I am apparently not using Links Manager II because I do not have the option to turn the categories off... Will I have other problems with my Ultimate SEO URLS using this contribution?

Share this post


Link to post
Share on other sites

It works fine with Ultimate SEO as long as the version you are using is setup for it. Look in your .htaccess file and see if there is a command for links. That won't say for sure if your version has the needed code but it is a good indication.

 

Jack

Share this post


Link to post
Share on other sites

My .htaccess file says this

 

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

 

near the bottom....

Share this post


Link to post
Share on other sites
My .htaccess file says this

 

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

 

near the bottom....

Then it is probably OK. You can try turning Ultimate SEO off in admin just to see if Links Manager functions as expected. If so, then it is a problem between the two. But since they are commonly used together, that would mean the Ultimate SEO version you have is causing the problem.

 

Jack

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

×