Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Links Manager II


Recommended Posts

This is a replacment for the Links Manager contribution. However, due to the many changes made, the code is no longer compatible with that version so I'm starting this new thread to make support easier. This version addresses many of the short-comings the other contribution has. Here is list of the major changes:

 

- Added code to includes/modules/links_listing.php and missing classes for sort heading problem with the standard listing box.

- Added code based on code submitted by rabbitseffort that presents the link exchange information in the links submit page is an easy-to-copy format.

- Added option to check for blacklisted words. The words are defined in a new setting in admin->configuration->Links.

- Added option to disable reciprocal link checking for individual links.

- Added a count option to admin->Configuration->Links that will allow links to be checked by the Check links script a number of times before the link is disabled. This was needed since some sites may not be working when the check is performed.

- Added checkboxes to Links Status page to easily change status to Approved.

- Added option of having nested categories.

- Added option of having no categories (for display - one in admin still needs to exist).

- Added code to check for the existence of at least one category in admin->Links Manger->Links. If not found, the code redirects to the admin->Links Manger->Link Categories page.

- Added option to display link count, or not.

- Added option to create a new category from within the links edit page.

- Added link category name to the links page.

- Added login option to allow link partners to edit their own links.

- Added option to Featured Links so that a featured link will be displayed on all link pages or just on the one it is listed for.

- Changed code so that the breadcrumb link has the session ID attached.

- Changed code in admin/links.pgp so search function works as expected.

- Changed code in admin/links.php to generate a normal link instead of an SEO one, which was causing some sites problems. If you want that ability, you should install Ultimate SEO with the update for Links Manager.

- Changed links_db_update.php script so that it will update the admin->configuration->Links options while keeping the current settings in place.

- Changed code so that the categories description is displayed as a true categories description on the page under the page heading.

- Fixed search code so it finds the links from any page.

- Included fixes from partial updates and items mentioned in the support thread.

- Removed extra code from links_check.php file to speed up checking.

- Removed the code for the Rating option since it was never implemented.

- Renamed to Links Manager II since the large amount of changes would cause support problems.

- Made many small fixes and changes that are too numerous to mention.

 

I didn't convert the language files since I don't know the languages. The format of at least one changed so I couldn't just do a copy/paste without changing the original. So, either way, something would be wrong with those files. Converting them will not be difficult if you know the language though.

 

The code has been installed into several shops and no problems have been reported. But there is a lot of new code here so it is still possible that could happen. In other words - backup first.

 

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

dear jack

there is some issue with the links.php - see the message i get when used

 

1054 - Unknown column 'l.links_id' in 'on clause'

 

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

 

[TEP STOP]

 

http://printingcanvas.co.uk/links.php

 

can u give me a suggestion how to rectify this problems

cheers

valeri

Link to comment
Share on other sites

The categories show up. They indicate that there are links in them but when I click on the category box there are no links. The links show up in admin just fine though. Any ideas?

Link to comment
Share on other sites

dear jack

there is some issue with the links.php - see the message i get when used

 

1054 - Unknown column 'l.links_id' in 'on clause'

 

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

 

[TEP STOP]

 

http://printingcanvas.co.uk/links.php

 

can u give me a suggestion how to rectify this problems

cheers

valeri

Oops, that's an MySql V5 compatibility error. I meant to go through the code before I released it since I knew that would be a problem but I forgot. The following should fix it but there will probably be others so be sure to test all of the functions. For this one, in links.php, change
$count_links_query = tep_db_query("select l.links_status from " . TABLE_LINKS . " l LEFT JOIN " . TABLE_LINKS_DESCRIPTION . " ld on l.links_status = 2 and ld.language_id = '" . (int)$languages_id . "', " . TABLE_LINKS_TO_LINK_CATEGORIES . " l2c LEFT JOIN " . TABLE_LINK_CATEGORIES . " lc on l2c.links_id = l.links_id and lc.parent_id = '" . (int)$parentID . "'");

