Jump to content
Jack_mcs

Links Manager II

Recommended Posts

When I am here

http://wwwdotelectricalcity.co.uk/electronics-links-0_2.html

and hover over the breadcrumb, the breadcrumb reads

http://wwwdotelectricalcity.co.uk/links.php?parent_id=

 

I believe that these are related to the last post regarding the parent id

Share this post


Link to post
Share on other sites

When I am here

http://wwwdotelectricalcity.co.uk/electronics-links-0_2.html

and hover over the breadcrumb, the breadcrumb reads

http://wwwdotelectricalcity.co.uk/links.php?parent_id=

 

I believe that these are related to the last post regarding the parent id

Yes, you're correct. The following is untested but I think it will fix that problem. In links.php, find

  // links breadcrumb
 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_LINKS, '', 'NONSSL'));
 if ($parentID > 0)
 {
   $pathStr = explode(" > ", tep_output_generated_link_category_path($parentID));
   $pathStr = array_reverse($pathStr);
   for ($i = 0; $i < count($pathStr); ++$i)
   {
     $breadcrumb->add($pathStr[$i], FILENAME_LINKS . '?parentID=' . tep_get_category_id($pathStr[$i]));
   }
 }

and replace it with

  // links breadcrumb
 if ($parentID > 0) {
     $pathStr = explode(" > ", tep_output_generated_link_category_path($parentID));
     $pathStr = array_reverse($pathStr);
     $pathIDS = (array_flip($pathStr));
     for ($i = 0; $i < count($pathStr); ++$i) {
         $breadcrumb->add($pathStr[$i], tep_href_link(FILENAME_LINKS, 'lPath=' .  ($pathIDS[$pathStr[$i]]) . '_' . tep_get_category_id($pathStr[$i])));
     }
 } else {
     $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_LINKS, '', 'NONSSL'));
 }

Share this post


Link to post
Share on other sites

I suggest youi use Ultimate SEO V2.2d for 100% compatibility.

 

This is misleading information.

 

Ultimate Seo Urls 5 and the brand new USU5 PRO both have a links module that works perfectly.

 

It's not rocket science it's simple, as long as the contribution uses the correct tep_href_link() function as is the osCommerce standard then the USU5 contributions work perfectly and far better than Chemos old 2005 code.

Share this post


Link to post
Share on other sites

Yes, you're correct. The following is untested but I think it will fix that problem. In links.php, find

  // links breadcrumb
 $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_LINKS, '', 'NONSSL'));
 if ($parentID > 0)
 {
   $pathStr = explode(" > ", tep_output_generated_link_category_path($parentID));
   $pathStr = array_reverse($pathStr);
   for ($i = 0; $i < count($pathStr); ++$i)
   {
     $breadcrumb->add($pathStr[$i], FILENAME_LINKS . '?parentID=' . tep_get_category_id($pathStr[$i]));
   }
 }

and replace it with

  // links breadcrumb
 if ($parentID > 0) {
     $pathStr = explode(" > ", tep_output_generated_link_category_path($parentID));
     $pathStr = array_reverse($pathStr);
     $pathIDS = (array_flip($pathStr));
     for ($i = 0; $i < count($pathStr); ++$i) {
         $breadcrumb->add($pathStr[$i], tep_href_link(FILENAME_LINKS, 'lPath=' .  ($pathIDS[$pathStr[$i]]) . '_' . tep_get_category_id($pathStr[$i])));
     }
 } else {
     $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_LINKS, '', 'NONSSL'));
 }

 

Not quite. This is what I get now

