AutoDirector forum

The AutoDirector support and advice forum

Adding a link via the import tool

Post Reply

Page: 1

Author Post
Member
Registered: Apr 2008
Posts: 67
Hi, I am trying to add a link into the import tool, but I am getting errors, can you help me with the format?
I have added a link after the registration as below, but it is not importing..

info		= "( '[19]' == '' ? '' : '[19]\n\n' ) . '- Options\n' . str_replace(',', '\n* ', ',[5] [8],[9] doors,[21]' . ('[22]' != '' ? ',[22]' : '')) . ( '[17]' == 'Y' ? '\n* full service history' : '') . ( '[20]' == 'Y' ? '\n* four-wheel drive' : '') . '\n\nRegistration [3]' . '<a href="http://www.alink.com">click me</a>' "

Administrator
Registered: Apr 2008
Posts: 324
Hi Snizbit. I think it's the quotes in your link at the end ... try:

<a href=\"http://www.alink.com\">click me</a>

That will escape the quotes so they should become part of the string. I think it's currently terminating it at the first double-quote.

These problems can always be a little tricky to sort out. I'd advise starting with a small string, then adding bits one at a time until you find the fault.

Hope that helps.
Craig
_______________
AutoDirector administrator
Member
Registered: Apr 2008
Posts: 67
I should RTFM ! - You are using the Wiki based methods, so I can use - [this is a link]((http://www.mysite.co.uk))

:)

It was all in the help file...
Administrator
Registered: Apr 2008
Posts: 324
That's a good point - I'd forgotten myself!!!

As a thought, did the standard HTML link work? It might work in the import, although it could be stripped out by editing the vehicle.

Glad you sorted it out, though.
_______________
AutoDirector administrator
Member
Registered: Apr 2008
Posts: 67
I don't edit the vehicles very often so I haven't checked that but it seems just fine via import
Member
Registered: Apr 2008
Posts: 67
I have tweaked this now to add the registration to the link - held in field 3.
eg . '[this is a link]((http://www.mysite.co.uk?ID=[3])) '

In case you hadn't guessed, I am using it to insert a "get an insurance quote" link which pays commissions on quotes, and adding the reg number means I have tracking on which cars people have been looking at seriously.
Administrator
Registered: Apr 2008
Posts: 324
Great work - thanks for the tip.
_______________
AutoDirector administrator

Post Reply

Page: 1