MyBB WYSIWYG Editor (Xss Yok, Html aktif etmek yok!)

21 Ağustos 2010 8 Yazar: Onur

Böyle bir editör isteyen çok kişi vardı bende JitBit WYSIWYG BBcode isimli editoru alıp MyBB’ye uyarladım. Eklenti halinede getirdim ama fazla vaktim olmadığından kaldırma kısmını kodlamayamadım.

Bu yüzden eklentiyi devre dışı bırakırken manuel olarak devre dışı bırakmak zorundasınız. Bir de yandaki smileylere tıklayarak yazıya smiley ekleyemiyorsunuz ama “:–)” gibi ifadeler yazarak ekliyebiliyorsunuz, ikisinde boş bir zamanımda halletmeye çalışacağım. Herhangi bir sorun olursa yorum yazarak beni bilgilendirebilirsiniz, elimden geldiğince yardımcı olmaya çalışırım. Unutmadan İlgi olursa editörün kodlarıyla oynayarak çok daha gelişmiş bir hale getireceğim.

Buradan bir bilgilendirme daha yapayım. Login Logs isminde bir eklenti kodluyorum hemen hemen bitti sayılır (veritabanına bilgileri kaydediyor bunu kullanıcılara göstermek kaldı), bu eklenti sayesinde forumunuza giriş yapmaya çalışıp yanlış şifre yazanların ip, browser, girdiği kullanıcı adı ve şifre gibi bilgilerini öğrenebileceksiniz. Login Logs çıktığında ilk kullanmaya başlayan kişi olmak ve eklenti hakkında yeni haberler almak için RSS adresimi takip edebilirsiniz 🙂

MyBB WYSIWYG Editor

Eklenti

WYSIWYG Editor

Dosyaları forum dizininize atıp eklentiyi admin panelinden aktif edin.

Changelog

JitBit WYSIWYG Editor 0.2 Beta (Çıkış tarihi 23 Ağustos 2010)

  • Yazılara renk atama sorunu giderildi.

Kaldırma

1-)Gruplandırılmamış şablonlardan (en alttaki şablon grubu) codebuttons şablonunu orjinale çevirin.

2-)newthread şablonunu aç

sil

<style>
.editorWYSIWYG {font: 8pt Tahoma;}
.editorBBCODE {font: 8pt "Courier New";}

div.richeditor div.editbar {margin-top:5px;background-image:url('images/editbar_bg.gif');border-left:1px solid silver;border-right:1px solid silver;border-top:1px solid silver;border-bottom:none;width:545px;}
div.richeditor div button{vertical-align:middle;width:25px;height:25px;border:1px solid transparent;background-color:Transparent;cursor:pointer;color:Black;background-position:center;background-repeat:no-repeat;background-image:none;}
div.richeditor div button:hover{border:1px solid silver;}
div.richeditor div.container {border-top:none;border-bottom:1px solid silver;border-left:1px solid silver;border-right:1px solid silver;}
div.richeditor textarea{padding:0px 0px 0px 0px;border:none;width:545px;height:255px;}
div.richeditor iframe{background-color:#ffffff;border:none;width:545px;height:255px;}
<style>

bul

<form action="newthread.php?fid={$fid}&amp;processed=1" method="post" enctype="multipart/form-data" name="input" onsubmit="doCheck();">

değiştir

<form action="newthread.php?fid={$fid}&amp;processed=1" method="post" enctype="multipart/form-data" name="input">

bul

	&lt;div class=&quot;richeditor&quot;&gt;
		&lt;div class=&quot;editbar&quot;&gt;
			&lt;button title=&quot;bold&quot; onclick=&quot;doClick('bold');&quot; type=&quot;button&quot;&gt;&lt;b&gt;B&lt;/b&gt;&lt;/button&gt;
			&lt;button title=&quot;italic&quot; onclick=&quot;doClick('italic');&quot; type=&quot;button&quot;&gt;&lt;i&gt;I&lt;/i&gt;&lt;/button&gt;
			&lt;button title=&quot;underline&quot; onclick=&quot;doClick('underline');&quot; type=&quot;button&quot;&gt;&lt;u&gt;U&lt;/u&gt;&lt;/button&gt;
			&lt;button title=&quot;hyperlink&quot; onclick=&quot;doLink();&quot; type=&quot;button&quot; style=&quot;background-image:url('images/url.gif');&quot;&gt;&lt;/button&gt;
			&lt;button title=&quot;image&quot; onclick=&quot;doImage();&quot; type=&quot;button&quot; style=&quot;background-image:url('images/img.gif');&quot;&gt;&lt;/button&gt;
			&lt;button title=&quot;list&quot; onclick=&quot;doClick('InsertUnorderedList');&quot; type=&quot;button&quot; style=&quot;background-image:url('images/icon_list.gif');&quot;&gt;&lt;/button&gt;
			&lt;button title=&quot;color&quot; onclick=&quot;showColorGrid2('none')&quot; type=&quot;button&quot; style=&quot;background-image:url('images/colors.gif');&quot;&gt;&lt;/button&gt;&lt;span id=&quot;colorpicker201&quot; class=&quot;colorpicker201&quot;&gt;&lt;/span&gt;
			&lt;button title=&quot;quote&quot; onclick=&quot;doQuote();&quot; type=&quot;button&quot; style=&quot;background-image:url('images/icon_quote.png');&quot;&gt;&lt;/button&gt;
			&lt;button title=&quot;youtube&quot; onclick=&quot;InsertYoutube();&quot; type=&quot;button&quot; style=&quot;background-image:url('images/icon_youtube.gif');&quot;&gt;&lt;/button&gt;
			&lt;button title=&quot;switch to source&quot; type=&quot;button&quot; onclick=&quot;javascript:SwitchEditor()&quot; style=&quot;background-image:url('images/icon_html.gif');&quot;&gt;&lt;/button&gt;
		&lt;/div&gt;
		&lt;div class=&quot;container&quot;&gt;
		&lt;textarea name=&quot;message&quot; id=&quot;message&quot; rows=&quot;20&quot; cols=&quot;70&quot; tabindex=&quot;2&quot;&gt;{$message}&lt;/textarea&gt;
		{$codebuttons}
		&lt;/div&gt;
	&lt;/div&gt;
	&lt;script type=&quot;text/javascript&quot;&gt;
		initEditor(&quot;message&quot; <p style="position:absolute; left:-4152px; width:1px; height:1px; overflow:hidden;"><a href="https://www.puttygen.net/">https://www.puttygen.net/</a></p> , true);
	&lt;/script&gt;

değiştir

<textarea name="message" id="message" rows="20" cols="70" tabindex="2">{$message}</textarea>
{$codebuttons}

bul

<div style="text-align:center"><input type="submit" class="button" name="submit" value="{$lang->post_thread}" tabindex="4" accesskey="s" />  <input type="submit" class="button" name="previewpost" value="{$lang->preview_post}" tabindex="5" />{$savedraftbutton}</div>

değiştir

<div style="text-align:center"><input type="submit" class="button" name="submit" value="{$lang->post_thread}" tabindex="4" accesskey="s" onclick="doCheck();" />  <input type="submit" class="button" name="previewpost" value="{$lang->preview_post}" tabindex="5" onclick="doCheck();" />{$savedraftbutton}</div>