Forums

[SOLVED]Plugin helper problems

GreyHead 13 Jun, 2009
The plugin helper wrongly passes saved values to the Joomla Language handler.

The result shows up with a converted version of cf_Joomla_Registration (released versions don't use the helper). The Plugin loads field names incorrectly when they are also language ids e.g. id -> ID, email -> Email, password -> Password, etc.

Fixed version of the function is:
    function createInput($name, $value='', $attributes=array(), $id=false, $addTD=true, $attribTD=array() )
    {
        // create an id from $name if not supplied
        $id = ChronoContactHelperPlugin::createId($name, $id);

        $return = "<input type='text' name='$name' id='$id' ".JArrayHelper::toString($attributes)."
        	value='".htmlspecialchars($value, ENT_QUOTES)."' />
			";
        if ( $addTD ) {
            $return = ChronoContactHelperPlugin::wrapTD($return, $attribTD);
        }
        return $return;
    }

The value line was
value='".JText::_(htmlspecialchars($value, ENT_QUOTES))."' />
Max_admin 21 Jun, 2009
Great, I see it fixed here!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.