Main menu

Forum


The developer takes a few days off for Summer vacation...
...and will be back with charged battery!

From 1st August to 10th August, 2026 included
During this period,
assistance from developer will not be provided.

NEWS: iCagenda 4.1.0-alpha1 will be available for testing for users with a PRO subscription
by the end of August!

× Help Forum English

[VIEWED] Event attachments selection (feat. request)

  • wilku
  • Autore della discussione
  • New Member
  • New Member
Di più
12 Anni 11 Mesi fa - 12 Anni 11 Mesi fa #4864 da wilku
Hi again,

Is there any chance that you could change the attachment field in event entry so that it allows to choose a file already uploaded to the server? Possibly a default file (path) selection dialogue from J! (which has the option of choosing a file and/or uploading a new one).

I have a calendar showing courses/trainings which have the same description in a .pdf file I'd like to attach.

Another solution that would help in my problem would be allowing multiple periods for the same event (now it's one period + many single-day dates).

I tried to tweak it myself, but it's beyond my skills.

Thanks in advance.
Ultima Modifica 12 Anni 11 Mesi fa da Lyr!C. Motivo: [VIEWED]

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
12 Anni 11 Mesi fa #4867 da Lyr!C
Risposta da Lyr!C al topic Event attachments selection (feat. request)
Currently, i'm using Joomla core function to upload a file.
And this possibility is not today implemented in Joomla... :(

What can be done, is use media type, but you will have to add pdf as accepted format in global option.
And will have to edit core code of iCagenda...

I will check this option, but not in the next months, as many other things to developpe before! (and so a long todo list now! ;-) )

Latest version : iCagenda 4.0.11
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • wilku
  • Autore della discussione
  • New Member
  • New Member
Di più
12 Anni 11 Mesi fa #4870 da wilku
Thanks for the info, but I think I was misunderstood.

I was wondering however, it it was possible to copy/adapt the code from image field for the event (jform_image), and just paste it instead of the current (jform_upload_file). Seems to be a simple thing as both eventually output an url to a file, but I just can't figure out where the fields and their parameters are set.

So far I got to ..fields/modal/icfile.php and media.php and I'm comparing the syntax of those fields. Is there any other place I should be careful about (some .xml or other parameters / variables storage)?

I'd be really happy to contribute, but as I've said already - my PHP skills are rather limited, so any help / guidance would be much appreciated.

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
12 Anni 11 Mesi fa - 12 Anni 11 Mesi fa #4872 da Lyr!C
To do so, just edit this file : administrator/componenents/com_icagenda/models/forms/event.xml

change this line :
<field name="file" type="modal_icfile" class="inputbox"  id="upload_file"


to this one :
<field name="file" type="media" class="inputbox"  id="upload_file"

By changing to media type, you will have the same modal as for image.
Just you have to edit your media options authorized mime-type in Joomla Options.

;-)

Latest version : iCagenda 4.0.11
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Ultima Modifica 12 Anni 11 Mesi fa da Lyr!C.

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • wilku
  • Autore della discussione
  • New Member
  • New Member
Di più
12 Anni 11 Mesi fa #4873 da wilku
Thanks, I did that and also uncommented the "select" button ine icfile.php which gives me the same window as in media selection. I just can't make J! display .pdf files although I have them allowed in media component, along with MIME type application/pdf.
(and pdfs are displayed in media component itself, just not in the window in iC)...
I'll keep working on it, thanks again for guidance.

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • wilku
  • Autore della discussione
  • New Member
  • New Member
Di più
12 Anni 11 Mesi fa #4876 da wilku
-- edit
I had to give up - can't make J! com_media to populate the field with .pdf's url... It's really, really weird.

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
12 Anni 11 Mesi fa #4893 da Lyr!C

wilku ha scritto: -- edit
I had to give up - can't make J! com_media to populate the field with .pdf's url... It's really, really weird.


Can you download pdf in your media manager ?

Latest version : iCagenda 4.0.11
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • wilku
  • Autore della discussione
  • New Member
  • New Member
Di più
12 Anni 11 Mesi fa #4903 da wilku
That's exactly the problem - I can't. All I get in media manager (J! native) is filename and icon. It's not a link, although pdf is an accepted extension and mime type. It seems to be a normal J! behaviour (I have few other sites that I manage), so it's Joomla problem, not iC.

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
12 Anni 11 Mesi fa #4904 da Lyr!C

wilku ha scritto: That's exactly the problem - I can't. All I get in media manager (J! native) is filename and icon. It's not a link, although pdf is an accepted extension and mime type. It seems to be a normal J! behaviour (I have few other sites that I manage), so it's Joomla problem, not iC.


So, maybe your pdf is note a pdf (wrong mime-type, or a x-pdf, an other format for pdf...)

If not, this can be hoster params (php.ini), or htaccess blocking pdf download.

For me, no problem with pdf files with Joomla...

Latest version : iCagenda 4.0.11
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • wilku
  • Autore della discussione
  • New Member
  • New Member
Di più
12 Anni 11 Mesi fa #4905 da wilku
Interesting remark - I'll check that too. Shame I've undone the changes in iC (but I think I can make them again).
I wouldn't assume the host parameters, as these are two different providers. I guess MIME type can be the answer. I'll let you know if I figure something out.

Si prega Accedi o Crea un account a partecipare alla conversazione.

Moderatori: Lyr!C
Tempo creazione pagina: 0.063 secondi

Follow Us

Create your Joomla templates with Template Creator CK

acymailing logo new