[solved] using relative link in customized image link

More
9 years 1 week ago - 9 years 6 days ago #57960 by rottenberg
Hello
In an image field I'm using the optional customized link property : The displayed thumbnail has a link to a pdf file. The pdf file is inside the site.

Ex : image.jpg is linked to "images/livres/mydocument.pdf"
I have set images/livres/mydocument.pdf in the customized link field.

When running the page I get this as href url : <a href ="http://images/livres/mydocument.pdf" target ="_blank">

Of course, I get an erroneous message when opening the linked page.

How can I get <a href ="images/livres/mydocument.pdf" target ='_blank"> to be able to open the document ?


Thank you for help

best regards

Michel
Last edit: 9 years 6 days ago by rottenberg.

Please Log in or Create an account to join the conversation.

More
9 years 6 days ago #57990 by ggppdk
Hello

in image field:
plugins/flexicontent_fields/image/image.php

comment out (add //)
Code:
if ($urllink && false === strpos($urllink, '://')) $urllink = 'http://' . $urllink;
to be:
Code:
//if ($urllink && false === strpos($urllink, '://')) $urllink = 'http://' . $urllink;

i am not sure if making link absolute is really needed


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
9 years 6 days ago - 9 years 6 days ago #57993 by rottenberg
Hello,

I have done the modification you gave me in the plugin.

I have tested with a relative url and an absolute one. In both cases it's working.

thank you very much.

best regards

Michel
Last edit: 9 years 6 days ago by rottenberg.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.285 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline