TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 03, 2024, 05:17:44 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,178
  • Total Topics: 21,220
  • Online today: 106
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 46
  • Total: 47
  • @rjen

Alternative Article Editor

Started by KapaBG, February 13, 2008, 06:13:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

KapaBG

go to Administration Center/TinyPortal/Settings Use the WYSIWYG editor?:

  • No
  • yes, FCKeditor
  • yes, WhizzyWig
thats all  :'(

its very narrow, poor and tiranosaurus choice for cool articles and content  :tickedoff: and wisywig on other forum themes transforming to the [censored]ingFaq  :laugh:, because styles in this editors are fixing :coolsmiley: but my big intellectual power help to you in this case  O0 ahahaha

i found the brilliant inline html editor with great speed and cool size NicEdit - micro transparent whysiwig editor seems to special ready for TinyPortal. this is simple two files: one buttons gif 3kb and one jscript 30 kb. thats all! :buck2:

installation is simple:
make directory in forum root NicEditor and copy this two files (nicEditorIcons.gif and nicEdit.js). remember this  path for next using.

need make very easy changings in next files :
  • Themes/default/languages/TPortalAdmin.english.php
  • Themes/default/languages/TPortalAdmin.russian.php
  • Themes/default/languages/TPortalAdmin.russian-utf8.php
  • Sources/TPmodules.php
  • Sources/TPortalAdmin.php
  • Themes/default/TPmodules.template.php
  • Themes/default/TPortalAdmin.template.php
  • Themes/default/TPprofile.template.php

in langauage files need add one string
Themes/default/languages/TPortalAdmin.english.php
$txt['tp-myalteditor']='yes, My alternative editor';
Themes/default/languages/TPortalAdmin.russian.php
$txt['tp-myalteditor']='Мой альтернативный редактор';
Themes/default/languages/TPortalAdmin.russian-utf8.php
$txt['tp-myalteditor']='╨Ь╨╛╨╣ ╨░╨╗╤М╤В╨╡╤А╨╜╨░╤В╨╕╨▓╨╜╤Л╨╣ ╤А╨╡╨┤╨░╨║╤В╨╛╤А';

Themes/default/TPprofile.template.php
find <input name="tpwysiwyg" type="radio" value="0" ' , ($context['TPortal']['selected_member_choice'] =='0' || $context['TPortal']['selected_member_choice'] == '1') ? 'checked' : '' , '> '.$txt['tp-no'].'<br />
<input name="tpwysiwyg" type="radio" value="2" ' , $context['TPortal']['selected_member_choice'] =='2' ? 'checked' : '' , '> '.$txt['tp-fckeditor'].'<br />
<input name="tpwysiwyg" type="radio" value="3" ' , $context['TPortal']['selected_member_choice'] =='3' ? 'checked' : '' , '> '.$txt['tp-whizzyeditor'].'<br />
and add after <input name="tpwysiwyg" type="radio" value="4" ' , $context['TPortal']['selected_member_choice'] =='4' ? 'checked' : '' , '> '.$txt['tp-myalteditor'].'<br />


Themes/default/TPortalAdmin.template.php
find <input name="tp_use_wysiwyg" type="radio" value="0" ' , $context['TPortal']['use_wysiwyg']=='0' ? 'checked' : '' , '> '.$txt['tp-no'].'<br />
<input name="tp_use_wysiwyg" type="radio" value="2" ' , ($context['TPortal']['use_wysiwyg']=='2' || $context['TPortal']['use_wysiwyg']=='1') ? 'checked' : '' , '> '.$txt['tp-fckeditor'].'<br />
<input name="tp_use_wysiwyg" type="radio" value="3" ' , $context['TPortal']['use_wysiwyg']=='3' ? 'checked' : '' , '> '.$txt['tp-whizzyeditor'].'<br />
and add after <input name="tp_use_wysiwyg" type="radio" value="4" ' , $context['TPortal']['use_wysiwyg']=='4' ? 'checked' : '' , '> '.$txt['tp-myalteditor'].'<br />

