Multiple DIFFERENT CKeditor instances on the same page - ckeditor

I've made 2 custom builds of CKEditor for my CMS:
For general purposes
Just for creating of maps with Leaflet plugin
In general every page can consist of several "general" CKeditor blocks (and all is OK here). But some pages (like "Contacts", for example) can also contain "maps" instances. The instances are totally independent, it's not the same repo with different configs, it's 2 different builds. So I need to connect some textareas with the 1st build, and some with the 2nd. Is it possible?
Screenshots are attached below:
Folders with different repos
Maps editor

You can't use different CKEditor builds on the same page. There's only a single CKEDITOR namespace, so there's no way to tell apart which build do you want to use.
Instead, you should use the extraPlugins and removePlugins config options to adjust each instance the way that you want.

Related

Save pane configurations / sessions in atom

Usually I see myself developing a component in react, for example, and every time I edit this component I need to edit also related files like css ones or inner components. I, moreover, like to have this files organized in different panes, see the image for an example. Do you know if, while working in my project, can I open/close this whole pane/files configurations? Thanks!
How about this: https://atom.io/packages/save-workspace. I don't think it is quite what you were looking for but it should work - instead of providing tab configurations for a specific project, it keeps a global set of configurations including open project directories, tab/pane configurations, and active cursors.

Reusing form in two projects loses the images on the toolbar

I have a form which I would like to reuse across multiple projects. I add the form into the projects by linking them, therefore have one version with one set of changes which will affect all the projects.
My problem is that the form will display the images in the original project, but in any subsequent projects, the images on the toolbar have disappeared.
Do I have to add the images into the resources (which doesn't seem to work)?

How can I manage to have two different toolbars in CKEditor for two different groups?

I am using Zikula 1.4.6 with several modulstudio generated modules. These modules do have scribite plugin activated.
If I use the "full" toolbar I do see all my modules in this toolbar. But I have to create a stripped down toolbar for my normal users. There they should not have acces to all modul plugins. So I generated the "special1" toolbar accordingly. The "special2" toolbar is prepared for my advanced users named "redakteure".
Zikula offers stil the possibility to use the overwrite.yml (Scribite is an older style module where the symphony override is not working). But I do not see which file I do have to change to use the special1 or special2 depending on the permission or group situation.
Or is there a better way to do something to make some plugins only visible for some groups?
How can I manage to have two different toolbars in CKEditor for two different groups?
You need to incorporate a permission check here: https://github.com/zikula-modules/Scribite/blob/master/plugins/CKEditor/templates/editorheader.tpl#L31
For example:
{{checkpermission component='::' instance='.*' level='ACCESS_ADMIN' assign='isAdmin'}
{{if $isAdmin}}
toolbar: 'mySpecialToolbar',
{{else}}
toolbar: '{{$Scribite.editorVars.barmode}}',
{{/if}}

Why won't Joomla render my PHP/Javascript tags on the front page?

This is my first project on website development using Joomla. I am trying to make a dashboard implementation. My problem is that whenever I edit my script in article using source tags, the changes are not reflected on my site immediately. I have even tried restarting my Wamp server, but in vain. Any tips that I should follow?
Thanks.
Depending on your Joomla-Version there are different options to check to suppress stripping or filtering of tags like <script> for the frontend. Here are some hints:
First of all your tags could be filtered out client-sided depending on the editor you selected. If you use the standard TinyMCE e.g. go to Extensions - Plugins - TinyMCE where you will find a list of prohibited Elements which may include script. Be exactly sure what you do though, always check who should be allowed to enter script tags in an article, this is almost always a major security risk if anybody else like you as an administrator has the right to use them. So another option could be to just set the editor for your administrator/author accout to plain text and leave TinyMCE untouched.
Another filtering is done server-sided by joomla itself which can be controlled in "Global Configuration" -> "Text filter". After a standard installation all groups will use Default Black List filtering which includes removing script tags. Here you could define "No Filtering" for the Super User group e.g.
Again, all this depends on your Joomla-Version (my examples are referring to 2.5) and are hints to get around the issue but without knowing your security concept.

Joomla 1.7 with Virtuemart 2.0 – How do I change template for a homepage and other subpages

I am a newbie to Joomla 1.7 & Virtuemart. I have used many CMS so far and in Joomla I need to do very common task. I need to have different layout for homepage, for product list and product details and so on. Every single page is generated from index.php which is in *joomla root/templates/my_own_template/* folder.
And one more question. Is there any Virtuemart 2.0 or Joomla 1.7 documentation? Because what I could see is that the versions are really different from old ones for which most documentation are written.
Thank you in advance for answers.
You're probably not going to find much documentation yet since that is usually the last thing that a developer does once the code is out and tested.
As for changing templates, you don't necessarily need to change templates to have different layouts. First, VM has several different theme files (theme is a VM template) that render the various pages. There are already different layouts you control in the admin. You can also change a particular page by adding or removing the various modules from pages. You can associate a module with all pages in the site, a selection of pages, an exclusion of pages, and no pages at all. Components like Advanced Module Manager give you even more control over where and when a module displays. A properly coded template will have collapsible module positions. So a page with no modules in the left column will not have a left column.
Lastly, Joomla 1.7 also allows the use of template styles. When you install a template, it creates a default style. You can duplicate and edit that style, then assign it to various menu items to achieve very different looks from one page to another. http://docs.joomla.org/Help16:Extensions_Template_Manager_Styles_Edit
Brent's answer is good – he's right that the look of a page can be determined by which modules are assigned, which VM layout is used, and by assigning different Joomla Templates/Styles to different menu items.
One issue that arises a lot with complex components like VirtueMart is that it can be awkward to assign different templates (or modules) to different menu items. This can mess up your menu structure, and there are times when VM will decide on a different menu item to display something rather than what you thought it should. So that messes up the modules and templates/styles. This is part of the down-side of having a menu-item-driven assignment system.
AMM is good for assigning modules to different pages independent of menu item - as is MetaMod (which has explicit VM support).
For assigning templates/styles to different pages in VM I would suggest Chameleon. Chameleon has form controls for selecting lots of different factors about VM (e.g. all the sub-page types, category of the item, cart contents and more) and you can use any of those factors to trigger a certain template/style. It can also trigger other actions like adding CSS/JS to the page, removing arbitrary menu items, switching the home page, etc.
So ultimately, using Brent's techniques and with Chameleon, MetaMod and/or AMM, you have a huge amount of control about how individual pages in VM look.

Resources