Keyword

PNG Images

  • JxnGraphix
  • JxnGraphix's Avatar Topic Author
  • Offline
  • Junior Member
More
7 years 6 days ago #161198 by JxnGraphix
PNG Images was created by JxnGraphix
Hi JW,


I have been researching ways to stop K2 from converting PNG images to JPGs but have been reluctant to find a solution. This thread mentioned making the feature available in the next release; however, that was SIX years ago. When can the community expect the application to allow PNG uploads without conversion? Or, is there an override or workaround available?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 3 days ago #161244 by Krikor Boghossian
Replied by Krikor Boghossian on topic PNG Images
You can use extrafields to upload an image as is.
There are several threads about this and you can find a code example github.com/kricore/Advanced-templating-with-K2/blob/master/_inc/cheatsheet.php

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • JxnGraphix
  • JxnGraphix's Avatar Topic Author
  • Offline
  • Junior Member
More
7 years 3 days ago - 7 years 3 days ago #161250 by JxnGraphix
Replied by JxnGraphix on topic PNG Images
The issue is that I already have several items, each allocated to a separate extra field group with different extra fields. I need to add one extra field that will be the same across all items but because it will be used as the item image, it should be displayed separately from the extra fields. I'm sure I can find a way to display it separately. The issue is that I need a way to remove it from the extra fields display.

Example:
Extra fields group: Fruit
Extra fields: apple, banana, orange, png image

How do I remove the png image from the foreach statement that displays the extra fields list?
Last edit: 7 years 3 days ago by JxnGraphix.

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

  • JxnGraphix
  • JxnGraphix's Avatar Topic Author
  • Offline
  • Junior Member
More
7 years 3 days ago #161251 by JxnGraphix
Replied by JxnGraphix on topic PNG Images
Solution: Use the <?php echo $extraField->name; ?> to add a class to the <li> element then remove the desired class with CSS

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 1 day ago #161255 by Krikor Boghossian
Replied by Krikor Boghossian on topic PNG Images
You can use either the name the id or the alias, all will work.
You can also use that same check in order not to print anything in that loop.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum