Joomla dev - Probleme with an editor field in theconfiguration context - joomla

I'm currently developing a component that includes an "editor" field in his parameters (the form mandated by the com_config).
The value of the "filter" attribute of the field in the "config.xml" file is : "raw".
Despite all the HTML here is fired, remains only the textual content.
On this website I'm doing the same thing for the parameters of a plugin and It work very well here, so I think that it's not a story of Joomla! configuration or editor configuration (I use the same editor with the same user account) ...
Is it a constraint imposed by the configuration component ??
Thank you for your lights!

It is difficult to say without some code to look at, but the raw filter should not remove HTML.
You could try building the same functionality using http://www.component-creator.com and view the code it generates or simply just use the built component instead of your own code.

Related

Cannot view joomla component

I've created a joomla component which consists of a html form, and when I try and browse to it:
index.php?option=com_helloworld
I get an error 404, component cannot be found.
I'm following this tutuorial:
http://docs.joomla.org/Developing_a_Model-View-Controller_Component/2.5/Developing_a_Basic_Component
Can anyone please tell me how I can browse to the page?
UPDATE: here is the link to my sample component, its a basic html form.
http://tinyurl.com/d6tj7rz
Many thanks
IIRC, even if a component is not installed correctly, you can still access the code if it's on the server, from my experience. But that may have been a 1.5 thing.
If you don't specify a view in the URL by passing &view=viewname, AND you haven't set a default fallback view, then you can't expect to have anything come up.
For a good example on how to set a default view, look in components/com_contact/controller.php line 38.
Within the main controller's display method:
// Set the default view name and format from the Request.
$vName = $this->input->get('view', 'categories');
$this->input->set('view', $vName);

Updating joomla admin component from 2.5 to 3.x

I'm trying to update our templates and current modules and backend admin components to work with Joomla 3.
I've updated the component file to use JControllerLegacy etc where needed, and I can see it in my backend - basically. It's a field you put a string of information in, and that gets saved to the database and then gets re-used in other modules.
I can input stuff into the text field, but if I go to click save, save and close, or cancel absolutely nothing happens.
I haven't missed any files out as this was a direct import from a working version on 2.5.x and when I run web console it tells me:
TypeError: b is null # /media/system/js/core.js:4
and
Empty string passed to getElementById(). # /media/jui/js/jquery.min.js:2
Which I assumed was that it was trying to tell me the text field was empty. However, no matter what's in there, it still doesn't do anything, and I would have thought the cancel wouldn't matter if there was anything in the box or not.
Any pointers would be great.
Do you have the hidden inputfield <input type="hidden" name="task" value="" /> in your form?
When clicking a button, the Javascript function Joomla.submitbutton(task) is called. This should be defined/overriden in your layout to make some checks and then call Joomla.submitform(task), which fills the task into the hidden field and sends the form.
I think these functions have changed their name someday. Maybe you still got them without the Joomla prefix?
Take a look at this page - http://docs.joomla.org/Potential_backward_compatibility_issues_in_Joomla_3.0_and_Joomla_Platform_12.1
Some things have changed between 2.5 and 3.0, mostly dealing with dropping 1.5 style code. Also, take a look at the core components and use them as references to verify what you're doing is right.
the JToolBarHelper:save(); was replaced with JToolBarHelper::save2new(); in further Joomla3 Versions

Create ribbon button Dynamically in CRM 2011

