Main menu

Forum


× Help Forum English

[VIEWED] Event attachments selection (feat. request)

  • wilku
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 11 ans 4 mois - il y a 11 ans 4 mois #4864 par 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.
Dernière édition: il y a 11 ans 4 mois par Lyr!C. Raison: [VIEWED]

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 11 ans 4 mois #4867 par Lyr!C
Réponse de Lyr!C sur le sujet 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 3.9.8
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) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

  • wilku
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 11 ans 4 mois #4870 par 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.

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 11 ans 4 mois - il y a 11 ans 4 mois #4872 par 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 3.9.8
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) .

Fichier attaché :

Dernière édition: il y a 11 ans 4 mois par Lyr!C.

Connexion ou Créer un compte pour participer à la conversation.

  • wilku
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 11 ans 4 mois #4873 par 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.

Connexion ou Créer un compte pour participer à la conversation.

  • wilku
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 11 ans 4 mois #4876 par 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.

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 11 ans 4 mois #4893 par Lyr!C

wilku écrit: -- 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 3.9.8
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) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

  • wilku
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 11 ans 4 mois #4903 par 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.

Connexion ou Créer un compte pour participer à la conversation.

  • Lyr!C
  • Portrait de Lyr!C
  • Administrateur
  • Administrateur
  • Lead Developer
Plus d'informations
il y a 11 ans 4 mois #4904 par Lyr!C

wilku écrit: 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 3.9.8
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) .

Fichier attaché :

Connexion ou Créer un compte pour participer à la conversation.

  • wilku
  • Auteur du sujet
  • Nouveau membre
  • Nouveau membre
Plus d'informations
il y a 11 ans 4 mois #4905 par 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.

Connexion ou Créer un compte pour participer à la conversation.

Modérateurs: Lyr!C
Temps de génération de la page : 0.121 secondes

 

Follow Us

Créez vos templates Joomla avec Template Creator CK

acymailing logo new