Keyword

K2 Power Tip: Use Image Extra Field for any File Type

  • Joe Campbell
  • Joe Campbell's Avatar Topic Author
  • Offline
  • Platinum Member
More
8 years 11 months ago - 8 years 11 months ago #142993 by Joe Campbell
If you're like me and use Extra Fields for just about any and everything on your site, then you know there needs to be a "File" extra field type. Which such you would be able to "select" files such as: PDF, MP3, DOCX, MP4, etc from instead of using the textfield types which requires finding the file path and then pasting it into the textfield.

This requires hacking K2, but for me this is a necessary evil. I comment the code and add each hack to a Website Documentation file to archive each hack that I perform.

File: /administrator/components/com_k2/models/extrafield.php

Remove: &type=image
From: index.php?option=com_k2&view=media&type=image

I welcome any proficient K2 programmer to provide a plugin so we would not need to hack the code to receive this functionality.

Note: I have submitted a request for a "File" extra field type in K2v3
github.com/joomlaworks/k2-v3-dev-build/issues/113
Last edit: 8 years 11 months ago by Joe Campbell.

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

More
5 years 6 months ago #169023 by Carlos
Very useful. Thanks!

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

More
5 years 6 months ago #169049 by JoomlaWorks
Just remember to restore your changes whenever K2 is updated ;)

Fotis / 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