Keyword

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

  • Joe Campbell
  • Joe Campbell's Avatar Topic Author
  • Offline
  • Platinum Member
More
3 years 5 months ago - 3 years 5 months ago #142993 by Joe Campbell
Joe Campbell created the topic: K2 Power Tip: Use Image Extra Field for any File Type
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: 3 years 5 months ago by Joe Campbell.

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

More
1 week 6 days ago #169023 by Carlos
Carlos replied the topic: K2 Power Tip: Use Image Extra Field for any File Type
Very useful. Thanks!

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
1 week 2 days ago #169049 by Fotis
Fotis replied the topic: K2 Power Tip: Use Image Extra Field for any File Type
Just remember to restore your changes whenever K2 is updated ;)


If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

Moderators: william white