$a='b'.$a.'c';
Moderator: General Moderators
$a='b'.$a.'c';
$a='b'.$a.'c';
says there is a syntax error.
Really?
says there is a syntax error.
Really?
Re: $a='b'.$a.'c';
already defined.McInfo wrote:Is that the entire script?
Could it be a "Notice: Undefined variable"?
is this the correct way to comine the strings?
Re: $a='b'.$a.'c';
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';
I dont have a php editor system - i can just see 1 error in the browser, that's all.
Here's the code I am trying to modify:
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;
}
Re: $a='b'.$a.'c';
Yes, but a big one - Joomla.McInfo wrote:Is this part of an application package that can be downloaded somewhere?
None of the available editors allow entry of simple plain text. Well one does but it is just textarea and the line feeds are not changed to html breaks. So I am trying to modify the source (it is open source GPL).
But the form contains other fields too, such as title and category to store the text. I think all this is bundled into one array. Ideally I'd know which element of the array to do the replacements on.
Re: $a='b'.$a.'c';
The latest : 1.5.13McInfo wrote:What version of Joomla is it?
My site is at:
http://www.tji-java-ide.com/beijing
Everyone can publish, so to keep a consistent look, I dont want an editor with fonts etc.
Just very simple.
ps: I will be back in 10-15 mins ...
Re: $a='b'.$a.'c';
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.
Re: $a='b'.$a.'c';
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.
But the font, color etc will be a constant, decided by the site design rather than by authors.
Re: $a='b'.$a.'c';
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.
Re: $a='b'.$a.'c';
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.
Re: $a='b'.$a.'c';
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?
At the moment, I have a problem whereby I can't change the editor
Assuming I might fix that problem at some time, which editor is that second one?
Thanks so much for your help, btw.
Re: $a='b'.$a.'c';
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.
It is so frustrating.
Re: $a='b'.$a.'c';
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?
I just modied form.php to simplify it. article.php to set new article to 'pulished' status.
And a minor change in icon.php to fix something for an extension.
And vote.php to be able to display just the actual vote and not the add vote part when displayed not in full.
And some views to enable link of author to profile.
A couple language ini files.
What files do you know would affect which editor runs?
Re: $a='b'.$a.'c';
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?
So I don't need to learn php quite so quickly now
Thanks all you guys for your help !