Jump to content
Jack_mcs

Links Manager II

Recommended Posts

Thanks for your reply Jack

 

I do have the latest version of this contribution V1.22, but I pasted the wrong lines into my post above, from another file, apologies for the incorrect information.

 

the correct lines in catalog/links_submit.php are:

 

if ((strpos($links_title, $parts[$i]) !== FALSE) ||

(strpos($links_url, $parts[$i]) !== FALSE) ||

(strpos($links_category, $parts[$i]) !== FALSE) ||

(strpos($links_category_suggest, $parts[$i]) !== FALSE) ||

(strpos($links_description, $parts[$i]) !== FALSE) ||

(strpos($links_image, $parts[$i]) !== FALSE) ||

(strpos($links_contact_name, $parts[$i]) !== FALSE) ||

(strpos($links_contact_email, $parts[$i]) !== FALSE))

The warning error is still on lines 132 through to 139.

 

Thanks for any help you can provide Jack.

Share this post


Link to post
Share on other sites

For the benefit of anyone else who may come across this error/warning at some stage.

 

I finally found the cause of the error/warning in the above posts. The lines 132 to 139 were contained in the Blacklisted words function in catalog/links_submit.php file shown below.

 

This was the error/warning:

Warning: strpos(): Empty delimiter. in /catalog/links_submit.php on line 132

 

This is the function:

//CHECK FOR BLACKLISTED WORDS AS DEFINED IN admin->configuration->Links

if ( tep_not_null(LINKS_CHECK_BLACKLIST))

{

$parts = explode(",", LINKS_CHECK_BLACKLIST);

 

for ($i = 0; $i < count($parts); ++$i)

{

if ((strpos($links_title, $parts[$i]) !== FALSE) ||

(strpos($links_url, $parts[$i]) !== FALSE) ||

(strpos($links_category, $parts[$i]) !== FALSE) ||

(strpos($links_category_suggest, $parts[$i]) !== FALSE) ||

(strpos($links_description, $parts[$i]) !== FALSE) ||

(strpos($links_image, $parts[$i]) !== FALSE) ||

(strpos($links_contact_name, $parts[$i]) !== FALSE) ||

(strpos($links_contact_email, $parts[$i]) !== FALSE))

{

$error = true;

$messageStack->add('submit_link', ENTRY_LINKS_BLACKLISTED);

}

}

}

 

I had list of words that I had inserted into my blacklisted words in admin/links and decided to remove a phrase but had left a comma at the end of the last word. This was the empty delimiter that was referred to in the error/warning. eg. bad word a, bad word b, bad word c, <--- notice the comma at the end of the line.

 

After I removed the comma, it worked perfectly and the warning disappeared.

Share this post


Link to post
Share on other sites

Good catch. Thanks for posting it. I'll change the code to account for that in the next release.

 

Jack

Share this post


Link to post
Share on other sites

Hi!

 

First, my server setup: MySQL 5.0.41 and PHP 5.2.5

 

So I removed the old Links Manager so as to be up-to-date and went for this new one instead i.e. Links Manager II V 1.22 - Jack_mcs 7 Jan 2009 . The upshot of the whole matter was very good!

 

There is one glitch though and it has to do with Checking the links.

 

1. In Configuration->Links->Links Check Phrase, I have the relevant words.

 

2. I have put a link on another domain containing all of those relevant words.

 

3. I have got everything to show up in the admin/Links Manager II

 

Now when I click the button Check Links on the page admin/Links Manager II/links.php page I'm taken to a page with the titel: Links Manager - Checked Links. There the Name and URL shows, but it also shows a red cross indicating that the Reciprocal link is not Found.

 

If I instead click the "check links" button to the right (for this particular link that I have added) I get this message: "Link Check Result: Error Reading URL" and below is the actual and correct URL listed. Also I noticed a strange thing here, the characters dis 0 appears at the top of the page. I searched for these characters and found one instance in admin/links.php at line 283 which reads:

 echo 'dis '.$lInfo->links_reciprocal_check_count;

 