http://wwwdotelectricalcity.co.uk/links.php
http://www.electricalcity.co.uk/electronics-links-0_2.html
http://www.electricalcity.co.uk/electronics-suppliers-links-2_4.html 
( breadcrumb hover http://www.electricalcity.co.uk/electronics-suppliers-links-1_4.html)
breadcrumb reads
Home » Store » ElectronicsElectronics Suppliers


Clicking back gives
http://www.electricalcity.co.uk/electronics-links-2.html

Share this post


Link to post
Share on other sites

Not quite. This is what I get now

Hmm, OK. I'll have to take a closer look at that.

Share this post


Link to post
Share on other sites

Hi Jack,

Anyway of adding a recaptcha box to the link submittal page? I've been getting a lot of spam submissions lately.


If the only tool you have is a hammer, all your problems look like nails

Share this post


Link to post
Share on other sites

Hi Jack,

Anyway of adding a recaptcha box to the link submittal page? I've been getting a lot of spam submissions lately.

Yes, the recaptapcha code just requires a few additions. However, you may want to try using the Blacklist option in Links Manager first, just to save you some work.

Share this post


Link to post
Share on other sites

Hi Jack,

 

when I check my links using links.php it shows that a link is not found.

 

but when I check the links_status.php the data hasnt been updated ?

 

from what you say above that the cron version does it.

 

But whats the point of me running a check on 200+ links and the data being correct and the links_status.php isnt correct.

 

Can you advise on how to ressolve this issue please?

 

Thanks


Getting better with mods but no programmer am I.

Share this post


Link to post
Share on other sites

Hi Jack,

 

when I check my links using links.php it shows that a link is not found.

 

but when I check the links_status.php the data hasnt been updated ?

 

from what you say above that the cron version does it.

 

But whats the point of me running a check on 200+ links and the data being correct and the links_status.php isnt correct.

 

Can you advise on how to ressolve this issue please?

 

Thanks

I'm sorry but I don't understand what the issue is.

Share this post


Link to post
Share on other sites

Hi Jack.

 

on admin/links.php there is a check link button

 

I click on this and select how many links i want to check.

 

When its completed i get a list of links that have been checked.

 

On this list it will say if the link has been found or not.

 

However the data displayed here does not match the data in admin/links_status.php

 

easiest way to to demonstrate, is to change the check link phrase to something unrelated to your link, then run the links check, all the links will show as not found however the links_status.php will show the original link found status.

 

If this doesnt help I will look at getting some screen shots together.

 

Cheers


Getting better with mods but no programmer am I.

Share this post


Link to post
Share on other sites

Hi Jack.

 

on admin/links.php there is a check link button

 

I click on this and select how many links i want to check.

 

When its completed i get a list of links that have been checked.

 

On this list it will say if the link has been found or not.

 

However the data displayed here does not match the data in admin/links_status.php

 

easiest way to to demonstrate, is to change the check link phrase to something unrelated to your link, then run the links check, all the links will show as not found however the links_status.php will show the original link found status.

 

If this doesnt help I will look at getting some screen shots together.

 

Cheers

Thanks for the explanation. I think I understand now. The links status section was originally written as a way to monitor what the results of the cron job were. The cron job will check a link and change the database entry for the site saying it was checked and its status. When you check a link from the links section, it just checks the link - no updating is done. Both sections (cron and link checking) have grown and changed quite a bit since the links status section was added so, you are correct, it is not reporting as it should. I have that change on the list for the next version. In the meantime, you could run the link_check.php file manually to check the links and update the status entries.

Share this post


Link to post
Share on other sites

Thanks for the explanation. I think I understand now. The links status section was originally written as a way to monitor what the results of the cron job were. The cron job will check a link and change the database entry for the site saying it was checked and its status. When you check a link from the links section, it just checks the link - no updating is done. Both sections (cron and link checking) have grown and changed quite a bit since the links status section was added so, you are correct, it is not reporting as it should. I have that change on the list for the next version. In the meantime, you could run the link_check.php file manually to check the links and update the status entries.

Hi Jack,

 

I am having trouble running the file manually, I end up with a blank page, and the browser is showing it as loading. Off to do some shopping see if it has finished when I get back I guess. Any tips on how to run this properly, I just opened the file


Getting better with mods but no programmer am I.

Share this post


Link to post
Share on other sites

Hi Jack,

 

I am having trouble running the file manually, I end up with a blank page, and the browser is showing it as loading. Off to do some shopping see if it has finished when I get back I guess. Any tips on how to run this properly, I just opened the file

It is probably timing out. Some servers will respond with a blank page if the script times out or has an error. You should check the admins error log file to see if anything is showing (or the servers if one isn't available).

Share this post


Link to post
Share on other sites

Jack, thanks a lot for this contribution. The install was painless (except for working around my custom links page). It seems to work very nicely, and I appreciate how little had to be done to existing code to add it in.

 

If I may, I'd like to offer a couple of suggestions though

 

It seems that trying to change the layout is a bit complicated the way you have the stylesheet setup. For example, the title and description have the same attributes, though I think they should be separate. These also share the same attributes when used in the featured listing box, though I think these should have their own attributes/style as well. Any chance that these will be separated out individually? Or, did I miss something? I am not the most proficient with stylesheets as I only get under the hood very infrequently.

 

Other than those nits, I really like the contribution a lot.

 

Thanks again.

Share this post


Link to post
Share on other sites

Jack, thanks a lot for this contribution. The install was painless (except for working around my custom links page). It seems to work very nicely, and I appreciate how little had to be done to existing code to add it in.

 

If I may, I'd like to offer a couple of suggestions though

 

It seems that trying to change the layout is a bit complicated the way you have the stylesheet setup. For example, the title and description have the same attributes, though I think they should be separate. These also share the same attributes when used in the featured listing box, though I think these should have their own attributes/style as well. Any chance that these will be separated out individually? Or, did I miss something? I am not the most proficient with stylesheets as I only get under the hood very infrequently.

 

Other than those nits, I really like the contribution a lot.

Thank you for the kind words.

 

By "attributes," are you talking about the css styles? If so, I'm not aware of any problems with them conflicting but I will take a look. You can, of course, make those changes in your stylesheet.

Share this post


Link to post
Share on other sites

The link Title and the link Description appear to have the same style elements, AND are in both the regular and featured listings.

 

 

One of the things I wanted to do was put in a <cr> between the title and the description to make it easier to read, and that was easy enough. But I also wanted to make the title larger than the description, as well as underline it. Unfortunately, it controls both the title and description (I think the element is linkfeaturedmain ?). I would think those styles should be separated, say linkFeaturedTitle and linkFeaturedDescription. Does this make sense or am I missing something? The other nit is the fact that the featured box has essentially the same styles as well, save for the background colors and box.

 

So the workaround to that is going into the stylesheet and adding new style elements and then changing the code, though it would be nice to not have to do all that. A lot of the stylesheet elements seem lumped together.

I think this is especially important for the Featured link part - it would be nice to easily change it to differentiate it even more without affecting and of the standard listing elements.

 

Again, other than that, it works great for me.

 

Thanks again..

Share this post


Link to post
Share on other sites

Hmm, I'm not sure what you are looking at but in the code for the featured heading is

class="linkFeaturedHeading"><?php echo TEXT_FEATURED_HEADING

and for the links heading is

class="pageHeading"><?php echo HEADING_TITLE_LINKS;

which are clearly different classes. I will look more closely at it though.

Share this post


Link to post
Share on other sites

Hello,

Sorry I know I am missing something simple but I just cant seem to figure it out, When I go the links page it is to wide and has a scroll bar on the bottom doesn't matter if I have 0 links or many links. All widths seem to be at 100%. Not sure were to look, any ideas?

Share this post


Link to post
Share on other sites

The code is setup for 100% width since that is how oscommerce works, prior to 2.3. If you are using a design where that is not the case, you will need to alter the code so it displays correctly for your shop.

Share this post


Link to post
Share on other sites

The code is setup for 100% width since that is how oscommerce works, prior to 2.3. If you are using a design where that is not the case, you will need to alter the code so it displays correctly for your shop.

 

 

I am using V2.2 RC2 and it all appears to be set to 100% width. It's odd it seems fine on firefox and on my android browser but on IE it always has a scroll bar on the bottom.

Share this post


Link to post
Share on other sites

I am using V2.2 RC2 and it all appears to be set to 100% width. It's odd it seems fine on firefox and on my android browser but on IE it always has a scroll bar on the bottom.

Horizontal scroll bars are added automaitcally by the browser if they can't fit the contents into the given screen size. Each browser renders things differently so IE may be drawing things a little larger or using a larger font. There's nothing in the that will cause that unless it is some missing size that is confusing IE, which is easy to do. You need to determine what is causing the extra width. Maybe you are using category images and their combined width is causing it, or something like that.

Share this post


Link to post
Share on other sites

Horizontal scroll bars are added automaitcally by the browser if they can't fit the contents into the given screen size. Each browser renders things differently so IE may be drawing things a little larger or using a larger font. There's nothing in the that will cause that unless it is some missing size that is confusing IE, which is easy to do. You need to determine what is causing the extra width. Maybe you are using category images and their combined width is causing it, or something like that.

 

You got me to look in the right direction lol, I had a facebook Iframe in my right collumn that made it wider than normal and the links page just happen to be the only page it affected so far. Took that out and it fit perfect. Now I just have to find a new place for it.

 

By the way wanted to say thank you also for all your great contribs. Your instructions are always easy to understand, professional, and helps me to understand what I am doing along the way.

Share this post


Link to post
Share on other sites

A new version has been uploaded with the following changes:

 

- Added instructions regarding the Version Checker

- Changed breadcrumb trail code so the id's are correct

- Changed domain checking code so domains are reported correctly now

- Changed the links status page so it now checks the links when loaded and displays accurate results

- Changed links_check code so that if a site is found, the link count is decremented

- Changed links_check code so that emails are handled correctly

- Changed links image code so images are now uploaded and loaded from the server (previous url's for images will still work)

- Converted code for 2.3 compatibility

- Fixed back code so previous link category is correctly formatted

- Fixed many miscellaneous mistakes as reported by user wdepot

Share this post


Link to post
Share on other sites

A new version has been uploaded with the following changes:

- Converted code for 2.3 compatibility

 

Hi Jack,

 

Thanks for new version. The database setup files works but only for V2.2 standards.


:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

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

×