Jump to content
Jack_mcs

Links Manager II

Recommended Posts

Hmm, I really don't see the point in duplicating the url but if it is something you want, you can find the code that displays that text in admin/links.php (search for TEXT_INFO_LINK_VISIT_RECIPROCAL). It is part of a line of text that has the link before it. Just copy the name of the link in its place - $lInfo->links_reciprocal_url.

 

Jack

Share this post


Link to post
Share on other sites

I had thought I tried that already but I gave it another go in case. I am just getting a blank white spot (nothing) where its supposed to be.. Let me show you what I've tried.

 

Here is try #1

 

Here I left original code as is except for I removed TEXT_INFO_LINK_VISIT_RECIPROCAL and replaced with $lInfo->links_reciprocal_url

<td class="smallText"><a href="<?php echo $lInfo->links_reciprocal_url ?>" target="blank"><?php echo $lInfo->links_reciprocal_url ?></a></td>

 

Here is try #2 (Took away the link and just tried to output plain text)

 

<td class="smallText"><?php echo $lInfo->links_reciprocal_url ?></td>

 

Both tries resulted in no output.

 

Hmm. This might be my problem. Does it output the reciprocal link that was entered even if its not valid? For example I use a fake link that does not actually have a link back?

Edited by XxWickedxX

Share this post


Link to post
Share on other sites

Ok some things are falling into place.. I have something overall buggy and its causing this. Even if I enter a reciprocal link that is valid and contains a link back it still gives the red X and says that the link can not be found.. When I run the check script it says no reciprocal links can be found. As well as I mentioned earlier no urls are displayed in the link status area because the check links is not working. This has to be why <?php echo $lInfo->links_reciprocal_url ?> does not output anything no matter where I put it. Is there something i can look into?

Share this post


Link to post
Share on other sites

Have you set the link phase to check for in the settings? The GetLinksFileArray function will use curl first if it is enabled on the server. Your servers installation of curl could be broken so you could try changing the code in the functions/links.php file to not use curl. You coud also try running the links_check.php file manually.

 

Jack

Share this post


Link to post
Share on other sites

I have the link phrase set to my domain name. I can run the links check manually and it sends out the emails where it needs to. However it still says none of the listing have the reciprocal even though they do using the code copied directly from the links submit page. I have sent my host asking if they have curl enabled and if not then I'll edit the function. Thanks again Jack.

Share this post


Link to post
Share on other sites

Basically you worked me through everything correctly in all the previous post spanning the last couple pages. Everything was worked out but I was testing wrong. Every time I would make a change I would refresh the admin links.php to see only a blank result or the reciprocal linking to admin links.php using the original code that was there. The reason I kept getting failed results is because after having it set up the way you coached me through another submission had to passed for the results to show. Any entries prior to the changes would not update because the old submissions miss the checks. This is why it has to be tested with a new submission rather than a page refresh. Hope that explains it. This same idea applies to the links_check.php. Otherwise the reciprocal will just have an empty link resulting in it linking to the page I was on with was admin links.php hence HTML standard operation. Link status and proper checks were reflected with new submissions after implementing all of your instructions over these past 2 pages of the thread.

Edited by XxWickedxX

Share this post


Link to post
Share on other sites

Hi Jack

 

I have been trying to update links Manager from 1.14 to 1.22 and was running the sql updates. I successfully updated 1.14 to 1.16 and then tried updating 1.16 to 1.19 but I am getting a MySql error.

 

SQL-query:

 

CREATE TABLE links_exchange(

links_exchange_name varchar( 255 ) NULL ,

links_exchange_description text NULL ,

links_exchange_url varchar( 255 ) NULL ,

PRIMARY KEY ( links_exchange_name )

)

 

MySQL said: Documentation

#1171 - All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead

 

I read back to about page 24 to see if anyone else had come across this, but couldn't find anything.

 

Any ideas as to what might be causing this or is there problem with the sql update for 1.16 to 1.19 query?

 

Thanks in advance

Share this post


Link to post
Share on other sites

Try this

