Jump to content
Latest News: (loading..)
Jack_mcs

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

Share this post


Link to post
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

Share this post


Link to post
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?


Sign Here

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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.


Sign Here

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

I totally agree. But since there is no way to control that, it will most likley happen sooner or later.

 

Jack

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

What version are you using? Did you apply the above changes?

 

Jack

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

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

×