Themes/default/TPmodules.template.php
find // tinyMCE
// FCKeditor
if($context['TPortal']['use_wysiwyg']>0 && $context['TPortal']['use_wysiwyg']<4 && $mg['useintro']!=-1){
need replace <4 to <5
and nextly find <input name="tp_wysiwyg" type="radio" value="2" ' , $context['TPortal']['use_wysiwyg']=='2' ? 'checked' : '' , '> '.$txt['tp-fckeditor'].'<br />
<input name="tp_wysiwyg" type="radio" value="3" ' , $context['TPortal']['use_wysiwyg']=='3' ? 'checked' : '' , '> '.$txt['tp-whizzyeditor'].'<br />
and add after <input name="tp_wysiwyg" type="radio" value="4" ' , $context['TPortal']['use_wysiwyg']=='4' ? 'checked' : '' , '> '.$txt['tp-myalteditor'].'<br />

Sources/TPortalAdmin.php
find if($context['TPortal']['use_wysiwyg']=='2' || $context['TPortal']['use_wysiwyg']=='1')
$context['html_headers'] .= '
<script language="javascript" type="text/javascript" src="'. $boardurl .'/FCKeditor/fckeditor.js"></script>';
elseif($context['TPortal']['use_wysiwyg']=='3')
$context['html_headers'] .=
'<script language="JavaScript" type="text/javascript" src="'. $boardurl. '/wysiwyg/whizzywig.js"></script>';
and add after elseif($context['TPortal']['use_wysiwyg']=='4')
$context['html_headers'] .=
'<script language="JavaScript" type="text/javascript" src="'. $boardurl. '/nicEditor/nicEdit.js"></script>';

nextly find // Whizzywig
elseif($context['TPortal']['use_wysiwyg']=='3')
$context['html_headers'] .= '
<script language="JavaScript" type="text/javascript">
function FullEditor(BodyName)
{
buttonPath = "'.$boardurl.'/wysiwyg/btn/";
cssFile="";
imageBrowse = "'.$boardurl.'/wysiwyg/whizzypic.php?d=tp-images/Image";
linkBrowse = "";
makeWhizzyWig(BodyName, "all");
}
function SmallerEditor(BodyName)
{
buttonPath = "'.$boardurl.'/wysiwyg/btn/";
cssFile="";
imageBrowse = "";
linkBrowse = "";
makeWhizzyWig(BodyName, "formatblock fontname fontsize newline bold italic underline | left center right |  undo redo  | color hilite rule | clean html");
}
</script>';
and add after // nicEdit
elseif($context['TPortal']['use_wysiwyg']=='4')
$context['html_headers'] .= '
<script language="JavaScript" type="text/javascript">
function FullEditor(BodyName)
{
bkLib.onDomLoaded(function() {
new nicEditor({fullPanel : true,
iconsPath : \''.$boardurl.'/nicEditor/nicEditorIcons.gif\'}
).panelInstance(BodyName);});
}
function SmallerEditor(BodyName)
{
bkLib.onDomLoaded(function() {
new nicEditor({iconsPath : \''.$boardurl.'/nicEditor/nicEditorIcons.gif\'}).panelInstance(BodyName);});
}
</script>';


Sources/TPmodules.php analogically
find if($context['TPortal']['use_wysiwyg']=='2' || $context['TPortal']['use_wysiwyg']=='1')
$context['html_headers'] .= '
<script language="javascript" type="text/javascript" src="'. $boardurl .'/FCKeditor/fckeditor.js"></script>';
elseif($context['TPortal']['use_wysiwyg']=='3')
$context['html_headers'] .=
'<script language="JavaScript" type="text/javascript" src="'. $boardurl. '/wysiwyg/whizzywig.js"></script>';
and add after elseif($context['TPortal']['use_wysiwyg']=='4')
$context['html_headers'] .=
'<script language="JavaScript" type="text/javascript" src="'. $boardurl. '/nicEdit/nicEditor.js"></script>';

next find // Whizzywig
elseif($context['TPortal']['use_wysiwyg']=='3')
$context['html_headers'] .= '
<script language="JavaScript" type="text/javascript">
function FullEditor(BodyName)
{
buttonPath = "'.$boardurl.'/wysiwyg/btn/";
cssFile="";
imageBrowse = "'.$boardurl.'/wysiwyg/whizzypic.php?d=tp-images/Image";
linkBrowse = "";
makeWhizzyWig(BodyName, "all");
}
function SmallerEditor(BodyName)
{
buttonPath = "'.$boardurl.'/wysiwyg/btn/";
cssFile="";
imageBrowse = "";
linkBrowse = "";
makeWhizzyWig(BodyName, "formatblock fontname fontsize newline bold italic underline | left center right |  undo redo  | color hilite rule | clean html");
}
</script>';
and add after // nicEdit
elseif($context['TPortal']['use_wysiwyg']=='4')
$context['html_headers'] .= '
<script language="JavaScript" type="text/javascript">
function FullEditor(BodyName)
{
bkLib.onDomLoaded(function() {
new nicEditor({fullPanel : true,
iconsPath : \''.$boardurl.'/nicEditor/nicEditorIcons.gif\'}
).panelInstance(BodyName);});
}
function SmallerEditor(BodyName)
{
bkLib.onDomLoaded(function() {
new nicEditor({iconsPath : \''.$boardurl.'/nicEditor/nicEditorIcons.gif\'}).panelInstance(BodyName);});
}
</script>';


cool!  :up: you made it!  :2funny: set wysiwig radiobox in TinyPortal settings to "'yes, My alternative editor'" and test article editing in new tool  ::)

need two things in this tool ???:
  • automatic replace string "hxxp://..." and mail address to links (without manual anchor input)
  • pictures upload
second thing may doing with temp swithing to [censored]Editor ^-^

add my karma plus!  :up: and join me to TinyPortal beta tester too O0

G6Cad

Thank you for posting.
Just to clear some things out.
The wysiwyg editor was removed cause it was way to buggy, and also the security was dreadful.
Bloc have checked several other editors and i dont really know what he have in mind regarding what editor to use right now.

I will add to this that I hope you have checked it's saftey so the sites that starts to use this doesent get hacked through it. The prime things for SMF and TP is safe scripts  :)

bloc

Hm, I really like this one, its very fast and lightweight. Does not come with image uploading, but that can be done by TP anyway. I will try it out.

feline

A little bit tooo simple ..  ???
It's not that, what i uderstand as wysiwyg editor  ::)

Fel

Ken.

The authors website.

I sent him a note and invited him to join in the discussion.  :)
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

Xarcell

I like the fact that it's lightweight, fast, xhtml, and cross-browser complaint. Pretty much everything Bloc said.


feline

Quote from: Ken. on February 13, 2008, 12:01:43 PM
The authors website.

I sent him a note and invited him to join in the discussion.  :)
I have look at the site Ken.
And I need no discussion .. I love the comfort that I have with my xhtml editor  ::)

Fel

KapaBG

feline, your editor is great, but it is not quckly for some bad speed lines. and open second windows is not quckly open (as ms word :) )
not comforting, but rich features.

secondary, have problem in utf-8 and wincp mode (in russian).
thirdly, not a wysiwig in non standad themes (not using theme styles on the flight :) ).

but not bad, instead F@cKeditor!

you may insert your favorite xtml-editor with way above! my to do list is hack your blog mod for using nicEdit too ;) best way - user must selfselect comfortable tools for best working

feline

Quote from: Grand Duke on February 13, 2008, 06:52:54 PM
secondary, have problem in utf-8 and wincp mode (in russian).
What's is that problem? Give me a example please, so I can fix that ...

Quote
thirdly, not a wysiwig in non standad themes (not using theme styles on the flight :) ).
comming soon ...

Quote
you may insert your favorite xtml-editor with way above!
that i have do long time ago  8)

Fel

KapaBG

feline, problems with russian is not typical. if language is russian-utf8 problem is not anywhere. but if russian (cp1251) need little manual configurations in xhtml files. and after this, second popup windows (colors, links, etc) have utf-8

it is not big problem, but my goal now - try to inject lightweight nicEdit. it is not easy. need many find and replace

but your work is very nice and accurate, your code and db query is perfect!

feline

All the lang files use utf8 charset.
For other codepages you have to translate these files.

Fel

feline

Now .. I have tested the editor and found many great bugs.


  • The editarea have no scrolling, it takes longer and longer on add textlines - very bad
  • On press enter, the cursor is not moved down to next line - bad
  • The corsor move out of texterea at the end - bad
  • Click indent on marked text and then unindent, the textarea is complete destroy - absulutly bad
  • if the editerea not selected, the buttons work, on html edit, the popup is empty - absolutly bad
  • the dom output is not formatted, so html edit is strong - very bad
  • No cleanup button, to remove any formatting - bad
  • lot of more smaller bugs ..  :o

On this short test result I can say .. No, no, no .. to bad.

Fel

bloc

That def. isn't good lol :)

Thanks, Fel, for a detailed check. I actually did notice one or two of these points myself, and have tried a bit today. Its really lightweight, but its not any better than whizzwig without the image browser IMHO.

KapaBG

#13
felina, it is not a full wisywig replacement. and not a repacment of other editors. it is tool for editing on the fly, no more. ??? have many bugs, but don't try to make a changings! because ... author will soon release a version 0.3 with new features and plugins.  O0 else less 30kb :2funny:

feline

I think, for a editing on the fly, it's better to add the wysiwyg editor which smf2 have inside or use simple textarea. That's allways better then a buggy tool, that comes as "wysiwyg editor".

Fel

bloc

I agreed. Thats why now TP 1.0 has BBC articles..and I find myself using them more than HTML articles actually. But both are needed of course.

KapaBG

felina, ok. understand your position and respect. but i using necEdit in articles and happy :)
Quote from: Bloc on February 16, 2008, 03:50:49 PM
now TP 1.0 has BBC articles.
very right. it is good news for me. and good way - user must have right to choose favorite editor. through tpmodules or plugins

feline

Grand Duke, offcourse you can use the niceEdit for you, but as Bloc say ..
For ALL the users, they work with TinyPortal, it's better a perfect editor is inside.
Better for the user, better for support  ::)

