ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Parse error: syntax error, unexpected T_STRING

rmesman 12 Feb, 2009
Hi,

I'm using chronoforms and chronoconnectivity (both latest versions) with Joomla 1.5.9.
The forms contains txtareas which are being edited using the Joomla editor. For frontend editing I'm using the following code to retrieve a text for editing:

<?php 
echo $editor->display("C_Reactie","{C_Reactie}","75%","100%", "55", "50", false );
?>

where {C-Recatie} is the DB-field which is retrieved form the DB for editing at the frontend.

The parse error exist when the text in field 'C_recatie' contains double quotes. When I change this to single quotes the error disappears.
A solution would then be to change the above code, by using single quotes, to

<?php 
echo $editor->display('C_Reactie','{C_Reactie}','75%','100%', '55', '50', false );
?>

but then the text-field may not contain any single quote.

Is there a way to change the code so any type of quotes can be used in the text-field and there will be no error when front-end editing? The problem does not occur using backend editing!

Thanks,
Robin
Max_admin 12 Feb, 2009
Hi Robin,

try this instead:
    <?php
    echo $editor->display('C_Reactie','<?php echo $row->C_Reactie; ?>','75%','100%', '55', '50', false );
    ?>

let me know, and pay attention to fields names, you mentioned its C-Recatie or C_Recatie

Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
rmesman 13 Feb, 2009
Hi Max,

Thanks for the suggestion but it doesn't work. I've used the changed code (and also changed all other double quotes to single quotes) but then no text is showing in the editor when you do frontend editing.
I've also tried all double quotes, but then again no text is showing in the editor.

Based on your suggestion I've used the following code:
<?php 
$Reactie = {C_Reactie};
echo $editor->display('C_Reactie','<?php echo $Reactie; ?>','75%','100%','55', '50', false );
?>
Then again the error (see below) occurs, and this is strange, because the text contains double quotes (") while this code is using single quotes (').

Error:
Parse error: syntax error, unexpected T_STRING in /home/icounsel/public_html/components/com_chronoconnectivity/chronoconnectivity.html.php(283) : eval()'d code on line 48

I've also used:
<?php 
$Reactie = echo $row->C_Reactie;
echo $editor->display('C_Reactie','<?php echo $Reactie; ?>','75%','100%','55', '50', false );
?>
Then this error is show:
Parse error: syntax error, unexpected T_ECHO in /home/icounsel/public_html/components/com_chronoconnectivity/chronoconnectivity.html.php(283) : eval()'d code on line 48

And:
<?php 
$Reactie = $row->C_Reactie;
echo $editor->display('C_Reactie','<?php $Reactie; ?>','75%','100%','55', '50', false );
?>
Then no error, but also no text is shown.

Any other suggestions?

Regards,
Robin
Max_admin 13 Feb, 2009
mmm, my mistake, please try this:

    <?php
    $Reactie = $row->C_Reactie;
    echo $editor->display('C_Reactie', $Reactie,'75%','100%','55', '50', false );
    ?>
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
rmesman 06 Mar, 2009
Hi Max,

Sorry for the late reply (busy with other websites 8) .
Anyway, many thanks for your feedback! This solutions seems to work!

~Robin
Max_admin 09 Mar, 2009
No problems, glad that made it!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com