Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [ADDON] TinyMCE + iBrowserEXT (sNews 1.4)  (Read 4310 times)


  • Newbie
  • *
  • Karma: 0
  • Posts: 15
[ADDON] TinyMCE + iBrowserEXT (sNews 1.4)
« on: June 17, 2006, 02:13:54 pm »

EDITED (2006-06-21 GMT+3): 1. Deleted 'fullpage' plugin loading (+button) from tinyMCE.init in new snews.php code. (worked but messing things, ...making xtra, "double head tags" gives validation errors etc).
2. Edited tinyMCE javascript calling to fix validation errors

bit long post...;)

I installed tinymce some months ago (in help with Bramsyuur's instructions found here) I also installed iBrowser at same time - they worked together fine with sNews.

I use mac (in this case with Firefox and everything, editing and browsing + browsing with safari goes ok). When I then tried to browse my site with win-xp-IE(6?) it gave an error message '...operation aborted'.

Now I mean when browsing the public basic site index, not in txt-editing formule and logged in.

Tried to fix this for hours+hours. Site shows with TinyMCE itself, but didn't show with ibrowser plugin called (meaning when browsing basic sites with winIE ...70+% people use that).
(BTW when calling ibrowser straight it shows up in winIE...)

Q: Have You managed to get snews/tinymce+ibowser (original) working(and sites browsing) in winIE?

And now my beef:
Found an ibrowser hack (calling EXT here, done in older vers but working nice) in sourceforge, it suites well with last tinymce vers and they both together with snews.

This ibrowserEXT is more robust than the last original but it does the thing(s) (uploads, aligns, previews...).
Screenshot can be seen here

You can load tinymce (latest):

put it in same folder with snews (or root if snews there)

and that ibrowserEXT from me:

unzip & put ibowser folder in your tinymce plugins folder

in ibrowser folder > config.php edit paths (lines 41,42 and 50,51) to fit your album structure (make path backwards to your albums - my snews is in root, seen below).

---------ibrowser config.php code begins----------
$tinyMCE_imglibs = array(
      array (
                text => 'Album Upload',
                value => '../../../../../upload/',
              url => '',
              create_dir => true,
              upload => true,
              delete => true

        array (
                text => 'Album Static',
                value => '../../../../../static/',
              url => '',
              create_dir => false,
              upload => false,
              delete => false
------------ibrowser config.php code ends--------------

CHMOD your albums 777. above the first album is uploadable, second is static (in my constructions - you can add albums etc to fit your needs.
You must have full URL due snews style when adding news (URL/new)

I made  changes below in snews.php (lines 400+ below). In original:

--------snews.php code begins------
// If javascript is on echos javascript functions under <br />function javascript_headers() {<br />if_javascript_on('<br /><script type="text/javascript"><br />//<![CDATA[<br />function makesef() {<br />text_from = document.getElementById(\'article_title\');<br />text_to = document.getElementById(\'article_sef\');<br />str = text_from.value;<br />ex = /\$|,|@|#|~|`|\%|\*|\^|\.|\&|\(|\)|\+|\=|\[|\]|\[|\}|\{|\;|\:|\'|\"|\<|\>|\?|\||\\\\|\!|\$|\//g;<br />str = str.replace(ex, "");<br />ex = /^\s+|\s+$/g;<br />str = str.replace(ex, "");<br />ex = /\s+/g;<br />str = str.replace(ex, "_");<br />str = str.toLowerCase();<br />text_to.value = str;<br />};<br />//]]><br /></script>');<br />};<br />---------snews.php code ends------<br /><br />changed to (called several plugins incl ibrowser - delete plugin names you don't want + buttons with same name):<br /><br />--------changed snews.php code begins--------<br />// If javascript is on echos javascript functions under <title/><br />function javascript_headers() {<br />        if_javascript_on('<br /><script type="text/javascript"><br />//<![CDATA[<br />function makesef() {<br />text_from = document.getElementById(\'article_title\');<br />text_to = document.getElementById(\'article_sef\');<br />str = text_from.value;<br />ex = /\$|,|@|#|~|`|\%|\*|\^|\.|\&|\(|\)|\+|\=|\[|\]|\[|\}|\{|\;|\:|\'|\"|\<|\>|\?|\||\\\\|\!|\$|\//g;<br />str = str.replace(ex, "");<br />ex = /^\s+|\s+$/g;<br />str = str.replace(ex, "");<br />ex = /\s+/g;<br />str = str.replace(ex, "_");<br />str = str.toLowerCase();<br />text_to.value = str;<br />};<br />//]]><br /></script><br /><script type="text/javascript" src="/tinymce/jscripts/tiny_mce/tiny_mce.js"></script><br /><script type="text/javascript"><br />tinyMCE.init({<br />plugins : "inlinepopups,advlink,fullscreen,advimage,advhr,insertdatetime,zoom,flash,ibrowser,preview",<br />mode : "textareas",<br />theme : "advanced",<br />safari_warning : false,<br />editor_selector : "mceEditor",<br />entities : "",<br />language : "en",<br />theme_advanced_toolbar_location : "top",<br />theme_advanced_toolbar_align : "left",<br />theme_advanced_buttons1_add : " advhr,forecolor,backcolor,inlinepopups,advlink,flash,ibrowser",<br />theme_advanced_buttons2_add : "separator,fullscreen,zoom,preview",<br />theme_advanced_buttons3_add : "separator,insertdate,inserttime,separator,fontselect,fontsizeselect",<br />width : "520",<br />height : "350"<br />});<br /></script>');<br />};<br />---------changed snews.php code ends-----<br /><br />I have that 'safari_warning' there (because without it safari gives messages). delete plugins & buttons you don't want/need and fix the width/height to fit your layout.<br />That 'fullscreen' plugin is nice when editing<br /><br />hope this is useful for somebody<br /><br />all good & sunshine<br />Matti (Helsinki, Finland)<br /><br />(in that ibrowserEXT there is possibility to make subdirectories, but it is difficult to use with snews structure ...paths, shlashes etc)</div> </div> </div> <div class="moderatorbar"> <div class="smalltext floatleft" id="modified_8871"> </div> <div class="smalltext largepadding floatright"> <img src="" alt="" border="0" /> Logged </div> </div> </div> </div> <div class="bordercolor"> <a id="msg17420"></a> <div class="clearfix topborder windowbg2 largepadding"> <div class="floatleft poster"> <h4><a href=";u=1397" title="View the profile of mininovax">mininovax</a></h4> <ul class="reset smalltext" id="msg_17420_extra_info"> <li>Newbie</li> <li><img src="" alt="*" /></li> <li class="margintop">Karma: 1</li> <li>Posts: 44</li> <li class="margintop"> <ul class="reset nolist"> <li><a href="" title="" target="_blank" class="new_win"><img src="" alt="" border="0" /></a></li> </ul> </li> </ul> </div> <div class="postarea"> <div class="flow_hidden"> <div class="keyinfo"> <div class="messageicon"><img src="" alt="" border="0" /></div> <h5 id="subject_17420"> <a href="" rel="nofollow">[ADDON] TinyMCE + iBrowserEXT (sNews 1.4)</a> </h5> <div class="smalltext">« <strong>Reply #1 on:</strong> November 25, 2006, 07:29:53 pm »</div> <div id="msg_17420_quick_mod"></div> </div> </div> <div class="post"> <hr class="hrcolor" width="100%" size="1" /> <div class="inner" id="msg_17420">the culprit to your error<br /><br />operation aborted is iBrowser<br /><br />If you remove the iBrowser from the javascript tinyMCE<br /><br />      tinyMCE.init({<br />         mode : "textareas",<br />         cleanup : false,<br />         language : "en",<br />         theme : "advanced",<br />         content_css : "../../css/style.css",<br />         plugins : "ibrowser",  // this is what you need to remove<br /><br />It works. But we need the ibrowser plugin .. so what to do? This error occurs with the most recent ibrowser and tinyMCE <br /><br />I used both your modifcation and the official version<br />i have reached the same conclusion with this, that there must be "going on" behind with tinyMCE. I basically am hinting that it is not in their interest that people develop this type of application when they are selling the "connector"<br /><br />A code "architecture modification" might be inorder, where the ibrowser function works as a link outsite of the tinyMCE application<br /><br />Just another way to look at it</div> </div> </div> <div class="moderatorbar"> <div class="smalltext floatleft" id="modified_17420"> </div> <div class="smalltext largepadding floatright"> <img src="" alt="" border="0" /> Logged </div> </div> </div> </div> </form> </div> <a id="lastPost"></a> <div class="clearfix marginbottom" id="postbuttons_lower"> <div class="nav floatright"> <div class="buttonlist"> <ul class="reset clearfix"> <li class="last"><a class="button_strip_print" href=";topic=1132.0" rel="new_win nofollow"><span>Print</span></a></li> </ul> </div></div> <div class="middletext floatleft">Pages: [<strong>1</strong>] </div> <div class="clear"><a href=";prev_next=prev#new">« previous</a> <a href=";prev_next=next#new">next »</a></div> </div> <ul class="linktree" id="linktree_lower"> <li> <a href=""><span>sNews Forum</span></a> > </li> <li> <a href=""><span>Previous sNews versions</span></a> > </li> <li> <a href=""><span>sNews 1.4 Final</span></a> > </li> <li> <a href=""><span>Mods and Addons</span></a> > </li> <li class="last"> <a href=""><span>[ADDON] TinyMCE + iBrowserEXT (sNews 1.4)</span></a> </li> </ul> <div id="moderationbuttons" class="clearfix"></div> <div class="tborder"> <div class="titlebg2" style="padding: 4px;" align="right" id="display_jump_to"> </div> </div><br /> <script type="text/javascript" src=""></script> <script type="text/javascript"><!-- // --><![CDATA[ if ('XMLHttpRequest' in window) { var oQuickModify = new QuickModify({ sScriptUrl: smf_scripturl, bShowModify: true, iTopicId: 1132, sTemplateBodyEdit: '\n\t\t\t\t<div id="quick_edit_body_container" style="width: 90%">\n\t\t\t\t\t<div id="error_box" style="padding: 4px;" class="error"><' + '/div>\n\t\t\t\t\t<textarea class="editor" name="message" rows="12" style="width: 100%; margin-bottom: 10px;" tabindex="1">%body%<' + '/textarea><br />\n\t\t\t\t\t<input type="hidden" name="fa61098e622" value="a44c732f270683b729d872f51595275e" />\n\t\t\t\t\t<input type="hidden" name="topic" value="1132" />\n\t\t\t\t\t<input type="hidden" name="msg" value="%msg_id%" />\n\t\t\t\t\t<div class="righttext">\n\t\t\t\t\t\t<input type="submit" name="post" value="Save" tabindex="2" onclick="return oQuickModify.modifySave(\'a44c732f270683b729d872f51595275e\', \'fa61098e622\');" accesskey="s" class="button_submit" />  <input type="submit" name="cancel" value="Cancel" tabindex="3" onclick="return oQuickModify.modifyCancel();" class="button_submit" />\n\t\t\t\t\t<' + '/div>\n\t\t\t\t<' + '/div>', sTemplateSubjectEdit: '<input type="text" style="width: 90%" name="subject" value="%subject%" size="80" maxlength="80" tabindex="4" class="input_text" />', sTemplateBodyNormal: '%body%', sTemplateSubjectNormal: '<a hr'+'ef="'+'?topic=1132.msg%msg_id%#msg%msg_id%" rel="nofollow">%subject%<' + '/a>', sTemplateTopSubject: 'Topic: %subject%  (Read 4310 times)', sErrorBorderStyle: '1px solid red' }); aJumpTo[aJumpTo.length] = new JumpTo({ sContainerId: "display_jump_to", sJumpToTemplate: "<label class=\"smalltext\" for=\"%select_id%\">Jump to:<" + "/label> %dropdown_list%", iCurBoardId: 10, iCurBoardChildLevel: 1, sCurBoardName: "Mods and Addons", sBoardChildLevelIndicator: "==", sBoardPrefix: "=> ", sCatSeparator: "-----------------------------", sCatPrefix: "", sGoButtonLabel: "go" }); aIconLists[aIconLists.length] = new IconList({ sBackReference: "aIconLists[" + aIconLists.length + "]", sIconIdPrefix: "msg_icon_", sScriptUrl: smf_scripturl, bShowModify: true, iBoardId: 10, iTopicId: 1132, sSessionId: "a44c732f270683b729d872f51595275e", sSessionVar: "fa61098e622", sLabelIconList: "Message Icon", sBoxBackground: "transparent", sBoxBackgroundHover: "#ffffff", iBoxBorderWidthHover: 1, sBoxBorderColorHover: "#adadad" , sContainerBackground: "#ffffff", sContainerBorder: "1px solid #adadad", sItemBorder: "1px solid #ffffff", sItemBorderHover: "1px dotted gray", sItemBackground: "transparent", sItemBackgroundHover: "#e0e0f0" }); } // ]]></script> <script type="text/javascript"><!-- // --><![CDATA[ var verificationpostHandle = new smfCaptcha(";vid=post;rand=ae1c81e504b45c5d0388754a26db6dcb", "post", 1); // ]]></script> </div> <div id="footerarea" class="headerpadding topmargin clearfix"> <ul class="reset smalltext"> <li class="copyright"> <span class="smalltext" style="display: inline; visibility: visible; font-family: Verdana, Arial, sans-serif;"><a href="" title="Simple Machines Forum" target="_blank" class="new_win">SMF 2.0.14</a> | <a href="" title="License" target="_blank" class="new_win">SMF © 2017</a>, <a href="" title="Simple Machines" target="_blank" class="new_win">Simple Machines</a> </span></li> <li><a id="button_xhtml" href="" target="_blank" class="new_win" title="Valid XHTML 1.0!"><span>XHTML</span></a></li> <li><a id="button_rss" href=";type=rss" class="new_win"><span>RSS</span></a></li> <li class="last"><a id="button_wap2" href="" class="new_win"><span>WAP2</span></a></li> </ul> </div> </div> </body></html>