In the admin/links.php when in edit mode there is a box below the title Reciprocal Page Details. In this box there are three rows where the last is Recprocal Check Count. I'm not sure of the meaning of this. Does it have to do with the number of times the script checks for the reciprocal link? If so, it should be the same as the setting in admin/configuration/links -> Reciprocal Link Check Count, I guess. But these doesn't match. One is 0 and the other (in Configuration->Links is set to 2.

 

I forgot to mention that dis 0 becomes dis 1 if I in edit mode change the 0 to 1 in admin/links.php in the input box Recprocal Check Count.

 

Thanks in advance!

Share this post


Link to post
Share on other sites

The line of code

echo 'dis '.$lInfo->links

was used for debugging and shouldn't be in there. It can be safely deleted but shouldn't make a difference either way.

 

If the Check Links option isn't working, be sure the text you have entered in "Links Check Phrase" is separated by commas where appropriate and that at least one of those is on the page on the other site where your link is located, not just on the other site.

 

The "Recprocal Check Count" setting in admin->Configuration->Links is a global setting. It can be overridden by the one on the edit page.

 

Jack

Share this post


Link to post
Share on other sites

No sorry, I keep getting Link Check Result: Error Reading URL.

 

I have added the link on the other site, like so: <a href="http://www.MyDomain.se" target="_blank">MyDomain</a> Blommor och Presenter (=Flowers and Gifts)

 

In admin->Links Manager II->Links (edit mode) I have added Reciprocal Page Details->Reciprocal Page: http://TheOtherSite.se/index.html, on which page I added the actual link.

 

In admin->Configuration->Links I have Links Check Phrase set like so: MyDomain,Blommor,Presenter.

 

I would guess it has to do with something I don't understand.

 

If you need access to anything that would make it easier, please let me know.

Edited by kbking

Share this post


Link to post
Share on other sites

Just as I thought, the Contribution is rock solid and everything is working perfectly allright!

 

Sorry for having bothered you in the first place, since it was my own fault, I uploaded the old admin/includes/functions/links.php file!

 

Thanks for your good work here!

Share this post


Link to post
Share on other sites

Im wondering if anyone has worked out some code to tie the module directly into the clients account, so the submitter of a link becomes a client and they access the system to edit the link via their user account?

 

and also has anyone come up with a code mod for the advanced search script to it can be used to search the link listings?

Edited by alba

Share this post


Link to post
Share on other sites
Im wondering if anyone has worked out some code to tie the module directly into the clients account, so the submitter of a link becomes a client and they access the system to edit the link via their user account?

 

and also has anyone come up with a code mod for the advanced search script to it can be used to search the link listings?

To create an account would require more user information than is normally provided with a link exchange request. If a visitor decides he would like to exchange links with you and is then asked his hame and home address, he would probably not do it - I know I wouldn't. That's why the login code was added to the links page.

 

As for the search, not that I am aware of. It could be added to my SiteSearch Plus contribution without too much trouble though. I'll probably do that with the next release.

 

Jack

Share this post


Link to post
Share on other sites

Jack

 

Thanks for the info

 

My Thinking was just by having a link in the client account section for people to login and edit links so theres one login for everything, ie i have the affiliate module tied into the user login etc

 

same thing applies with the search function....one search function across the site rather than different search functions for different modules

 

I had missed your sitesearch contribution so will have a look at it :D

Share this post


Link to post
Share on other sites

Hi Jack,

 

Thanks very much for a great contribution, just what my site needs.

 

I have a question about Links Exchange. The HTML shown for the person to copy on the Links Submit page under "Or copy the actual code below (right box)" contains much more than the HTML than the HTML I input in the Description box on the Links Exchange admin page.

 

On the Links Exchange page I set Description to:

<a title="brown apples" href="http://apples.com">Brown Apples</a>

 

However, the Links Submit page shows this as the HTML to copy:

<tr>

<td><table border="0" width="100%" style="border-collapse: collapse;" cellpadding="0">

<tr>

<td style="font-family: Verdana, Arial, sans-serif; font-size: 11px;"><b><a href="http://apples.com/" target="_blank" title="Apples for sale">Apples for sale</a></b></td>

</tr>

<tr><td height="10"></td><tr>

<tr>

<td style="font-family: Verdana, Arial, sans-serif; font-size: 11px;"><a title="brown apples"

href="http://apples.com">Brown Apples</a></td>

</tr>

<tr><td height="10"></td><tr>

<tr>

<td style="font-family: Verdana, Arial, sans-serif; font-size: 11px;"><a href="http://apples.com/" target="_blank" title="Apples for sale">http://apples.com/</a></td>

</tr>

</table></td>

</tr>

 

Does my installation have a bug or is the HTML to copy meant to look like the above?

 

Thanks

Share this post


Link to post
Share on other sites

No, that's correct. You can change it as you like in the english/links_submit.php fle. The code is meant to format the code so that the link on the other page appears correctly. Leaving it up to the person doing the copying may not result in what you want.

 

Jack

Share this post


Link to post
Share on other sites

Thanks for clearing that up.

 

As an aside I found a minor issue in the installation instructions you might want to tidy up in the next version.

 

Step 15 describes editing the text other sites will use when linking to your site. It says to edit this within links_submit.php

In fact the 3 lines it tells you to edit are not in (or no longer in) links_submit.php. Instead the values are set via your admin panel/Link Exchange.

 

Hope this helps.

Share this post


Link to post
Share on other sites

Thank you for mentioning that. I remember thinking I had to change that but then got sidetracked and never did.

 

Jack

Share this post


Link to post
Share on other sites
I just upgraded from Links Manager 1.18 to 1.20 & get the following errors.

 

Fatal error: Call to undefined function tep_hide_session_id() in C:\htdocs\mystorename\myadminfoldername\links.php on line 722

[/color]

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr><?php echo tep_draw_form('search', FILENAME_LINKS, '', 'get') . tep_hide_session_id(); ?> [color=#0000FF]// line 722[/color]

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

 

Links Status = Fatal error: Call to undefined function tep_hide_session_id() in C:\htdocs\mystorename\myadminfoldername\links_status.php on line 111

[color=#FF0000][code][/color]

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr><?php echo tep_draw_form('search', FILENAME_LINKS_STATUS, '', 'get') . tep_hide_session_id(); ?> [color=#0000FF]// line 111[/color]

<td class="pageHeading"><?php echo HEADING_TITLE_LINKS_STATUS; ?></td>

 

Link Categories = ok

Links Contact = ok

Links Exchange = ok

Links Featured =ok

 

Ideas as to what went wrong?

Thanks

 

I am having the exact same problem with my site. I installed this contribution and I am getting the same errors as nextime.

Please help me on finding where the problem is and fixing it. Thanks you in advance.

 

Crapu

Share this post


Link to post
Share on other sites

Hello Jack! I returned with another problem I am facing.

 

Installed a few contributions (links manager II and addblog) and I get the following message when I try to access those specific pages

 

Catchable fatal error: Object of class infoBox could not be converted to string in /home/medicals/public_html/includes/boxes/information.php on line 29

 

You can see that specific error accessing this page

 

My information.php file contains this:

 

<?php
/*
 $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- information //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_INFORMATION);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_SHIPPING) . '">' . BOX_INFORMATION_SHIPPING . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_PRIVACY) . '">' . BOX_INFORMATION_PRIVACY . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_CONDITIONS) . '">' . BOX_INFORMATION_CONDITIONS . '</a><br>' .
									 '<a href="' . tep_href_link(FILENAME_MY_POINTS_HELP) . '">' . BOX_INFORMATION_MY_POINTS_HELP . '</a><br>' . // Points/Rewards Module V2.1rc2a
									 '<a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>');
									 '<a href="' . tep_href_link(FILENAME_LINKS) . '">' . BOX_INFORMATION_LINKS . '</a><br>' . // Links Manager II v1.00 added
 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- information_eof //-->

 

 

Can you, or somebody else help with the solution for this problem, please? Thank you in advance.

Edited by crapu

Share this post


Link to post
Share on other sites

That's not a Links Manager error. You need to ask in the other support thread or in the general forum. You should try eliminating code you added to the information box first though to help isolate the problem.

 

Jack

Share this post


Link to post
Share on other sites

Hello Jack,

i want to make use of your fine contribusion, only i'm facing a strange issue:

when i click on the links link i get this result:

 

1146 - Table 'dbname.table_headertags_default' doesn't exist

 

select * from TABLE_HEADERTAGS_DEFAULT where language_id = '4'

 

[TEP STOP]

 

there is no table called table_headertags_default, but there is a table called headertags_default

 

where in the code is it refering to that?

 

thanks in advance

Share this post


Link to post
Share on other sites
Hello Jack,

i want to make use of your fine contribusion, only i'm facing a strange issue:

when i click on the links link i get this result:

 

1146 - Table 'dbname.table_headertags_default' doesn't exist

 

select * from TABLE_HEADERTAGS_DEFAULT where language_id = '4'

 

[TEP STOP]

 

there is no table called table_headertags_default, but there is a table called headertags_default

 

where in the code is it refering to that?

 

thanks in advance

 

yep, i found it, i just added:

 

define('TABLE_HEADERTAGS_DEFAULT', 'headertags_default');

 

to the includes/database_tables.php and that problem is gone!

Share this post


Link to post
Share on other sites

what really strange is is that in the admin links manager II the link to links gives me a http 500?

 

do you have any clue in what direction i need to look for this issue?

Share this post


Link to post
Share on other sites
what really strange is is that in the admin links manager II the link to links gives me a http 500?

 

do you have any clue in what direction i need to look for this issue?

 

ok... sorry, i think next time i should wait posting on forums... i fixed it again, i used httpfox to check what was going wrong and it was that hidden field thing.

 

thanks anyways

Share this post


Link to post
Share on other sites

Hi,

 

Thanks, especially to Jack, for this great contribution.

 

I am having a problem with it, which I had noticed intermittently but now seems to occur every time I try to add a link via my admin panel.

 

When I try and add a link I get this message on the Category line

"A Category is required"

...even though a valid category has been selected and is shown

 

and this message on on the New Category line:

"An entry in this box will cause a new category to be created for this link"

...even if I have not entered anything in the two boxes on the New Category line, or the description box under it.

 

This is preventing me adding new links. Does anyone know what is causing this and how to fix it?

 

Thanks

Share this post


Link to post
Share on other sites

I don't know what the problem is but someone mentioned someting along those lines and it was due to some other missing item on the page. Be sure al fields are filed in prior to adding it. Also, can you add a link on the shop side? If so, can you edit it in admin?

 

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

×