Please read and follow the COMMON ISSUES first!
Always add your version information in every new post! Thank you!

Form2Content Forum

Questions and answers for Form2Content, a Joomla CCK.
  1. Brendan Hedges
  2. Form2Content Lite & Pro
  3. Monday, 25 May 2020
  4.  Subscribe via email
Hi Patrick,

I hope you are well.

I have come across an issue that I can't seem to find an option to change.

The image fields are creating an image URL which includes the http

In the template files I have:

<img src ="{$INTRO_IMAGE}" align="none" alt="ESL Cebu - {$JOOMLA_TITLE}, an ESL Academy in Cebu, Philippines" />

In the rendered Joomla article I get:

<div class="intro-image"><img src="http://eslcebu.com/images/stories/com_form2content/p1/f2/CDU-ESL.jpg" align="none" alt="ESL Cebu - CDU ESL Center, an ESL Academy in Cebu, Philippines" /></div>

Which works and renders the image. The problem is that it is creating mixed content in the browser and giving 'not secure ' warnings in the URL bar as the site is served via https.

I would prefer the image URLs in the rendered articles to start '/images/....' but if this is not possible at least have them with an https in the url, rather than http.

I've had a look in the associated fields and F2C options, to no avail, and tried deleting the images in the F2C articles and reloading them, but they stay the same.

I know I could just unpublish the F2C articles then use something like 'DB Replacer' to change all the URLs in the Joomla Articles, but this seems like a hacky approach to what I think should be an easy fix in F2C.


Regards, Brendan
Responses (5)
Accepted Answer Pending Moderation
As an update. If I enable Force https in global settings the urls in the F2C articles change to https as well.

But, I would still rather the URL just to begin /images/....
  1. more than a month ago
  2. Form2Content Lite & Pro
  3. # 1
Accepted Answer Pending Moderation
Hi Brandan,

As you write it's best to build relative URL's, see documentation for all the options:
https://documentation.form2content.com/f2c-field-types/image-upload-field-f2c-lite

And example of use:
https://documentation.form2content.com/f2c-plugin-examples/100-sigplus-gallery-joomla-plugin

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. Form2Content Lite & Pro
  3. # 2
Accepted Answer Pending Moderation
Hi Patrick,

Thanks for your reply.

I knew there would be a way :)

However, I can't see from your links how I would structure the template to get the required html layout.

Would I put:

{$F2C_IMAGES_PATH_RELATIVE}

into:

<img src ="{$INTRO_IMAGE}" align="none" alt="ESL Cebu - {$JOOMLA_TITLE}, an ESL Academy in Cebu, Philippines" />

thus forming:

<img src ="{$F2C_IMAGES_PATH_RELATIVE}{$INTRO_IMAGE}" align="none" alt="ESL Cebu - {$JOOMLA_TITLE}, an ESL Academy in Cebu, Philippines" />

?

Regards, Brendan
  1. more than a month ago
  2. Form2Content Lite & Pro
  3. # 3
Accepted Answer Pending Moderation
Hi Brendan,

As per documentation:
{$< FIELDNAME >_PATH_RELATIVE} = Relative url (from images/stories) to the re-sized image

<img src ="images/stories/{$INTRO_IMAGE_PATH_RELATIVE}" align="none" alt="ESL Cebu - {$JOOMLA_TITLE}, an ESL Academy in Cebu, Philippines" />

Note: If you changed the image root URL in F2C to images/ you can skip the stories/ part.
Please read this too: https://documentation.form2content.com/support/how-to-test to test what you made.

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. more than a month ago
  2. Form2Content Lite & Pro
  3. # 4
Accepted Answer Pending Moderation
Hi Patrick,

Thanks for the example.

My confusion was that there was no example of {$INTRO_IMAGE_PATH_RELATIVE} referring to a full item image or intro image in the documentation. Only {$< FIELDNAME >_PATH_RELATIVE} = Relative url (from images/stories) to the re-sized image, as these images were not resized it seemed incorrect.

I'll give your example a go later.

regards Brendan
  1. more than a month ago
  2. Form2Content Lite & Pro
  3. # 5
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.