to

	$count_links_query = tep_db_query("select l.links_status from " . TABLE_LINKS . " l LEFT JOIN ( " . TABLE_LINKS_DESCRIPTION . " ld, " . TABLE_LINKS_TO_LINK_CATEGORIES . " l2c, " . TABLE_LINK_CATEGORIES . " lc ) on (l.links_status = 2 and ld.language_id = '" . (int)$languages_id . "' and l2c.links_id = l.links_id and lc.parent_id = '" . (int)$parentID . "')");

 

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

The categories show up. They indicate that there are links in them but when I click on the category box there are no links. The links show up in admin just fine though. Any ideas?
This was a common problem with the previous version and I forgot to work on it. You can look in the old support link (the last 2-4 pages) for the fix but I think it was setting the languages option to All in the link. Be sure you have the language options setup correctly in the admin->Configuration->Links options too.

 

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

G'day Jack,

 

On my links submit page it states: If you would like to edit an existing link, enter your login information and then click edit. Username: Password: then the edit button. There is no where to enter this information or do they enter it down the bottom of the page then have to scroll back up the page to click edit? Also a strange thing happens when you dont fill in any fields and just click edit, details of someones link just appears in the fields. Shouldnt a pop up screen say "you must login first" or something?

 

Thanks

Link to comment
Share on other sites

G'day Jack,

 

On my links submit page it states: If you would like to edit an existing link, enter your login information and then click edit. Username: Password: then the edit button. There is no where to enter this information or do they enter it down the bottom of the page then have to scroll back up the page to click edit? Also a strange thing happens when you dont fill in any fields and just click edit, details of someones link just appears in the fields. Shouldnt a pop up screen say "you must login first" or something?

 

Thanks

Are you saying there isn't a input box next to the username and password words? Can you provide a link to the page? As for just clicking on the edit button, that sounds like a coding problem. I will have to test it.

 

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, no input box next to the username & password near the edit button.( dont know if its suppose to have one there) Only down the bottom under login details. The edit button, tis a bit funny. You can see here.

 

Thanks

Link to comment
Share on other sites

There is a mistake in the code. The boxes appear on my installation but it is probably to do with the php version being used. In the links_submit.php file, find this line

<td class="main"<?php echo tep_draw_input_field('links_customer_edit_username'); ?></td>

and change it to

<td class="main"><?php echo tep_draw_input_field('links_customer_edit_username'); ?></td>

And change this

<td class="main"<?php echo tep_draw_password_field('links_customer_edit_password'); ?></td>

to this

<td class="main"><?php echo tep_draw_password_field('links_customer_edit_password'); ?></td>

 

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

This was a common problem with the previous version and I forgot to work on it. You can look in the old support link (the last 2-4 pages) for the fix but I think it was setting the languages option to All in the link. Be sure you have the language options setup correctly in the admin->Configuration->Links options too.

 

Jack

 

Thanks for the reply. The only language option I have is English. I removed the rest from my store. The configuration side all looks appropriate. Still no links.

Link to comment
Share on other sites

There is a mistake in the code. The boxes appear on my installation but it is probably to do with the php version being used. In the links_submit.php file, find this line
<td class="main"<?php echo tep_draw_input_field('links_customer_edit_username'); ?></td>

and change it to

<td class="main"><?php echo tep_draw_input_field('links_customer_edit_username'); ?></td>

And change this

<td class="main"<?php echo tep_draw_password_field('links_customer_edit_password'); ?></td>

to this

<td class="main"><?php echo tep_draw_password_field('links_customer_edit_password'); ?></td>

 

Jack

 

 

Thanks Jack, the boxes are there now but without filling in anything and just clicking the edit button, someones details still pop into the input boxes :blink:

 

Thanks

Link to comment
Share on other sites

As mentioned previously, that is a problem in the code. It is not a one line fix so I will have to make the code change and upload a new version. I will try to do that this week. If your installation is in a live shop, then I suggest turning that option off for now.

 

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

A new version has been uploaded with these changes:

 

- converted mysql calls to work properly with Mysql 5

- fixed coding errors that prevented login boxes from showing

- added code to check for a valid login for editing links

 

Just upload the included files to update from 1.16.

 

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

thanx for great update .. i just wanted to say, please keep full versions in contribution section .. don't post just fixes .. it will make such beautiful contribution a mess like a lot of others big contribs.

 

Thanx

Link to comment
Share on other sites

Ugh! I just found a mistake in the admin/links.php files that occurs when viewing pending links. You need to change this section of code

	$where = '';
if (isset($HTTP_GET_VARS['search']) && tep_not_null($HTTP_GET_VARS['search'])) {
  $keywords = tep_db_input(tep_db_prepare_input($HTTP_GET_VARS['search']));
  $where = ' where ';
  $search = " ld.links_title like '%" . $keywords . "%' or  l.links_url like '%" . $keywords . "%'";
}

if ($showLinkStatus == 'All')
  $links_query_raw = "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 " . TABLE_LINKS . " l left join ( " . TABLE_LINKS_DESCRIPTION . " ld ) on ( l.links_id = ld.links_id ) " . $where .  $search . " order by " . $order;
else
  $links_query_raw = "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 " . TABLE_LINKS . " l left join ( " . TABLE_LINKS_DESCRIPTION . " ld ) on ( l.links_id = ld.links_id ) " . $where . " l.links_status = '" . $showLinkStatus . "' and " . $search . " order by " . $order;

to this

	$where = ' where ';
if (isset($HTTP_GET_VARS['search']) && tep_not_null($HTTP_GET_VARS['search'])) {
  $keywords = tep_db_input(tep_db_prepare_input($HTTP_GET_VARS['search']));
  $where = ' where ';
  $search = " and ld.links_title like '%" . $keywords . "%' or  l.links_url like '%" . $keywords . "%'";
}
else if ($showLinkStatus == 'All')
  $where = '';

if ($showLinkStatus == 'All')
  $links_query_raw = "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 " . TABLE_LINKS . " l left join ( " . TABLE_LINKS_DESCRIPTION . " ld ) on ( l.links_id = ld.links_id ) " . $where .  $search . " order by " . $order;
else
  $links_query_raw = "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 " . TABLE_LINKS . " l left join ( " . TABLE_LINKS_DESCRIPTION . " ld ) on ( l.links_id = ld.links_id ) " . $where . " l.links_status = '" . $showLinkStatus . "'" . $search . " order by " . $order;

 

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

hmm .. in admin/links.php

 

1064 - syntax error near '( links_description ld ) on ( l.links_id = ld.links_id ) ' at line 1

 

select count(*) as total from links l left join ( links_description ld ) on ( l.links_id = ld.links_id )

 

also in admin/links_status.php

 

1064 - syntax error near '( links_description ld, links_check lc, links_status ls ) on ( l.links_id = ld.' at line 1

 

select count(*) as total from links l LEFT JOIN ( links_description ld, links_check lc, links_status ls ) on ( l.links_id = ld.links_id and l.links_id = lc.links_id and l.links_status = ls.links_status_id ) where ls.language_id = '4'

Edited by gregy
Link to comment
Share on other sites

yes .. the only fix was this one at #19

 

i still receive

 

1064 - syntax error near '( links_description ld ) on ( l.links_id = ld.links_id ) ' at line 1

 

select count(*) as total from links l left join ( links_description ld ) on ( l.links_id = ld.links_id )

 

at admin/links.php

Link to comment
Share on other sites

  • 2 weeks later...

I am hoping that you can help me. I have the 1.15 installed and was working fine, for a while. Now it shows counts in categories but I get this error at the very bottom of the page....

Error!

 

Unable to determine the page link!

 

I am using seo but was when I installed it.

 

 

I have read through these posts, language stuff is set as it should be. I wanted to try and install the new one not sure it will help. What changes would I have to do to change to this new one?

 

Any ideas on how to fix this old one and the error I am getting?

Edited by staradmire
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...