PlugIn not getting row

Please see sticky inside.
Locked
MarjanP
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Sun Feb 18, 2007 6:02 pm

PlugIn not getting row

Post by MarjanP » Wed Jul 04, 2007 9:03 pm

I am trying to get a plugin in 1.5B2 to run.
It is installed and published, it gets called when the page is being prepared, but it doesn't receive the text to hand it over to the reg Ex function. The following code is a stripped down version which results in a js alert that should show some content from the current article. in J1.5 it doesn't show anything, in J1.12 it does. I am totally stuck here, don't even know how those Plugin functions receive their parameters. where should &$row come from? Any help is appreciated!

defined( '_JEXEC' ) or die( 'Restricted access' );
$mainframe->registerEvent( 'onPrepareContent', 'botPodcast' );

/**
* Plugin that changes podcast Tags to links or the like
*/
//function botPodcast( $published, &$row, &$params, $page=0 )
function botPodcast($published, &$row, &$params, $page=0 )
{
echo("alert('published = ".$row->text."')");
/*
    everything commented out
    return true;
*/
}

MarjanP
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Sun Feb 18, 2007 6:02 pm

solved it myself

Post by MarjanP » Wed Jul 04, 2007 9:42 pm

b]the old mambot started with:[/b]
function fname( $published, &$row, &$params, $page=0 ) {

i changed it to
function fname( &$row, &$params, $page=0 ) {

then everything was fine!


Locked

Return to “Joomla! 1.5 BETA 2”