DROP TABLE IF EXISTS links_exchange;
CREATE TABLE `links_exchange` (
 `links_exchange_name` varchar(255) NOT NULL default '',
 `links_exchange_description` text,
 `links_exchange_url` varchar(255) default NULL,
 `language_id` int(11) NOT NULL default '0',
 PRIMARY KEY  (`language_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

 

Jack

Share this post


Link to post
Share on other sites
Try this
DROP TABLE IF EXISTS links_exchange;
 CREATE TABLE `links_exchange` (
   `links_exchange_name` varchar(255) NOT NULL default '',
   `links_exchange_description` text,
   `links_exchange_url` varchar(255) default NULL,
   `language_id` int(11) NOT NULL default '0',
   PRIMARY KEY  (`language_id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

 

Jack

 

Hi Jack

 

Thanks for your reply. I tried that sql query and this is the error that is returned.

 

MySQL said: b_help.png

 

#1064 - You have an error in your SQL syntax near 'ENGINE=MyISAM DEFAULT CHARSET=latin1' at line 7

 

Do you have any ideas why this is happening ? If I am updating the update sql's in order, do I have to still run the links_setup.php ? I have uploaded all the new files to the server into their respective folders btw.

 

Thanks again for any help you can offer.

Share this post


Link to post
Share on other sites

Try this

DROP TABLE IF EXISTS links_exchange;
 CREATE TABLE `links_exchange` (
   `links_exchange_name` varchar(255) NOT NULL default '',
   `links_exchange_description` text,
   `links_exchange_url` varchar(255) default NULL,
   `language_id` int(11) NOT NULL default '0',
   PRIMARY KEY  (`language_id`)
 ) TYPE=MyISAM;

Links_setup won't run if you have an existing installation.

 

Jack

Share this post


Link to post
Share on other sites
Try this
DROP TABLE IF EXISTS links_exchange;
  CREATE TABLE `links_exchange` (
	`links_exchange_name` varchar(255) NOT NULL default '',
	`links_exchange_description` text,
	`links_exchange_url` varchar(255) default NULL,
	`language_id` int(11) NOT NULL default '0',
	PRIMARY KEY  (`language_id`)
  ) TYPE=MyISAM;

Links_setup won't run if you have an existing installation.

 

Jack

 

Thanks Jack for you quick reply.

 

That solved the problem, I will move on to the next update now. Just another question if you have time, I can only see update from 1.19 to 1.20 in the update docs package, is there no update to the current release of 1.22 ?

Share this post


Link to post
Share on other sites

Hi Jack

 

I have run the all the updates in the updates folder for the db and all is fine as far as that is concerned. Everything in the admin for Links Manager and configuration all seem to be fine. However when I click each of the Link Categories at the shops front end, I get the following error.

 

1064 - You have an error in your SQL syntax near 'xor ld.language_id = '99')' at line 1

 

select count(l.links_id) as total from links_description ld left join links l on ld.links_id = l.links_id left join links_to_link_categories l2lc on l.links_id = l2lc.links_id where l.links_status = '2' and CHAR_LENGTH(ld.links_title) > '0'and l2lc.link_categories_id = '4' and ( ld.language_id = '1' xor ld.language_id = '99')

 

[TEP STOP]

 

Any ideas as to what the problem is ? Once again thanks in advance and I appreciate your help.

Share this post


Link to post
Share on other sites
Hi Jack

 

I have run the all the updates in the updates folder for the db and all is fine as far as that is concerned. Everything in the admin for Links Manager and configuration all seem to be fine. However when I click each of the Link Categories at the shops front end, I get the following error.

 

 

 

Any ideas as to what the problem is ? Once again thanks in advance and I appreciate your help.

Try editingt the links.php file and change all instances of xor to or.

 

Jack

Share this post


Link to post
Share on other sites
Try editingt the links.php file and change all instances of xor to or.

 

Jack

 

Thank you very much Jack, it works perfectly now.

 

Another quick question if I may. If there are empty categories, are they Hidden ? In my shop I have 6 categories, but only three populated ones are displayed, the other 3 unpopulated ones are not displaying.

Edited by Viper0409

Share this post


Link to post
Share on other sites

Ok, I am back again.

 

According to my site, when the categories are not populated, the categories are hidden. As soon as I populated a non-displayed category, the category appeared.

 

Just letting you know how it is working on my site.

 

Let me know if this is not the correct functionality.

Share this post


Link to post
Share on other sites

I looked at the code and it will only show categories with links. If you want to change that, find this code, around line 208, and remove it.

if ($linkCount > 0) //only show categories with links

 

Jack

Share this post


Link to post
Share on other sites
I looked at the code and it will only show categories with links. If you want to change that, find this code, around line 208, and remove it.
if ($linkCount > 0) //only show categories with links

 

Jack

 

Hi Jack and thanks for your reply, apologies for getting back to you so late, I had a few things to take care of.

 

The above code mod has resolved the problem with the non-populated categories not displaying. All 6 categories are now displayed.

 

Thanks once again for your help and for all the work you do in this and other forums.

 

Viper

Share this post


Link to post
Share on other sites

Hi Jack

 

I am back again.

 

I was just testing adding a link from the store front and ran into this error after filling in all the details and submitting the test link.

 

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

 

In fact the same error occurs for line 132 through to line 139. i.e. The error repeats for line 133, 134, etc.

 

Here are the lines 132 to 139 in my catalog/links_submit.php file.

 

$links_id = tep_db_insert_id();

 

$categories_query = tep_db_query("select link_categories_id from " . TABLE_LINK_CATEGORIES_DESCRIPTION . " where link_categories_name = '" . $links_category . "' and language_id = '" . (int)$languages_id . "'");

 

$categories = tep_db_fetch_array($categories_query);

$link_categories_id = $categories['link_categories_id'];

 

tep_db_query("insert into " . TABLE_LINKS_TO_LINK_CATEGORIES . " (links_id, link_categories_id) values ('" . (int)$links_id . "', '" . (int)$link_categories_id . "')");

 

Would you have an idea about what is causing this warning/ error?

 

Thanks

 

Viper

Edited by Viper0409

Share this post


Link to post
Share on other sites

I don't have that code in my links_submit.php file. You should update to the latest version since the problem you have may have been fixed in updates.

 

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

×