Tuesday, 07 March 2017
  15 Replies
  1.4K Visits
0
Votes
Undo
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.
7 years ago
·
#184814
Accepted Answer
0
Votes
Undo
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
·
#184954
0
Votes
Undo
Sorry, Ask over at the JCE Forums if they can limit the file selection with the method you are using,

Many thanks
Tony

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

7 years ago
·
#184952
0
Votes
Undo
Sorry, I don't undersand.

What do you mean with "...give them a PING to see..."?
7 years ago
·
#184946
0
Votes
Undo
Hello,

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

Many thanks
Tony

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

7 years ago
·
#184944
0
Votes
Undo
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
·
#184833
0
Votes
Undo
You could add a classname to the link and style it to look like a button

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

7 years ago
·
#184832
0
Votes
Undo
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>';


JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

7 years ago
·
#184814
Accepted Answer
0
Votes
Undo
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
·
#184770
0
Votes
Undo
I was afraid you would say this. :-)

I'll try my best.
7 years ago
·
#184766
0
Votes
Undo
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

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

7 years ago
·
#184764
0
Votes
Undo
...and how can I put this into a custom field?
7 years ago
·
#184761
0
Votes
Undo
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

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

7 years ago
·
#184754
0
Votes
Undo
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
·
#184753
0
Votes
Undo
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

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

7 years ago
·
#184743
0
Votes
Undo
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
·
#184741
0
Votes
Undo
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.

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

  • Page :
  • 1
There are no replies made for this post yet.

Members Area

Show your support

Unlike many Joomla calendars we do not charge to download JEvents - please show your support for this project by becoming a member of the JEvents Club Club members get access to early releases, exclusive member support forums, and Silver and Gold members can use many exciting JEvents addons

Your membership will ensure that JEvents continues to be the best events calendar for Joomla.