Form field type Media - Shows no PDF's

This forum is for general questions about extensions for Joomla! 2.5.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
User avatar
goslingcools
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 106
Joined: Fri Jan 16, 2009 9:21 pm
Location: Netherlands, The Hague
Contact:

Form field type Media - Shows no PDF's

Post by goslingcools » Wed Mar 07, 2012 10:06 am

Code: Select all

<field name="file" type="media" directory="resources-downloads" size="40" class="inputbox" label="Select a  file" description=""  />
Where can I specify the visible / selectable file types?

You can upload a PDF in this window, but not see/select it.

Does anyone have an idea?

Regards,

Gosling Cools
You do not have the required permissions to view the files attached to this post.
Gosling Cools | COBIZ webdevelopment | http://www.cobiz.nl

User avatar
72dpi
Joomla! Intern
Joomla! Intern
Posts: 55
Joined: Thu Mar 16, 2006 12:47 am

Re: Form field type Media - Shows no PDF's

Post by 72dpi » Thu Jun 21, 2012 7:35 am

Surprised no-one has answered this, I'd love to see this "hacked"

\administrator\components\com_media\views\media\tmpl\default.php

<a class="modal" title="Select" href="index.php?option=com_media&view=images&tmpl=component&asset=com_prescribedburns&author=901&fieldid=jform_pub_consult_map&folder=" rel="{handler: 'iframe', size: {x: 800, y: 500}}">
Select</a>


Now if that call can be modified to:


<a class="modal" title="Select" href="index.php?option=com_media&view=media&tmpl=component&asset=com_prescribedburns&author=901&fieldid=jform_pub_consult_map&folder=" rel="{handler: 'iframe', size: {x: 800, y: 500}}">
Select</a>
(ie changing the view), you can see the document you just uploaded.

Anyone got a clue how to override this from any given component?

jallo
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Nov 17, 2012 2:23 pm

Re: Form field type Media - Shows no PDF's

Post by jallo » Sat Nov 17, 2012 2:48 pm

I'm still looking for a solution to this problem ... does anyone have any idea?
The trick suggested does not solve the problem ... missing the select button

woodzu123
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Mon Jul 13, 2009 7:49 pm

Re: Form field type Media - Shows no PDF's

Post by woodzu123 » Sun Apr 28, 2013 3:56 pm

So am I. After so long, the only option is to use filelist field type.

If I supply a patch for that, would one of you guys be able to pull it into Joomla?

icepizza
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Fri Oct 26, 2007 9:18 am

Re: Form field type Media - Shows no PDF's

Post by icepizza » Fri May 10, 2013 3:21 pm

72dpi wrote:Surprised no-one has answered this, I'd love to see this "hacked"

\administrator\components\com_media\views\media\tmpl\default.php

.....

Anyone got a clue how to override this from any given component?
Hey guys,

i've looked up the file /libraries/joomla/form/fields/media.php and found out, that you can use the parameter "link" in your xml-file to set the open link manually.

Try something like this:

Code: Select all

<field name="file" type="media" label="PDF" description="PDF File" size="40" class="inputbox" default="" required="true" directory="path_to_your_directory" link="index.php?option=com_media&view=media&tmpl=component&asset=com_yourcomponent&author=&fieldid=jform_file&folder=path_to_your_directory"/>
You just need to replace asset=... , filedid=... and folder=....

Hope this helps!
Best

Folcomedia
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Sep 11, 2013 1:54 pm
Location: Nîmes
Contact:

Re: Form field type Media - Shows no PDF's

Post by Folcomedia » Wed Jan 29, 2014 5:44 pm

Hello,

anyone find the solution ? Because I have the same problem... I work with version 3.2.1 of Joomla

Thanks.

Ggeorgi0
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Jul 06, 2015 9:40 am

Re: Form field type Media - Shows no PDF's

Post by Ggeorgi0 » Mon Jul 06, 2015 9:44 am

Just go to:
administrator/components/com_media/models/list.php
line:
~ 157
add:
case 'pdf':

nfleming
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Fri Apr 09, 2010 1:34 am

Re: Form field type Media - Shows no PDF's

Post by nfleming » Tue Aug 22, 2017 10:26 pm

I have found that this fixes the issue with custom field type "media" allowing pdfs to be uploaded but then not showing the pdf as available for selection. Using Joomla 3.7.5.
Having custom field of type "file" would be better, but it doesn't seem to be available yet?


Locked

Return to “Extensions for Joomla! 2.5”