Problem with URL link to PDF files -...

User 193638 Photo


Registered User
557 posts

I have over 60 PDF files on my website concerning the care of Bonsai trees. One of the pages in my Store is "Bonsai Care Sheets" which has a list of these 60 some trees. I am trying to make a link on the name of each tree to the corresponding PDF file on the server.

Doing it is the simplist thing, but for some reason when I upload to the server, several of the links are "merged" into one with the same associated PDF file. In other words (in the browser), if I hold my mouse over one tree name, it shows the same PDF file listed in the status bar of the browser for the next three trees.

I have tried every thing. I deleted the tree names from SCCP and started all over, but no luck.

I have typed all 60 names of the trees first, before I did anything with links. And then I VERY carefully highlighted ONE tree name at a time and linked the associated PDF file. I did this one tree at a time but they still get merged with each other. The funny thing is that in SCCP when I click on a tree name the URL attach dialog box comes up showing the correct link. It's like trying to lasso a wild animal :(

I can see that if you have your cursor in the wrong spot in SCCP and click or hit enter or do almost anything, it will "glue" things together. Anyone have any suggestions?
User 38401 Photo


Senior Advisor
10,951 posts

Hiya Steven,

Do you have a link to the page in question so we can take a look at the code and see what it's actually doing please?
User 193638 Photo


Registered User
557 posts

Yeah, I'm sorry Jo Ann, I meant to do that and forgot.

http://bonsaitoolchest.com/Bonsai_Care_Sheets.php

As you can see I have come up with a solution, but it is not the right way to do something. I found that if I do not include the last letter of each tree name in the link, all is well. But that's not the roight way to do something like this, I know.

When I made changes to SCCP and the list of names, trying to get the links right, SCCP would show me that it looked like I wanted it to. But when I closed SCCP and started it up again, wow, what a mess. The tree names were all over the place. I changed them again for the tenth time. But this time I did not link that last letter of each name. I am willing to bet that it will screw up again though.
User 38401 Photo


Senior Advisor
10,951 posts

hmm that's the strangest looking thing, I see what you mean that it's doing, but I've no idea what is causing it. I have a suggestion, but you aren't going to like it lol.

Take your page in the program and copy it to a text editor like Notepad so you have it all and don't loose it. This will require that you redo all the links, but if you save your shop first before you do this you can always go back to that one if this doesn't work since you have the links working kind of.

Once you have all the text copied as is, into notepad or whatever text editor, highlight the entire page and delete it all, every single thing on the page. Now copy and paste the text from your text editor back onto the page and try relinking your links again and see if that works. Could be there's something conflicting with your CSS which could be anything, especially if you happened to copy and paste anything from another website which could have copied the text formatting without showing it to you. Not sure how it does that but it definitely does lol.

If you're up to it give that a try and see if it works. Be sure to save your current shop file first and put it in another location so you can always go back to that one again.

Let me know if that works or not, if you do try it. If you do try it and it doesn't work, I would suggest you put in an ticket and see if the CC team can give you a hand.
User 193638 Photo


Registered User
557 posts

Thanks Jo Ann.
I like your idea about saving SCCP, so I did a save in another folder so that if this thing really screws up on me, I can go back and try something esle. Also did the copy to wordpad.

As it stands, not linking the last letter is working so I am going to go with that. It is too much hassle to do anything else.

For any one else doing this kind of a thing, make sure you know your ENTIRE list of items you are going to link to BEFORE hand, leaving a space at the end of each item and THEN hit the return key. Type them all out the way you want and then go back and highlight each one separately and then link it. If you try to type and link at the same time, it will really be a mess by the time you get done. Things you don't want linked will be and nothing will work right.
User 364143 Photo


Guest
5,410 posts

Another way to handle many files/links in a repository would be to just throw all the files into a directory and allow indexing of the directory.

There a plenty of scripts available o make it look pretty if you don't want the basic indexing. You can tweak the output to match the site and/or have it open in a new window.

Check out the demo.
http://www.evoluted.net/community/code/directorylisting.php
CoffeeCup... Yeah, they are the best!
User 193638 Photo


Registered User
557 posts

Woah Tom, that is awesome :P
That might just be the ticket.

So if I have all these PDF files in one directory on the server (documents) I would have to make sure that the file names are something that would make since because that it was people see right? Like for tree #1, I would want to call the file Azalea, not tree#1.

I like that it shows a thumbnail preview of the file. At least for a graphic file. Wonder if it shows a PDF file?

I will check this out and let you know.

Thanks Tom, your awesome. I do't care what Jo Ann and Scott say!! :D
User 193638 Photo


Registered User
557 posts

Yo Tom,
I got to play stupid again. (What's new, right?) There are no instructions to this thing whatsoever. I have never done that much with one of these script things. Any help you can give me would be greatly appreciated.

It says to read the index.php file and my computer can't read it. I thought IE could, but it won't.
User 364143 Photo


Guest
5,410 posts

I haven't played with this particular script but I'd say you should probably stick everything a directory, along with your pdf files. I'll look at it when I have a moment.
CoffeeCup... Yeah, they are the best!
User 193638 Photo


Registered User
557 posts

I have finally got the index.php file open and read the instructions. It seems pretty straight forward. It seems to be like you say, have a designated directory (Documents, in my case) and put every thing in there, including this index.php.

But how do I get all of this to show the Directory List on my page on my website? What HTML code do I use to get this index.php to show?

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.