Version 7.1.4
I am trying to figure out where Dolphin is getting the TinyMCE toolbars for the replies to comments. It is not the same toolbar that is on the profile comment box. It is not in the init of /templates/base/scripts/BxBaseEditorTinymce.php. Where in the blazes is this toolbar coming from? Is there one hidden somewhere outside of /templates/base/scripts/BxBaseEditorTinymce.php that is being loaded? I have looked at BxBaseCmtsView.php and BxDolCmts.js. I am guessing the reply toolbar is added by the javascript but I don't see how it is loading that particular toolbar set.
Geeks, making the world a better place |
This is in BxBaseCmtsView.php are you sure this doesn't call that ?
function getComment($iCmtId, $sType = 'new') { $r = $this->getCommentRow ($iCmtId);
$sRet = ''; if($r['cmt_rated'] == -1 || $r['cmt_rate'] < $this->_aSystem['viewing_threshold']) { $sRet .= '<li id="cmt' . $r['cmt_id'] . '-hidden" class="cmt-replacement">'; $sRet .= _t('_hidden_comment', $r['cmt_author_name']) . ' ' . ($r['cmt_replies'] > 0 ? _t('_Show N replies', $r['cmt_replies']) . '. ' : '') . '<a href="javascript:void(0)" onclick="javascript:' . $this->_sJsObjName . '.showReplacement(' . $r['cmt_id'] . ')">' . _t('_show_replacement') . '</a>.'; if($this->isRatable()) $sRet .= $this->_getRateBox($r); $sRet .= '</li>';
$sClass = ' cmt-hidden'; }
$sRet .= '<li id="cmt' . $r['cmt_id'] . '" class="cmt cmt-mine cmt-just-posted' . $sClass . '">'; $sRet .= '<div class="cmt-cont">';
if($this->isRatable()) $sRet .= $this->_getRateBox($r);
$sRet .= $this->_getAuthorIcon($r); $sRet .= '<table class="cmt-balloon bx-def-round-corners-with-border bx-def-shadow">'; $sRet .= $this->_getCommentHeadBox($r); $sRet .= '<tr class="cmt-cont">' . $this->_getCommentBodyBox($r) . '</tr>'; $sRet .= $this->_getActionsBox ($r, true); $sRet .= '</table>'; return $sRet;
|
No, I don't see where that code is adding the tinyMCE editor. Geeks, making the world a better place |
This has you worrying over it for about 3 years now. My opinions expressed on this site, in no way represent those of Boonex or Boonex employees. |
is the comments even using the TinyMce? I ask cause when using an element inspector, the code for the comments is different than fields that are tinyMce. The TinyMce fields are in iframes, whereas the comments field is not.
Just curious - do you have another textarea on the page with the comments block? The reason I ask - I noticed that on a module that I am working on, in which I have a custom tinyMce textarea - it adds the toolbar to the comments field. But - this is because on my page I have code that sets all textareas to tinyMce. I will find my code and post for you, and hopefully it can be reversed engineered to help resolve your issue.
In my module, I have a block template called block_progress_note_input.html. On this page, I have this:
<script type="text/javascript" src="plugins/tiny_mce/tiny_mce.js"></script> <script type="text/javascript"> tinyMCE.init({ mode : "textareas", }); </script>
which is what is making my comments field come with the toolbar like the other textarea fields.
caredesign.net |
This has you worrying over it for about 3 years now.
No HL, this is a different issue; this is on 7.1.4. I assume that all TinyMCE instances are loaded using one of the three init in /templates/base/scripts/BxBaseEditorTinyMCE.php. However, when you click on the reply link to a profile comments, the toolbar that loads is not one of the three in that file. The reply box is not like the static profile comment box, it is added using javascript when one clicks on the reply link. It is evident that it is loading perhaps an initi located somewhere else. If I know where, I can simply edit that toolbar set. I looked at the javascript file but did not really see anything that could help me.
Geeks, making the world a better place |
@Professor
So the toolbar set that I am seeing loaded that is not part of the Dolphin init could be a base set that TinyMCE is loading from the TinyMCE plugin folder? Yes, the reply box is created dynamically using javascript; it is not a coded textarea. I will examine the plugin directory. The documentation at TinyMCE.com is horrible.
Geeks, making the world a better place |
Do you have another textarea on the page that is using tinyMCE, if so, that is probably why your comments has the toolbar, because normally, the comments is not a tinyMCE field? caredesign.net |
Do you have another textarea on the page that is using tinyMCE, if so, that is probably why your comments has the toolbar, because normally, the comments is not a tinyMCE field?
No, this is the profile comments block that appears on the profile page. We are not using the timeline. We have HTML and TinyMCE turned on for Profile Comments. The Profile Comment box is a normal part of the page.
Everything is working as it should work. The strange thing is that when you click on "reply" to reply to a comment, the comment box that is added to the page has a different tinyMCE toolbar set that is NOT in BxBaseEditorTinyMCE.php.
After reading your comment, I am thinking that TinyMCE will load in a default toolbar set stored in TinyMCE if you don't specify a toolbar set. I think when the javascript code adds that comment box, it does not specify one of the stored TinyMCE init located in BxBaseEditorTinymce.php; since one is not specified, it loads the default.
Geeks, making the world a better place |
I tested this on another site and my conclusion now is that I have broken something somewhere. Geeks, making the world a better place |
can you post a screenshot of your comments block please, mine does not have a tinyMCE toolbar, as it is not a tinyMCE field - at least from my understanding. If you have a toolbar, then it is something else that has made all textareas on that page into a tinyMCE. So, do you have any other tinyMCE fields on the page?
EDIT:
I am adding a screenshot of my comments and reply boxes.
caredesign.net |
can you post a screenshot of your comments block please, mine does not have a tinyMCE toolbar, as it is not a tinyMCE field - at least from my understanding. If you have a toolbar, then it is something else that has made all textareas on that page into a tinyMCE. So, do you have any other tinyMCE fields on the page?
I think I am confusing you with my explanation. When you add comment boxes to Dolphin pages, you can go into the Admin panel under General and enable "Use WYSIWYG for comment boxes". These are not custom textarea boxes.
By the way, with custom forms using Dolphin 7 form builder code, you indicate what toolbar to load by using 'HTML' => 1 (or 2, or 3). With profile comments, they coded in to use the $CONF_MINI which is tinymce init 2.
I am going to send you a PM
Geeks, making the world a better place |
ROFLMFAOP - ain't I the idiot. I never checked that box to make comments tinyMCE's so never even realized that. caredesign.net |
Now that I understand what you are referring to, check this out: BxDolCmts.js around line 641:
//--- Fill in data array ---// if(this.type == 'textarea' && $this._iGlobAllowHtml == 1 && typeof tinyMCE != 'undefined') { var edT = tinyMCE.get(this.id); if (edT) { var tinyValueT = edT.getContent(); oData[this.name] = tinyValueT; } } else if(this.type == 'radio') { if(this.checked) oData[this.name] = this.value; } else oData[this.name] = this.value; }
This should hopefully start you in the proper direction.
caredesign.net |