-
iCagenda
-
iCagenda - English
-
[VIEWED] Event attachments selection (feat. request)
[VIEWED] Event attachments selection (feat. request)
-
wilku
-
Topic Author
-
New Member
-
Less
More
-
Posts: 11
-
Thank you received: 0
-
-
11 years 4 months ago - 11 years 4 months ago #4864
by 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.
Last edit: 11 years 4 months ago by Lyr!C. Reason: [VIEWED]
Please Log in or Create an account to join the conversation.
-
Lyr!C
-
-
Administrator
-
-
Lead Developer
Less
More
-
Posts: 6784
-
Thank you received: 608
-
-
-
-
11 years 4 months ago #4867
by Lyr!C
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)
.
Please Log in or Create an account to join the conversation.
-
wilku
-
Topic Author
-
New Member
-
Less
More
-
Posts: 11
-
Thank you received: 0
-
-
11 years 4 months ago #4870
by 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.
Please Log in or Create an account to join the conversation.
-
Lyr!C
-
-
Administrator
-
-
Lead Developer
Less
More
-
Posts: 6784
-
Thank you received: 608
-
-
-
-
11 years 4 months ago - 11 years 4 months ago #4872
by 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)
.
Last edit: 11 years 4 months ago by Lyr!C.
Please Log in or Create an account to join the conversation.
-
wilku
-
Topic Author
-
New Member
-
Less
More
-
Posts: 11
-
Thank you received: 0
-
-
11 years 4 months ago #4873
by 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.
Please Log in or Create an account to join the conversation.
-
wilku
-
Topic Author
-
New Member
-
Less
More
-
Posts: 11
-
Thank you received: 0
-
-
11 years 4 months ago #4876
by 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.
Please Log in or Create an account to join the conversation.
-
Lyr!C
-
-
Administrator
-
-
Lead Developer
Less
More
-
Posts: 6784
-
Thank you received: 608
-
-
-
-
11 years 4 months ago #4893
by Lyr!C
wilku wrote: -- 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)
.
Please Log in or Create an account to join the conversation.
-
wilku
-
Topic Author
-
New Member
-
Less
More
-
Posts: 11
-
Thank you received: 0
-
-
11 years 4 months ago #4903
by 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.
Please Log in or Create an account to join the conversation.
-
Lyr!C
-
-
Administrator
-
-
Lead Developer
Less
More
-
Posts: 6784
-
Thank you received: 608
-
-
-
-
11 years 4 months ago #4904
by Lyr!C
wilku wrote: 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)
.
Please Log in or Create an account to join the conversation.
-
wilku
-
Topic Author
-
New Member
-
Less
More
-
Posts: 11
-
Thank you received: 0
-
-
11 years 4 months ago #4905
by 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.
Please Log in or Create an account to join the conversation.
-
iCagenda
-
iCagenda - English
-
[VIEWED] Event attachments selection (feat. request)
Time to create page: 0.181 seconds