简体   繁体   中英

JavaScript and CSS Editor in joomla

As we see in Joomla 2.5 if we click on template then we saw lit of CSS. I want to generate exact list of JS(Javascript) files along with that. If we click on Javascript i am able to edit it. Now, second question how i can create up loader for Joomla Admin Panel. My clien want to upload CSS and JS files of his own. I checked out few link and extensions but not able to understand. any help on above please I had check ed following link for uploading but not able to understand how to implement http://docs.joomla.org/Creating_a_file_uploader_in_your_component

Thanks, Manpreet

The CSS and JS editor is only available in some templates. Also it is able to edit the JS and CSS files that are embedded through your template. You can view these files in your index.php (/templates/your_templates/index.php )

That link you have posted is about creating a component (nothing to do with templates), also is impossible to upload CSS and JS files through the media uploader , first of all the files are uploaded by default in /images/ folder, secondly I am not quite sure how is it possible to work.

BUT there might be a tricky solution for your problem. Each component, module or plugin is able to embed its own styles and Javascript files. Take a look at your template's source code, there must be a line like this

<jdoc:include type="head" />

This mentions to the joomla core that there will be embedded the additional files in the head of the HTML document. My approach would be presented four generic steps

a) Create a folder where your client can upload several CSS and JS files b) Create a plugin in order to do the uploaded stuff c) In your plugin implementation add some functionality for editing the files (you can use any jquery's editor plugin to display the code in a popup or even joomla default editor d)allow user to choose which files wants to embed

As I can imagine it will be a very hard task to accomplish since you have to face lots of problems (file uploading restrictions, file rights etc) but it's not impossible to do

Good luck with your project

在回答了您之前关于基本相同问题的问题之后,我将再次说一遍,您可以下载文件上传器组件,该组件为我提供了链接,或者只是从JED下载文件管理扩展。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM