I'm new to Joomla development. After reading some good examples at
http://docs.joomla.org/Developers , I decided to make a plugin.
The idea of the plugin was simple, to include JQuery and run it in 'no
conflict mode'. The problem is that it actually works, BUT when I turn
on 'Firebug', it shows that in some moment of the process, this error is
displayed:
"Call to undefined method JDocumentRAW::addCustomTag()"
As far as I've been reading, I think that JDocumentRAW inherits from
JDocument, wich is (JDocument) an abstract class (please correct me if
I'm wrong).
In my code, I do NOT call JDocumentRAW, or even JDocumentHTML,
This is the code that seems to be yielding the error:
Note: My plugin is located in 'system' directory.
*Code:*
function onAfterInitialise() {
global $mainframe;
$script = "<script type='text/javascript' src='" . JURI::root()
. "components/com_virtuemart/js/jquery.js'></script>\n";
$script .= "<script type='text/javascript'>\$jpe =
jQuery.noConflict(); </script>";
$doc =& JFactory::getDocument();
$doc->addCustomTag($script);
return true;
}
I've noticed that if I wrap the like that uses 'addCustomTag' with this:
*Code:*
if($doc->getType() != 'raw') {
$doc->addCustomTag($script);
}
The error disappears and the plugin works as expected too.
My questions are:
- How do I know if it is the correct moment to call certain type of Methods?
- Could someone point me to the correct documentation about the concept
of raw data in Joomla?
(I have an idea, more or less, but not completely clear).
Something indicating when in the Joomla API execution we have 'raw',
'html' or other type of data would be great.
- In your oppinion, do I need to buy a Joomla development book, or it
would be enought with the information available online?
Regards,
--
Jose P. Espinal
http://www.eslackware.com
http://www.asteriskfaqs.org
IRC: [OFTC|FreeNode]
Khratos @ #slackware | #asterisk/-doc/-bugs
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
I'll make the correction indicated in order to avoid problems when the
document is not html.
Thanks again,
> <mailto:joomla-de...@googlegroups.com>.
> To unsubscribe from this group, send email to
> joomla-dev-gene...@googlegroups.com
> <mailto:joomla-dev-general%2Bunsu...@googlegroups.com>.
> For more options, visit this group at
> http://groups.google.com/group/joomla-dev-general?hl=en-GB.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Joomla! General Development" group.
> To post to this group, send an email to
> joomla-de...@googlegroups.com
> <mailto:joomla-de...@googlegroups.com>.
> To unsubscribe from this group, send email to
> joomla-dev-gene...@googlegroups.com
> <mailto:joomla-dev-general%2Bunsu...@googlegroups.com>.
> For more options, visit this group at
> http://groups.google.com/group/joomla-dev-general?hl=en-GB.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Joomla! General Development" group.
> To post to this group, send an email to
> joomla-de...@googlegroups.com.
> To unsubscribe from this group, send email to
> joomla-dev-gene...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/joomla-dev-general?hl=en-GB.
--
Jose P. Espinal
http://www.eslackware.com