SimplePortal
Support => English Support => Topic started by: johncccccc on July 10, 2010, 12:48:31 PM
-
Well, In the BBC block settings I have 3 text forms for 1 block, weird.
I could have sworn that when I 1st went to edit their was only 1, then I previewed now their are 3, however, I may have just missed it the 1st time.
(http://i27.tinypic.com/2ujjpco.png)
I could probably track this down myself and fix it, but I do not have a lot of time, Where is the editor coded?
-
Refer to the 'sportal_admin_block_edit' function from the 'PortalAdminBlocks.php' file, for the source code.
Refer to the 'template_block_edit' function from the "PortalAdminBlocks.template.php" file, for the template.
-
Refer to the 'sportal_admin_block_edit' function from the 'PortalAdminBlocks.php' file, for the source code.
Refer to the 'template_block_edit' function from the "PortalAdminBlocks.template.php" file, for the template.
OK this is weird, I have completely replace those files with new ones, and the problem still occurs....
May I add this is only happening on BBC code blocks, not for anything else like custom HTML/PHP AFAIK
-
Does is happen for every custom bbc block that you create?
-
Does is happen for every custom bbc block that you create?
Yes.
Upon creating a new block (bbc) it has 3 editors.
Some useful information:
I was on SMF 2 RC1.2, and I kept the database tables from old setup.
When I edit all 3 editors the same the data still saves, if one is different they fail to save.
-
A shameless bump...
:P
-
Can you attach the HTML for that?
Is create_control_richedit called once or three times?
Are all the buttons that should be between "Custom BBC" and the textarea really gone or just hidden?
Does each textarea have the same name (that's a big no-no!)
Are there any HTML errors?
-
The HTML (From Source) is as follows
<label for="bbc_content">Custom BBC:</label>
</dt>
<dd>
</dd>
</dl>
<div id="sp_rich_editor">
<div id="sp_rich_bbc">
<div>
<div>
<textarea class="editor" name="bbc_content" id="bbc_content" rows="12" cols="60" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="1" style="width: 95%; height: 200px;">
{custom BBC is here}
</textarea>
</div>
<div id="bbc_content_resizer" style="display: none; width: 95%; padding: 0pt 2px;" class="richedit_resize"></div>
</div>
<input name="bbc_content_mode" id="bbc_content_mode" value="0" type="hidden">
<script type="text/javascript"><!-- // --><![CDATA[
var oSmileyBox_bbc_content = new smc_SmileyBox({
sUniqueId: 'smileyBox_bbc_content',
sContainerDiv: 'bbc',
sClickHandler: 'oEditorHandle_bbc_content.insertSmiley',
oSmileyLocations: {
postform: [
[
{
sCode: ':)',
sSrc: 'http://www.myforum.com/Smileys/default/smiley.gif',
sDescription: 'Smiley'
},
{
sCode: ';)',
sSrc: 'http://www.myforum.com/Smileys/default/wink.gif',
sDescription: 'Wink'
},
{
sCode: ':D',
sSrc: 'http://www.myforum.com/Smileys/default/cheesy.gif',
sDescription: 'Cheesy'
},
{
sCode: ';D',
sSrc: 'http://www.myforum.com/Smileys/default/grin.gif',
sDescription: 'Grin'
},
{
sCode: '>:(',
sSrc: 'http://www.myforum.com/Smileys/default/angry.gif',
sDescription: 'Angry'
},
{
sCode: ':(',
sSrc: 'http://www.myforum.com/Smileys/default/sad.gif',
sDescription: 'Sad'
},
{
sCode: ':o',
sSrc: 'http://www.myforum.com/Smileys/default/shocked.gif',
sDescription: 'Shocked'
},
{
sCode: '8)',
sSrc: 'http://www.myforum.com/Smileys/default/cool.gif',
sDescription: 'Cool'
},
{
sCode: '???',
sSrc: 'http://www.myforum.com/Smileys/default/huh.gif',
sDescription: 'Huh?'
},
{
sCode: '8-)',
sSrc: 'http://www.myforum.com/Smileys/default/rolleyes.gif',
sDescription: 'Roll Eyes'
},
{
sCode: ':P',
sSrc: 'http://www.myforum.com/Smileys/default/tongue.gif',
sDescription: 'Tongue'
},
{
sCode: ':-[',
sSrc: 'http://www.myforum.com/Smileys/default/embarrassed.gif',
sDescription: 'Embarrassed'
},
{
sCode: ':-X',
sSrc: 'http://www.myforum.com/Smileys/default/lipsrsealed.gif',
sDescription: 'Lips Sealed'
},
{
sCode: ':-\\',
sSrc: 'http://www.myforum.com/Smileys/default/undecided.gif',
sDescription: 'Undecided'
},
{
sCode: ':-*',
sSrc: 'http://www.myforum.com/Smileys/default/kiss.gif',
sDescription: 'Kiss'
},
{
sCode: ':\'(',
sSrc: 'http://www.myforum.com/Smileys/default/cry.gif',
sDescription: 'Cry'
},
{
sCode: '>:D',
sSrc: 'http://www.myforum.com/Smileys/default/evil.gif',
sDescription: 'Evil'
},
{
sCode: ':GIYF:',
sSrc: 'http://www.myforum.com/Smileys/default/GoogleFriend.gif',
sDescription: 'Google is you friend'
},
{
sCode: ':muaha:',
sSrc: 'http://www.myforum.com/Smileys/default/hahaha.gif',
sDescription: 'Muahahaha'
},
{
sCode: ':LOL:',
sSrc: 'http://www.myforum.com/Smileys/default/LOL_63.gif',
sDescription: 'LOL sign'
},
{
sCode: ':NT:',
sSrc: 'http://www.myforum.com/Smileys/default/NICE_THREAD.gif',
sDescription: 'Nice Thread Sign'
},
{
sCode: ':hahahaha:',
sSrc: 'http://www.myforum.com/Smileys/default/tongue0011.gif',
sDescription: 'Haa Haa ha ha haa'
},
{
sCode: ':Agreed:',
sSrc: 'http://www.myforum.com/Smileys/default/agreed.gif',
sDescription: 'Agreed'
},
{
sCode: ':thumbdown:',
sSrc: 'http://www.myforum.com/Smileys/default/27ycs1y.png',
sDescription: 'Thumbs Down'
},
{
sCode: '"highfive:',
sSrc: 'http://www.myforum.com/Smileys/default/2lrsxv.gif',
sDescription: 'High Five'
},
{
sCode: ':welcome:',
sSrc: 'http://www.myforum.com/Smileys/default/2zzrled.gif',
sDescription: 'Welcome!'
},
{
sCode: ':getout:',
sSrc: 'http://www.myforum.com/Smileys/default/34zzjp1.gif',
sDescription: 'Get Out!'
},
{
sCode: ':clap1:',
sSrc: 'http://www.myforum.com/Smileys/default/63bsleb.gif',
sDescription: 'Clapping'
},
{
sCode: ':pinkcheek:',
sSrc: 'http://www.myforum.com/Smileys/default/6fxs9s.png',
sDescription: 'Sleep pink cheeks'
},
{
sCode: ':iws1:',
sSrc: 'http://www.myforum.com/Smileys/default/imwithstupid.gif',
sDescription: 'Im With Stupid'
},
{
sCode: ':oops:',
sSrc: 'http://www.myforum.com/Smileys/default/oops.gif',
sDescription: 'ooops'
},
{
sCode: ':SPAM:',
sSrc: 'http://www.myforum.com/Smileys/default/spam.gif',
sDescription: 'Spam!!'
},
{
sCode: ':thx1:',
sSrc: 'http://www.myforum.com/Smileys/default/thanks.gif',
sDescription: 'Thanks!'
}
]
],
popup: [
[
{
sCode: ':censored:',
sSrc: 'http://www.myforum.com/Smileys/default/CENSORED.gif',
sDescription: 'Censored'
},
{
sCode: ':PartY1:',
sSrc: 'http://www.myforum.com/Smileys/default/party0019.gif',
sDescription: 'Wavey party'
},
{
sCode: ':myforum:',
sSrc: 'http://www.myforum.com/Smileys/default/477310001234474785[1].gif',
sDescription: 'myforum Rocks'
},
{
sCode: ':ThanksAlot:',
sSrc: 'http://www.myforum.com/Smileys/default/490124001234474887[1].gif',
sDescription: 'Thanks Alot'
},
{
sCode: ':banned2:',
sSrc: 'http://www.myforum.com/Smileys/default/banned2.gif',
sDescription: 'Your Banned!!!'
}
]
]
},
sSmileyBoxTemplate: '\n\t\t\t\t\t\t%smileyRows% %moreSmileys%\n\t\t\t\t\t',
sSmileyRowTemplate: '\n\t\t\t\t\t\t<div>%smileyRow%<' + '/div>\n\t\t\t\t\t',
sSmileyTemplate: '\n\t\t\t\t\t\t<img src="%smileySource%" align="bottom" alt="%smileyDescri' +'ption%" title="%smileyDescri' +'ption%" id="%smileyId%" />\n\t\t\t\t\t',
sMoreSmileysTemplate: '\n\t\t\t\t\t\t<a hr' + 'ef="#" id="%moreSmileysId%">[more]<' + '/a>\n\t\t\t\t\t',
sMoreSmileysLinkId: 'moreSmileys_bbc_content',
sMoreSmileysPopupTemplate: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n\t\t\t\t\t\t<html>\n\t\t\t\t\t\t\t<head>\n\t\t\t\t\t\t\t\t<title>Additional smileys<' + '/title>\n\t\t\t\t\t\t\t\t<link rel="stylesheet" type="text/css" href="http://www.myforum.com/Themes/myforum/css/index.css?rc3" />\n\t\t\t\t\t\t\t<' + '/head>\n\t\t\t\t\t\t\t<body id="help_popup">\n\t\t\t\t\t\t\t\t<div class="padding windowbg">\n\t\t\t\t\t\t\t\t\t<h3 class="catbg"><span class="left"><' + '/span>\n\t\t\t\t\t\t\t\t\t\tPick a smiley\n\t\t\t\t\t\t\t\t\t<' + '/h3>\n\t\t\t\t\t\t\t\t\t<div class="padding">\n\t\t\t\t\t\t\t\t\t\t%smileyRows%\n\t\t\t\t\t\t\t\t\t<' + '/div>\n\t\t\t\t\t\t\t\t\t<div class="smalltext centertext">\n\t\t\t\t\t\t\t\t\t\t<a hr' + 'ef="#" id="%moreSmileysCloseLinkId%">Close Window<' + '/a>\n\t\t\t\t\t\t\t\t\t<' + '/div>\n\t\t\t\t\t\t\t\t<' + '/div>\n\t\t\t\t\t\t\t<' + '/body>\n\t\t\t\t\t\t<' + '/html>'
});
var oEditorHandle_bbc_content = new smc_Editor({
sSessionId: '92136b8470018fbff22da6219cd3cb9f',
sSessionVar: 'eb815f3',
sFormId: 'sp_block',
sUniqueId: 'bbc_content',
bWysiwyg: false,
sText: '',
sEditWidth: '95%',
sEditHeight: '200px',
bRichEditOff: false,
oSmileyBox: oSmileyBox_bbc_content,
oBBCBox: null
});
smf_editorArray[smf_editorArray.length] = oEditorHandle_bbc_content;
// ]]></script>
</div>
<div id="sp_rich_smileys">
<div>
<div>
<textarea class="editor" name="bbc_content" id="bbc_content" rows="12" cols="60" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="2" style="width: 95%; height: 200px;">
{Custom BBC again}
</textarea>
</div>
<div id="bbc_content_resizer" style="display: none; width: 95%; padding: 0pt 2px;" class="richedit_resize"></div>
</div>
<input name="bbc_content_mode" id="bbc_content_mode" value="0" type="hidden">
<script type="text/javascript"><!-- // --><![CDATA[
var oSmileyBox_bbc_content = new smc_SmileyBox({
sUniqueId: 'smileyBox_bbc_content',
sContainerDiv: 'smileys',
sClickHandler: 'oEditorHandle_bbc_content.insertSmiley',
oSmileyLocations: {
postform: [
[
{
sCode: ':)',
sSrc: 'http://www.myforum.com/Smileys/default/smiley.gif',
sDescription: 'Smiley'
},
{
sCode: ';)',
sSrc: 'http://www.myforum.com/Smileys/default/wink.gif',
sDescription: 'Wink'
},
{
sCode: ':D',
sSrc: 'http://www.myforum.com/Smileys/default/cheesy.gif',
sDescription: 'Cheesy'
},
{
sCode: ';D',
sSrc: 'http://www.myforum.com/Smileys/default/grin.gif',
sDescription: 'Grin'
},
{
sCode: '>:(',
sSrc: 'http://www.myforum.com/Smileys/default/angry.gif',
sDescription: 'Angry'
},
{
sCode: ':(',
sSrc: 'http://www.myforum.com/Smileys/default/sad.gif',
sDescription: 'Sad'
},
{
sCode: ':o',
sSrc: 'http://www.myforum.com/Smileys/default/shocked.gif',
sDescription: 'Shocked'
},
{
sCode: '8)',
sSrc: 'http://www.myforum.com/Smileys/default/cool.gif',
sDescription: 'Cool'
},
{
sCode: '???',
sSrc: 'http://www.myforum.com/Smileys/default/huh.gif',
sDescription: 'Huh?'
},
{
sCode: '8-)',
sSrc: 'http://www.myforum.com/Smileys/default/rolleyes.gif',
sDescription: 'Roll Eyes'
},
{
sCode: ':P',
sSrc: 'http://www.myforum.com/Smileys/default/tongue.gif',
sDescription: 'Tongue'
},
{
sCode: ':-[',
sSrc: 'http://www.myforum.com/Smileys/default/embarrassed.gif',
sDescription: 'Embarrassed'
},
{
sCode: ':-X',
sSrc: 'http://www.myforum.com/Smileys/default/lipsrsealed.gif',
sDescription: 'Lips Sealed'
},
{
sCode: ':-\\',
sSrc: 'http://www.myforum.com/Smileys/default/undecided.gif',
sDescription: 'Undecided'
},
{
sCode: ':-*',
sSrc: 'http://www.myforum.com/Smileys/default/kiss.gif',
sDescription: 'Kiss'
},
{
sCode: ':\'(',
sSrc: 'http://www.myforum.com/Smileys/default/cry.gif',
sDescription: 'Cry'
},
{
sCode: '>:D',
sSrc: 'http://www.myforum.com/Smileys/default/evil.gif',
sDescription: 'Evil'
},
{
sCode: ':GIYF:',
sSrc: 'http://www.myforum.com/Smileys/default/GoogleFriend.gif',
sDescription: 'Google is you friend'
},
{
sCode: ':muaha:',
sSrc: 'http://www.myforum.com/Smileys/default/hahaha.gif',
sDescription: 'Muahahaha'
},
{
sCode: ':LOL:',
sSrc: 'http://www.myforum.com/Smileys/default/LOL_63.gif',
sDescription: 'LOL sign'
},
{
sCode: ':NT:',
sSrc: 'http://www.myforum.com/Smileys/default/NICE_THREAD.gif',
sDescription: 'Nice Thread Sign'
},
{
sCode: ':hahahaha:',
sSrc: 'http://www.myforum.com/Smileys/default/tongue0011.gif',
sDescription: 'Haa Haa ha ha haa'
},
{
sCode: ':Agreed:',
sSrc: 'http://www.myforum.com/Smileys/default/agreed.gif',
sDescription: 'Agreed'
},
{
sCode: ':thumbdown:',
sSrc: 'http://www.myforum.com/Smileys/default/27ycs1y.png',
sDescription: 'Thumbs Down'
},
{
sCode: '"highfive:',
sSrc: 'http://www.myforum.com/Smileys/default/2lrsxv.gif',
sDescription: 'High Five'
},
{
sCode: ':welcome:',
sSrc: 'http://www.myforum.com/Smileys/default/2zzrled.gif',
sDescription: 'Welcome!'
},
{
sCode: ':getout:',
sSrc: 'http://www.myforum.com/Smileys/default/34zzjp1.gif',
sDescription: 'Get Out!'
},
{
sCode: ':clap1:',
sSrc: 'http://www.myforum.com/Smileys/default/63bsleb.gif',
sDescription: 'Clapping'
},
{
sCode: ':pinkcheek:',
sSrc: 'http://www.myforum.com/Smileys/default/6fxs9s.png',
sDescription: 'Sleep pink cheeks'
},
{
sCode: ':iws1:',
sSrc: 'http://www.myforum.com/Smileys/default/imwithstupid.gif',
sDescription: 'Im With Stupid'
},
{
sCode: ':oops:',
sSrc: 'http://www.myforum.com/Smileys/default/oops.gif',
sDescription: 'ooops'
},
{
sCode: ':SPAM:',
sSrc: 'http://www.myforum.com/Smileys/default/spam.gif',
sDescription: 'Spam!!'
},
{
sCode: ':thx1:',
sSrc: 'http://www.myforum.com/Smileys/default/thanks.gif',
sDescription: 'Thanks!'
}
]
],
popup: [
[
{
sCode: ':censored:',
sSrc: 'http://www.myforum.com/Smileys/default/CENSORED.gif',
sDescription: 'Censored'
},
{
sCode: ':PartY1:',
sSrc: 'http://www.myforum.com/Smileys/default/party0019.gif',
sDescription: 'Wavey party'
},
{
sCode: ':myforum:',
sSrc: 'http://www.myforum.com/Smileys/default/477310001234474785[1].gif',
sDescription: 'myforum Rocks'
},
{
sCode: ':ThanksAlot:',
sSrc: 'http://www.myforum.com/Smileys/default/490124001234474887[1].gif',
sDescription: 'Thanks Alot'
},
{
sCode: ':banned2:',
sSrc: 'http://www.myforum.com/Smileys/default/banned2.gif',
sDescription: 'Your Banned!!!'
}
]
]
},
sSmileyBoxTemplate: '\n\t\t\t\t\t\t%smileyRows% %moreSmileys%\n\t\t\t\t\t',
sSmileyRowTemplate: '\n\t\t\t\t\t\t<div>%smileyRow%<' + '/div>\n\t\t\t\t\t',
sSmileyTemplate: '\n\t\t\t\t\t\t<img src="%smileySource%" align="bottom" alt="%smileyDescri' +'ption%" title="%smileyDescri' +'ption%" id="%smileyId%" />\n\t\t\t\t\t',
sMoreSmileysTemplate: '\n\t\t\t\t\t\t<a hr' + 'ef="#" id="%moreSmileysId%">[more]<' + '/a>\n\t\t\t\t\t',
sMoreSmileysLinkId: 'moreSmileys_bbc_content',
sMoreSmileysPopupTemplate: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n\t\t\t\t\t\t<html>\n\t\t\t\t\t\t\t<head>\n\t\t\t\t\t\t\t\t<title>Additional smileys<' + '/title>\n\t\t\t\t\t\t\t\t<link rel="stylesheet" type="text/css" href="http://www.myforum.com/Themes/myforum/css/index.css?rc3" />\n\t\t\t\t\t\t\t<' + '/head>\n\t\t\t\t\t\t\t<body id="help_popup">\n\t\t\t\t\t\t\t\t<div class="padding windowbg">\n\t\t\t\t\t\t\t\t\t<h3 class="catbg"><span class="left"><' + '/span>\n\t\t\t\t\t\t\t\t\t\tPick a smiley\n\t\t\t\t\t\t\t\t\t<' + '/h3>\n\t\t\t\t\t\t\t\t\t<div class="padding">\n\t\t\t\t\t\t\t\t\t\t%smileyRows%\n\t\t\t\t\t\t\t\t\t<' + '/div>\n\t\t\t\t\t\t\t\t\t<div class="smalltext centertext">\n\t\t\t\t\t\t\t\t\t\t<a hr' + 'ef="#" id="%moreSmileysCloseLinkId%">Close Window<' + '/a>\n\t\t\t\t\t\t\t\t\t<' + '/div>\n\t\t\t\t\t\t\t\t<' + '/div>\n\t\t\t\t\t\t\t<' + '/body>\n\t\t\t\t\t\t<' + '/html>'
});
var oEditorHandle_bbc_content = new smc_Editor({
sSessionId: '92136b8470018fbff22da6219cd3cb9f',
sSessionVar: 'eb815f3',
sFormId: 'sp_block',
sUniqueId: 'bbc_content',
bWysiwyg: false,
sText: '',
sEditWidth: '95%',
sEditHeight: '200px',
bRichEditOff: false,
oSmileyBox: oSmileyBox_bbc_content,
oBBCBox: null
});
smf_editorArray[smf_editorArray.length] = oEditorHandle_bbc_content;
// ]]></script>
</div>
<div>
<div>
<textarea class="editor" name="bbc_content" id="bbc_content" rows="12" cols="60" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="3" style="width: 95%; height: 200px;">
{custom bbc again}
Some more code below, the same as before then the rest of the page
I had to deleted most of the bottom since it exceded 20,000 characters
Thats the entire page, Their is some custom coding at the end, its for some adbrite ads, note these were placed here after the 3 block issue.
Also, I can see the rich editor been called in the Source, the page remains looking like I posted in the 1st post here.
-
Can you save the entire HTML to a file and attach that file?
It may be time to do some brute-force debugging to figure out where the problem happens.
It could take a while....
-
I have a little hunch here, while I wait to create that HTML file..
It appears to be trying to load the rich editor but failing,
Which file is the " create_control_richedit " function in?
I can take a look :)
Thanks.
-
Here's how I found it, on a PC.
(cd to the $sourcedir)
find /i /n "function create_control_richedit" *.php | more
-
Here's how I found it, on a PC.
(cd to the $sourcedir)
find /i /n "function create_control_richedit" *.php | more
I will just use search in files to find function "create_control_richedit" lol
I have the search within files on my PHP editor, no need for command :)
-
Well -- there you go.
Which php editor do you use?
-
Well -- there you go.
Which php editor do you use?
Nusphere PhpED, pretty nice editor, works very well, I like it because it detects parse errors while editing, so before you even save the file, you'll know if your edits will cause a parse error.
-
Are you still having this problem?
It just seems so strange...
-
Another user is reporting the same problem. Can you list all mods?
http://simpleportal.net/index.php?topic=6597.msg38017#msg38017 (http://simpleportal.net/index.php?topic=6597.msg38017#msg38017)