Elxis CMS Forum

Extensions => Components => Topic started by: cardinal 22 on May 13, 2025, 20:29:32

Title: MYcontent Component
Post by: cardinal 22 on May 13, 2025, 20:29:32
Hello everyone, i want to add the function pdf at component "mycontent". As it is for uploading images. I also wondering if there is a way to unlock full editor functions as it is in backend. I tried to change the setting to "rich" from "limited" editor but nothing changed at all.  So all i want is to have the option to upload a pdf documents also , not only images.

Thanks in advance.
Title: Re: MYcontent Component
Post by: datahell on May 15, 2025, 14:44:40
MyContent has been designed as a lightweight content editing application for public interface editing when backend editing is not an option. Therefor uploading files and a full html editor is out of scope. It is mostly a matter of security. If you don't need this feature too often you can use the Downloads plugin, edit the article from backend and attach the PDF.
Title: Re: MYcontent Component
Post by: cardinal 22 on May 16, 2025, 20:40:44
Although i unsterstand that there are some security reasons, but i want to make some changes for my own purposes. Is there anybody that can add some more funciontality to "Mycontent"?

Title: Component My Content v2.2
Post by: datahell on May 18, 2025, 21:16:06
I just updated component My Content and added the functionality you want!
Allowed file extensions are: pdf, xls, xlsx, ppt, pptx, doc, docx, txt.
Update to version 2.2 and you are ready.

Instructions
1. Edit component parameters and set the position for Attach files block.
2. Go and edit an article, you will see that you can attach files.
3. When displaying the articles the download links have no special styling, so they might look ugly. You can beatify by using the CSS class "myc_attachedfile" on a DIV element that wraps the link.
This is the HTML it generates for each attached file: <div class="myc_attachedfile"><a href="#">File PDF</a></div>

Component My Content at elxis.net (https://www.elxis.net/edc/content/141.html)
Title: Re: MYcontent Component
Post by: cardinal 22 on May 19, 2025, 07:43:57
 ;)  what a nice surprise!!! Thank you very much!  The "mycontent" is the most advanced and powrful extention for functionality of Elxis users.

1)Which file of template shoulid i edit for the "myc_attachedfile" css?? 

2)Can i unlock the editor too somehow? To be full functional?

Thank you so much! Perfect!
Title: Re: MYcontent Component
Post by: datahell on May 19, 2025, 20:45:14
You can add your custom CSS in user.config.css, it is easier as you don't have to edit template files.

Elxis administration > Site > Code editor
Click on user.config.css
Add your custom styling there and save the file.

Sample styling
Make the DIV having background color gray:
.myc_attachedfile {
    background:#F2F2F2; padding:10px;
}
Make the link display block and with red bold letters:
.myc_attachedfile a, .myc_attachedfile a:hover, .myc_attachedfile a:visited, .myc_attachedfile a:active  {
     display:block; font-weight:bold; color:#FF0000;
}
.myc_attachedfile a:hover { color:#000000; }

Running the editor in front-end in full mode is a VERY BAD idea.