Fel

KapaBG

feline, you right, nicEdit is very short, speed, nice and cool micro wysiwig editor  :up: of the world  >:D
aliluya!  O0

dkillers

Quote from: feline on February 15, 2008, 12:34:25 PM
Now .. I have tested the editor and found many great bugs.


  • The editarea have no scrolling, it takes longer and longer on add textlines - very bad
  • On press enter, the cursor is not moved down to next line - bad
  • The corsor move out of texterea at the end - bad
  • Click indent on marked text and then unindent, the textarea is complete destroy - absulutly bad
  • if the editerea not selected, the buttons work, on html edit, the popup is empty - absolutly bad
  • the dom output is not formatted, so html edit is strong - very bad
  • No cleanup button, to remove any formatting - bad
  • lot of more smaller bugs ..  :o

On this short test result I can say .. No, no, no .. to bad.

Fel

one more,
cannot make select all to the text :D

KapaBG

in new vers of nicedit u can make any macros, i think.  ::)
but i don't make this is for TP 1.05, becouse this edition not good, have many unused features and not have used :down:
TP code is very bad structured (excluding authors ^-^). it is really April Fool Edition   :uglystupid2:

IchBin

If you don't think TP is very good, then why are you here? To just complain?

KapaBG

not complain :P but why i must sing song to really bad edition, not justified my hopes :coolsmiley:
let my jade drop will understanding as alternation view and opinion or u may ban me yet ^-^
your aprils team not want me to join for prerelease of tp, now you gathering friuts O0
and i don't argumenting my opinion, because ... time is out. and main new features of TP1 - advanced shout box with smiles - smile IchBin, more aprils smiles ! :2funny: