$a='b'.$a.'c';
Posted: Wed Jul 29, 2009 12:29 pm
$a='b'.$a.'c';
says there is a syntax error.
Really?
says there is a syntax error.
Really?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
already defined.McInfo wrote:Is that the entire script?
Could it be a "Notice: Undefined variable"?
I think it might be an array of strings.McInfo wrote:Is the original $a really a string? To test, use var_dump().
PHP Manual: String OperatorsCode: Select all
var_dump($a); //$a='b'.$a.'c';
Code: Select all
/**
* Get the editor contents
*
* @param string The name of the editor control
*/
function getContent( $editor )
{
$this->_loadEditor();
$args['name'] = $editor;
$args['event'] = 'onGetContent';
$return = '';
$results[] = $this->_editor->update($args);
foreach ($results as $result) {
if (trim($result)) {
$return .= $result;
}
}
return $return;
}
/**
* No WYSIWYG Editor - get the editor content
*
* @param string The name of the editor
*/
function onGetContent( $editor ) {
$aaa = "document.getElementById( '$editor' ).value;\n";
// I NEED TO ADD SOME CODE HERE TO CHANGE \n to <BR />
return $aaa;
}
Yes, but a big one - Joomla.McInfo wrote:Is this part of an application package that can be downloaded somewhere?
The latest : 1.5.13McInfo wrote:What version of Joomla is it?
What is the full error message?says there is a syntax error.
In that case the operation you described would certainly be invalid. You can't cast an array into a string - either use something like implode() or manually concatenate the array parts together.I think it might be an array of strings.
Not sure I see your point. It's important to have separate paragraphs because articles may be say 1000 words+.McInfo wrote:kinabaloo wrote:Code: Select all
function onGetContent( $editor ) { $aaa = "document.getElementById( '$editor' ).value;\n"; // I NEED TO ADD SOME CODE HERE TO CHANGE \n to <BR /> return $aaa; }How are these two objectives related?kinabaloo wrote:I dont want an editor with fonts etc.
Thanks for your input. I'll try to work out a way to loop through the array or discover which element is the main editor text.pytrin wrote:What is the full error message?says there is a syntax error.In that case the operation you described would certainly be invalid. You can't cast an array into a string - either use something like implode() or manually concatenate the array parts together.I think it might be an array of strings.
The user will see line breaks when they edit and press enter. This should be preserved when the article is displayed. So either with <pre> or by changing \n to <br />McInfo wrote:kinabaloo wrote:Code: Select all
function onGetContent( $editor ) { $aaa = "document.getElementById( '$editor' ).value;\n"; // I NEED TO ADD SOME CODE HERE TO CHANGE \n to <BR /> return $aaa; }How are these two objectives related?kinabaloo wrote:I dont want an editor with fonts etc.
That might be ideal - if it preserves line breaks by converting them to <br />McInfo wrote:Is the real problem that you are trying to change the editor from thisto this?
I know that is right, but something has gone wrong with my Joomla. I have changed all the enables etc but the editor will not budge from NoeditorMcInfo wrote:First, put the function back the way it was:Next, go into Joomla's administration control panel.Code: Select all
function onGetContent( $editor ) { return "document.getElementById( '$editor' ).value;\n"; }
- On the menu bar, locate Extensions > Plugin Manager.
- In the list of plugins, locate "Editor - TinyMCE" and ensure that it is enabled (green checkmark).
- Click on the hyperlink labeled "Editor - TinyMCE".
- On the plugin edit page, under Plugin Parameters, change Functionality to "Simple".
- Click Save at the top of the page.
Tried that.McInfo wrote:How much of Joomla's source code have you modified?
Have you tried disabling all of the Editor plugins and re-enabling just the TinyMCE plugin?
Installed JCE editor and finally the editor is no longer stuck on noeditorMcInfo wrote:That setting is stored in the database. You are supposed to use the Joomla admin interface to make changes.kinabaloo wrote:What files do you know would affect which editor runs?