By Berndi on Tuesday, 07 March 2017
Replies 15
Likes 0
Views 1.4K
Votes 0
Hello experts,

I'd like to put a custom field to my event_editpage, where the author can select a file from the joomla media folder.
I only find the file-field.

... and with the images/files plugin I can't restrict catgories.

Is there a way I do not see?

regards,
Berndi


Update:
I changed the global settings of the images and files plugin Use Joomla media manager to select and upload images
to YES, but it won't appear.
Well, I modified the jevcftext to my new jevcfmedia by changing the function getInput() near line 163 to

$knopf = JRoute::_(WFBrowserHelper::getBrowserLink("input_file_for_url"));
$knopf = '<a title="File Browser" href="' . $knopf . '" class="tgs" rel="{handler: \'iframe\', size: {x: 800, y: 500}}">Auswählen</a>';

return $knopf . '<input readonly type="text" name="' . $this->name . '" id="input_file_for_url" value="'
. (substr(strtoupper(htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8')), -3) == "PDF" ? htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') : "") . '"'
. $class . $size . $disabled . $readonly . $onchange . $maxLength . $placeholder. '/>';


this works fine

The only thing I need is the possibility to call the filebrowser by clicking a button instead a link.

...and I don't have any idea how to do this.

What about you?

regards,
Berndi
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
At present its only the images that can be configured to use the media manager - I'll try to make some time to migrate the other files to support the Joomla media manager too.
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Would it be possible to make a custom field for a simple fileselection with the joomla media manager without using the files and images plugin?

I just want to handle the filepath...
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

You could look at the text field and copy this to be a new field and edit the code to use the Joomla! file browser I suppose.

Many thanks
Tony
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Well, I thought about that but I don't have any idea how to call the Joomla! file bowser...

are you able to help me a litle bit?
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Why not use the JCE File browser? This is quite easy to support:
https://www.joomlacontenteditor.net/support/forum/56864-jce-file-browser-in-custom-component

Many thanks
Tony
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
...and how can I put this into a custom field?
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
You would have to code it in, are you not familiar with PHP? This is custom work since it's not natively supported you see.

Many thanks
Tony
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
I was afraid you would say this. :-)

I'll try my best.
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Try changing:


$knopf = '<a title="File Browser" href="' . $knopf . '" class="tgs" rel="{handler: \'iframe\', size: {x: 800, y: 500}}">Auswählen</a>';



to


$knopf = '<a title="File Browser" href="' . $knopf . '" class="btn button tgs" rel="{handler: \'iframe\', size: {x: 800, y: 500}}">Auswählen</a>';

·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
You could add a classname to the link and style it to look like a button
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Well, this works perfekt.
Thanks !!!

Another 'off topic' question....

Is there an option for WFBrowserHelper to show only pdf-files?

regards,
Berndi
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

I'm not sure that's a JCE Editor helper function. Can you give them a PING to see.

Many thanks
Tony
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Sorry, I don't undersand.

What do you mean with "...give them a PING to see..."?
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
Sorry, Ask over at the JCE Forums if they can limit the file selection with the method you are using,

Many thanks
Tony
·
7 years ago
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post