View Full Version : Putting link in the description
PamHinds
06-22-2005, 02:39 PM
Hi. I really want to put a link in the description. I have tried 2 ways.
I added a URL field. This did not work. When I go to admin and put the link in and then save, the link info is no longer there, basically it doesn't save the link info.
The second way is to simply add a link in the description which SHOULD work fine. I'm NOT a programmer or coder, I'm a hacker trying to learn. So, here's the code I've used:
<a href="http://mclaa.com/realty/auctions/ESTILL.pdf">click here</a>
However, EVERY time you save, it adds / in front of the link. This also happens if I add <font ="000000"> (or any color of course!). so the description ends up with <a href=////////////"http://mclaa.com/realty/auctions/ESTILL.pdf///////">click here</a>
If we make changes to the listing.
PLEASE tell me how to code so this doesn't happen.
Thanks!!
tjoppru
06-22-2005, 04:13 PM
This is exactly what I want to do. See this post http://support.open-realty.org/showthread.php?t=6330
I want to upload a pdf and link it to a listing.
timeforsmilin
06-23-2005, 10:09 PM
This is exactly what I want to do. See this post http://support.open-realty.org/showthread.php?t=6330
I want to upload a pdf and link it to a listing.
Is this what you want to do?
http://corporateone.ca/or/index.php?action=listingview&listingID=2
I set the field type to text, and then used <a href ....>
tjoppru
06-24-2005, 07:32 AM
So you manually type the code and address to the link in the field? How are you uploading the pdf? With another program? I want to make it as easy as possible for him to do.
timeforsmilin
06-24-2005, 10:20 AM
So you manually type the code and address to the link in the field? How are you uploading the pdf? With another program? I want to make it as easy as possible for him to do.
Yes, all file upload is done via ftp, and that directory is outside of the OR files, and also not browseable. You would have to create a general ftp user, with limited access or give everyone their own access. If you're able to, you could copy some of the image upload code, and point that to your files directory.
tjoppru
06-24-2005, 02:54 PM
How do you get around OR adding the forward slash in front of and after the address? Everytime you modify a listing it adds another slash.
<a href=\"doc/5006.pdf\">Click here to download pdf </a>
timeforsmilin
06-24-2005, 03:28 PM
How do you get around OR adding the forward slash in front of and after the address? Everytime you modify a listing it adds another slash.
<a href=\"doc/5006.pdf\">Click here to download pdf </a>
I added the <a href= tag as default text, and OR split it, so I fill in the middle. :D
PamHinds
06-24-2005, 05:32 PM
The description needs to have the link in it and yes I also upload using WS_FTP pro to upload the pdf file. OR inserts a / everytime you save the listing after making any changes. So, if you make a change, another change, etc.. you might have a bunch of ////// in the link.
Know how to get around that with coding?
Thanks.
thunderMex
06-24-2005, 05:55 PM
Hi Pam,
Could you start from the beginning?
Where, in what file, are you modifying with <a href="http://mclaa.com/realty/auctions/ESTILL.pdf"> ?
Are you saying you want this as a permanent link in the default template you are using to display listings? In other words, are you trying to put this fixed link to your pdf file on the template that creates the look and layout of all listings?
timeforsmilin
06-24-2005, 08:09 PM
Hi Pam,
Could you start from the beginning?
Where, in what file, are you modifying with <a href="http://mclaa.com/realty/auctions/ESTILL.pdf"> ?
Are you saying you want this as a permanent link in the default template you are using to display listings? In other words, are you trying to put this fixed link to your pdf file on the template that creates the look and layout of all listings?
That's what I did. I created a new field in the template, but found url didn't work as well as a type. Like any other listing field, it only shows if there is data. Then the link is pointed to a specific directory. It works, although I only tested that one file on this site. Go to admin>edit listing template>add field.
thunderMex
06-24-2005, 08:35 PM
I found in tests that adding a new field to the listing template in the Admin control panel did not work well automatically. Selecting URL didn't seem to parse well, making the whole link visible.
However, if you are trying to put in a fixed URL with a message like "Click Here for more Information" and a link to a pdf or whatever that it works fine as an addition wherever you want it on "listing_detail_default.html" or whichever listing detail file you specify.
Using a variable would require more coding, of course.
PamHinds
06-24-2005, 10:16 PM
I have tried 2 ways.
I added a URL field through the admin. This did not work. When I go to admin and put the link in and then save, the link info is no longer there, basically it doesn't save the link info.
The second way is to simply add a link in the description (in certain listings, not default text) which SHOULD work fine. I'm NOT a programmer or coder, I'm a hacker trying to learn. So, here's the code I've used:
<a href="http://mclaa.com/realty/auctions/ESTILL.pdf">click here</a>
However, EVERY time you save, it adds / in front of the link. This also happens if I add <font ="000000"> (or any color of course!). so the description ends up with <a href=////////////"http://mclaa.com/realty/auctions/ESTILL.pdf///////">click here</a>
If we make changes to the listing.
PLEASE tell me how to code so this doesn't happen.
Thanks!!
If you promise not to tell my html teachers, I'll put an end to the mystery. I ran into the same problem and haven't taken the time to dynamically insert links. Answer: drop the "" around the file name and the links will work. OR inserts the escape \ when it sees the "" marks. Another way I just thought of but probably not as efficient is to close out php ?> add the link, and restart php <?php after the link.
PamHinds
06-24-2005, 11:05 PM
Any thoughts on how to get the URL field to work? I created a URL field named "Auction Flyer". I input the URL in the listing, including the http:// but I can't get it to save the link when I save the listing.
timeforsmilin
06-25-2005, 12:49 AM
Any thoughts on how to get the URL field to work? I created a URL field named "Auction Flyer". I input the URL in the listing, including the http:// but I can't get it to save the link when I save the listing.
I had tried the url field first, but settled on using a text field. For default text I added <a href="">, and the editor left <a href= and moved "> outside the box, but it works. When I enter the address I finish what is not entered, and submit. Sure the code is gone when I go back to edit the listing, but the link and file work.
timeforsmilin
06-25-2005, 06:13 PM
I just tested removing the file that I had linked on my site. The only thing showing in the listing editor was <a href= , I removed that, and the file link was gone, so doing it that way should work all right for you too.
thunderMex
06-25-2005, 06:14 PM
I have tried 2 ways.
I added a URL field through the admin. This did not work. When I go to admin and put the link in and then save, the link info is no longer there, basically it doesn't save the link info.
The second way is to simply add a link in the description (in certain listings, not default text) which SHOULD work fine. I'm NOT a programmer or coder, I'm a hacker trying to learn. So, here's the code I've used:
<a href="http://mclaa.com/realty/auctions/ESTILL.pdf">click here</a>
However, EVERY time you save, it adds / in front of the link. This also happens if I add <font ="000000"> (or any color of course!). so the description ends up with <a href=////////////"http://mclaa.com/realty/auctions/ESTILL.pdf///////">click here</a>
If we make changes to the listing.
PLEASE tell me how to code so this doesn't happen.
Thanks!!HI Pam,
You basically repeated your previous post. I was hoping for NEW information.
First question: Do I understand that the link to Auction Flyer you want to appear in Every listing's Detail page? If so, then the best place to put it is to write it directly into the template itself that creates the listing view--\template\vertical-menu\listing_detail_default.html or one of the other listing_detail files according to what you set in your Site Configuration control panel in Admin. Just standard html code takes care of it with no rewriting of pesky ///'s.
Second question: Did you want to be able to use one URL field and just change its details whenever necessary in Admin, such as to later come back and change the link to a new .pdf file, (as an example)?
greengiant
07-17-2005, 10:43 AM
Please make sure you are running version 2.0.4 i have tested the URL fields in 2.0.4 and they are working. If you are still having problem's with this, please email me with ftp information for your site as well as the open-realty admin login information so i can look at your setup.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.