Can any one help me to create a ribbon button dynamically in CRM 2011. The scenario is, when we create a record, one ribbon button has to be created dynamically based the optionset value selected in that record. Can we get it work using JScript or Plug-in or Workflow? Enable or Display rules are not useful here and should not touch XML code.
Quick principle: Ribbon Buttons are not a part the record, they are a part of the UI. You can make the UI change based on the record you are looking. Therefore you cannot 'add' a button to a record. You can add a button to an entity form.
Plugins definetly wont work here, they peform logic on the 'back-end'. JavaScript might work but I would expect this to be quite awkward. What you should do is edit the ribbon Xml. Now there is an excellent for editing the ribbon: Ribbon Workbench, this tool make it significantly easier to
edit the ribbon (this is editing the XML but this is the way its meant to be done).
Then I think you will need to
Create a ribbon button for each action.
Then follow this tutorial to enable and disable them: Enable/Disable a ribbon button dynamically based on a form value.
Using a display rule would be the right way to do this.
Create multiple buttons and set their display rule when selected option is equal
to the button's name.
We can get it done by two ways-
Through plug-in:(Note: It won't works in Sandbox mode and consume some time.)
Create one solution and add specified entity to it. Go through the source code here
Export this solution to Temp folder and unzip it.
Edit customizations.xml file to add our own RibbondiffXml tag.
Zip all the XML files and Import it to CRM.
Publish the Customization.
Through XML edit:
Export Application Ribbon, update XML to add button and replace entity name with {!EntityLogicalName} in all the places.
Ex: <CustomAction Id="New.{!EntityLogicalName}.MyButton.CustomAction" Location="Mscrm.HomepageGrid.{!EntityLogicalName}.MainTab.Management.Controls._children" Sequence="70">...
Add EnableRule to enable this button only if Config record exist for current entity.
<EnableRule Id="New.{!EntityLogicalName}.MyButton.Check">
<CustomRule FunctionName="checkConfigRecord" Library="$webresource:new_/Scripts/ValidateConfigRecords.js">
<CrmParameter Value="SelectedEntityTypeName" />
</CustomRule>
</EnableRule>
Create one JavaScript library with name new_/Scripts/ValidateConfigRecords.js which contains function checkConfigRecord which counts config records exists for particular entity. If count is greater than 1 return true. Otherwise false.
Import the ApplicationRibbon Zipped file
I ran into the same problem on Dynamics 365 and found a solution.
RibbonWorkbench includes a feature called "Fly Out Anchor Buttons"
This includes a property called PopulateQueryCommand.
You can use this command to dynamically (using JScript) add menu options to the Anchor Buttons at runtime.
The RibbonWorkbench documentation includes all the information you need to use this feature.

Joomla module or component to be render on a blank page

I have developed a Joomla module that does provides a form, processes its post data, does some calculations and displays the results.
The module includes a button to print the results. I'm currently using JavaScript to open a new window, paste the relevant HTML and open the print dialog.
Instead of JavaScript I would prefer to provide a separate URL for the print view and simply open that in a _blank target. This would make the application work better for people using screen readers or not having JavaScript available.
Is there any way that I can tell Joomla to not render the template along with my module? I was thinking that creating a component fixes that issue, but had to find that components are rendered into the template, too...
BTW: I have Joomla 1.5.22
To achieve what you want you have to add additional tmpl=component query string parameter to the request URL. This will disable template and module rendering.
Your URL will look something like this: index.php?option=com_xxx&view=xxx&tmpl=component
Since you are using Joomla 1.5 you can request index2.php?option=com_xxx&view=xxx and it will only render the component. Joomla 2.5 does not have index2.php so if you plan to migrate in future, don't use this option.
If you are using SEF then adding ?tmpl=component at the end on URL does the trick.
To go a step deeper... in your template directory you have component.php file, that is the file that's being loaded by tmpl param. You can copy component.php to my_component.php, do necessary changes and load your custom component template with index.php?option=com_xxx&view=xxx&tmpl=my_component
The joomla way of doing it would be to set your output to "raw", see this tut:
http://www.katcode.com/displaying-raw-output-in-joomla-by-setting-format-in-the-component/

How do I make a component in Joomla display as an article?

More specifically I am trying to make the mailto component show within my template; the same way as an article does.
By default the mailto component opens in a new window. So far I changed the code so it opens on the same window, but that way the whole template is gone.
Any suggestions?
In the template there is a tag which takes the contents of a component. An article is a com_content component. you are trying to put in a caom_mail_to component? The beauty is that they both plug into the same slot.
Now you can only ever have one component on a page. you can have lots of modules, but only one component.
you set which component is on a page by choosing it from the menu comands. (each menu item refers to a component.) generaly the componetsn are of the com_content type, and are articles, but in your case you are wanting to add a component called com_mailto? Asuming the component is installed, all you have to do is select the new butto0n when in menu item manager, and then select the mailto component type.
the tag that is being used in a joomla 1.5 template is:
<jdoc:include type="component" />
If on the other hand you are trying to add a module to the template, that is a different kettle of fish. Youy need to create an instance of teh module, assign it to a tag (which exiusts in teh template) then select which menu items the module will be published on. The tag in a template for a module is like:
<jdoc:include type="modules" name="module_name_place_holder" />
you can put more than one module into a single place holder.
If you already have this basic knowlge, pass on the details of this component, and we will see if we cant find you a better solution.
use "component as content" plugin
http://extensions.joomla.org/extensions/core-enhancements/embed-&-include/5947/details
I'm afraid I can't entirely follow your question - do you want to have a sign up form for membership or email notifications shown as an article? If so, then the easiest way is to install 'm2c' - the 'module to component' component. Then you can put any module (ie the sign up box) in the centre content area.
The m2c component can be found here: http://joomla.focalizaisso.com.br/en/componentes/index.php

Resources