WWW.turkmekan.org
SMF HOT EDİTÖR YENİ VERSİYON........
ÖRNEK RESİM
http://www.ecardmax.com/templates/Ma...shot_small.gif
Download: ekteki Hot-Gerekli Dosyalar dosyası..
KURULUMU AŞAĞIDA
aç
Themes/default/Display.template.php
bul
<textareacols="75" rows="7" style="width: 95%; height: 100px;" name="message"tabindex="1"></textarea><br />
değiştir
<!--//HotEditor MOD - Quick Reply -->
<textareastyle="visibility:hidden;position:absolute;top:-20;left:-20;width:1px;height:1px"cols="75" rows="7" id="message" name="message"tabindex="1"></textarea>
<style type="text/css">@import url(richedit/styles/office2007/style.css);</style>
<script language="JavaScript" type="text/javascript" src="richedit/editor.js?version=4.2"></script>
<script language="JavaScript" type="text/javascript">
var getdata =document.getElementById("message").value;
Instantiate("min","editor", getdata , "100%", "150px");
function get_hoteditor_data(){
if (HTML_ON == "no"){
alert ("Please uncheck the HTML checkbox");
return false;
}
else{
setCodeOutput();
var bbcode_output=document.getElementById("hoteditor_bbcode_ouput_editor").value;//Output to BBCode
document.getElementById("message").value = bbcode_output;
}
}
</script><br />
<!--//HotEditor MOD Quick Reply -->
bul
varsmf_template_body_edit = \'<div id="error_box" style="padding: 4px;color: red;"></div><textarea class="editor" name="message"rows="12" style="width: 94%; margin-bottom:10px;">%body%</textarea><br /><input type="hidden"name="sc" value="', $context['session_id'], '" /><inputtype="hidden" name="topic" value="', $context['current_topic'], '"/><input type="hidden" name="msg" value="%msg_id%" /><divstyle="text-align: center;"><input type="submit" name="post"value="', $txt[10], '" onclick="return modify_save(\\\'' .$context['session_id'] . '\\\');" accesskey="s"/> ', $context['show_spellchecking'] ? '<inputtype="button" value="' . $txt['spell_check'] . '"onclick="spellCheck(\\\'quickModForm\\\', \\\'message\\\');"/> ' : '', '<input type="submit" name="cancel"value="', $txt['modify_cancel'], '" onclick="return modify_cancel();"/></div>\';
değiştir
//HotEditor MOD QUICK EDIT / MODIFY POST
var edit_session_id = "', $context['session_id'], '";
var smf_template_body_edit = \'<div id="error_box" style="padding:4px; color: red;"></div><iframe frameborder=0 width=100%height=550px src="hoteditor_quickedit.html" scrolling=notarget="_top"></iframe><textareastyle="visibility:hidden;width:1px;height:1px" id="message"class="editor" name="message" rows="12" style="width: 94%;margin-bottom: 10px;">%body%</textarea><input type="hidden"name="sc" value="', $context['session_id'], '" /><inputtype="hidden" name="topic" value="', $context['current_topic'], '"/><input type="hidden" name="msg" value="%msg_id%" /><divstyle="text-align: center;"><input type="hidden" name="post"value="', $txt[10], '" onclick="return modify_save(\\\'' .$context['session_id'] . '\\\');" accesskey="s"/> ', $context['show_spellchecking'] ? '<inputtype="button" value="' . $txt['spell_check'] . '"onclick="spellCheck(\\\'quickModForm\\\', \\\'message\\\');"/> ' : '', '<input type="hidden" name="cancel"value="', $txt['modify_cancel'], '" onclick="return modify_cancel();"/></div>\';
aç
Themes/default/Post.template.php
bul
function template_postbox(&$message)
değiştir
//This function displays all the stuff you'd expect to see with a messagebox, the box, BBC buttons and of course smileys.
function template_postbox(&$message)
{
global $context, $settings, $options, $txt, $modSettings;
// Now start printing all of the smileys.
if (!empty($context['smileys']['postform']))
{
echo '
<tr>
<td align="right"></td>
<td valign="middle">';
// Show each row of smileys;).
foreach ($context['smileys']['postform'] as $smiley_row)
{
foreach ($smiley_row['smileys'] as $smiley)
{
$smiley_src= $settings['smileys_url'] . '/' . $smiley['filename'];
print "<img style='cursor:hand;cursor:pointer'onmousedown=\"if(editor_type==1){WriteHTML('<imgsrc=$smiley_src>','editor');}else{WriteTEXT('\[IMG\]$smiley_src\[\/IMG\]','editor');}\"src=\"$smiley_src\" alt=\"$smiley[description]\"title=\"$smiley[description]\" /> ";
}
// If this isn't the last row, show a break.
if (empty($smiley_row['last']))
echo '<br />';
}
// If the smileys popup is to be shown... show it!
if (!empty($context['smileys']['popup']))
echo '
<a href="java script:moreSmileys();">[', $txt['more_smileys'], ']</a>';
echo '
</td>
</tr>';
}
// If there are additional smileys then ensure we provide the javascript for them.
if (!empty($context['smileys']['popup']))
{
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smileys = [';
foreach ($context['smileys']['popup'] as $smiley_row)
{
echo '
[';
foreach ($smiley_row['smileys'] as $smiley)
{
echo '
["', $smiley['code'], '","', $smiley['filename'], '","', $smiley['js_description'], '"]';
if (empty($smiley['last']))
echo ',';
}
echo ']';
if (empty($smiley_row['last']))
echo ',';
}
echo '];
var smileyPopupWindow;
function moreSmileys()
{
var row, i;
if (smileyPopupWindow)
smileyPopupWindow.close();
smileyPopupWindow = window.open("", "add_smileys", "toolbar=no,location=no,status=no,menubar=no,sc
ollbars=yes,width=480,height=220,resizable=yes");
smileyPopupWindow.document.write(\'<!DOCTYPEhtml PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html>\');
smileyPopupWindow.document.write(\'\n\t<head>\n\t\t<title>',$txt['more_smileys_title'], '</title>\n\t\t<linkrel="stylesheet" type="text/css" href="', $settings['theme_url'],'/style.css" />\n\t</head>\');
smileyPopupWindow.document.write(\'\n\t<bodystyle="margin: 1ex;">\n\t\t<table width="100%" cellpadding="5"cellspacing="0" border="0" class="tborder">\n\t\t\t<trclass="titlebg"><td align="left">', $txt['more_smileys_pick'],'</td></tr>\n\t\t\t<tr class="windowbg"><tdalign="left">\');
for (row = 0; row < smileys.length; row++)
{
for (i = 0; i < smileys[row].length; i++)
{
smileys[row][2] = smileys[row][2].replace(/"/g, \'"\');
smileyPopupWindow.document.write(\'<ahref="java script:void(0);"onclick="window.opener.replaceText(" \' + smileys[row][0] +\'", window.opener.document.forms.', $context['post_form'],'.', $context['post_box_name'], '); window.focus(); returnfalse;"><img src="', $settings['smileys_url'], '/\' +smileys[row][1] + \'" alt="\' + smileys[row][2] + \'" title="\' +smileys[row][2] + \'" style="padding: 4px;" border="0"/></a> \');
}
smileyPopupWindow.document.write("<br />");
}
smileyPopupWindow.document.write(\'</td></tr>\n\t\t\t<tr><tdalign="center" class="windowbg"><a href="javascript:window.close();\\">', $txt['more_smileys_close_window'],'</a></td></tr>\n\t\t</table>\n\t</body>\n</html>\');
smileyPopupWindow.document.close();
}
// ]]></script>';
}
// Finally the most important bit - the actual Hoteditor box to write in!
//HotEditor MOD
print<<<HTML_CODE
<tr>
<td valign="top" align="right"></td>
<td>
<textareastyle="visibility:hidden;position:absolute;top:-20;left:-20;width:1px;height:1px"class="editor" id="hoteditor_holder" name="$context[post_box_name]">$message</textarea>
<style type="text/css">@import url(richedit/styles/office2007/style.css);</style>
<script language="JavaScript"type="text/javascript"src="richedit/editor.js?version=4.2"></script>
<script language="JavaScript" type="text/javascript">
var getdata =document.getElementById("hoteditor_holder").value;
getdata=getdata.replace(/\[S\]/gi,"");
getdata=getdata.replace(/\[\/S\]/gi,"");
Instantiate("max","editor", getdata , "100%", "300px");
function get_hoteditor_data(){
if (HTML_ON == "no"){
alert ("Please uncheck the HTML checkbox");
return false;
}
else{
setCodeOutput();
varbbcode_output=document.getElementById("hoteditor_bbcode_ouput_editor").value;//Outputto BBCode
document.getElementById("hoteditor_holder").value = bbcode_output;
}
}
</script>
</td>
</tr>
HTML_CODE;
}
function template_postbox_old(&$message)
bul
replaceText(text, document.forms.postmodify.message);
değiştir
//HotEditor MOD
if(editor_type=="0"){//BBCode Editor
WriteTEXT(text,"editor");
}
else{//WYSIWYG Editor
text=BBCodeToHTML(text);
WriteHTML(text,"editor");
}
bul
<inputtype="submit" name="post" value="', $context['submit_label'], '"tabindex="', $context['tabindex']++, '" onclick="returnsubmitThisOnce(this);" accesskey="s" />
<input type="submit" name="preview" value="', $txt[507], '"tabindex="', $context['tabindex']++, '" onclick="return event.ctrlKey|| previewPost();" accesskey="p" />';
değiştir
<inputtype="submit" name="post" value="', $context['submit_label'], '"tabindex="', $context['tabindex']++, '" onclick="returnget_hoteditor_data();submitThisOnce(this);" accesskey="s" />
<input type="submit" name="preview" value="', $txt[507], '"tabindex="', $context['tabindex']++, '" onclick="return event.ctrlKey|| get_hoteditor_data();previewPost();" accesskey="p" />';
aç
Themes/default/Profile.template.php
bul
echo '
</td>
<td>
<textarea class="editor"onkeyup="calcCharLeft();" name="signature" rows="5" cols="50">',$context['member']['signature'], '</textarea><br/>';
değiştir
$sign_message=$context['member']['signature'];
print<<<HTML_CODE
</td>
<td>
<textareastyle="visibility:hidden;position:absolute;top:-20;left:-20;width:1px;height:1px"class="editor" id="signature" name="signature" rows="5"cols="50">$sign_message</textarea><br />
<style type="text/css">@import url(richedit/styles/office2007/style.css);</style>
<script language="JavaScript" type="text/javascript" src="richedit/editor.js?version=4.2"></script>
<script language="JavaScript" type="text/javascript">
var getdata =document.getElementById("signature").value;
getdata=getdata.replace(/\[S\]/gi,"");
getdata=getdata.replace(/\[\/S\]/gi,"");
Instantiate("min","editor", getdata , "100%", "200px");
function get_hoteditor_data(){
if (HTML_ON == "no"){
alert ("Please uncheck the HTML checkbox");
return false;
}
else{
setCodeOutput();
var bbcode_output=document.getElementById("hoteditor_bbcode_ouput_editor").value;//Output to BBCode
document.getElementById("signature").value = bbcode_output;
}
}
</script>
HTML_CODE;
bul
<formaction="', $scripturl, '?action=profile2" method="post"accept-charset="', $context['character_set'], '" name="creator"id="creator" enctype="multipart/form-data">
değiştir
<formonSubmit="return get_hoteditor_data();" action="', $scripturl,'?action=profile2" method="post" accept-charset="',$context['character_set'], '" name="creator" id="creator"enctype="multipart/form-data">
aç
Themes/default/script.js
bul
function submitonce(theform)
{
smf_formSubmitted = true;
}
değiştir
function submitonce(theform)
{
//HotEditor MOD
get_hoteditor_data();
smf_formSubmitted = true;
}
bul
// Replaces the currently selected text with the passed text.
function replaceText(text, textarea)
{
// Attempt to create a text range (IE).
if (typeof(textarea.caretPos) != "undefined" && textarea.createTextRange)
{
var caretPos = textarea.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
caretPos.select();
}
// Mozilla text range replace.
else if (typeof(textarea.selectionStart) != "undefined")
{
var begin = textarea.value.substr(0, textarea.selectionStart);
var end = textarea.value.substr(textarea.selectionEnd);
var scrollPos = textarea.scrollTop;
textarea.value = begin + text + end;
if (textarea.setSelectionRange)
{
textarea.focus();
textarea.setSelectionRange(begin.length + text.length, begin.length + text.length);
}
textarea.scrollTop = scrollPos;
}
// Just put it on the end.
else
{
textarea.value += text;
textarea.focus(textarea.value.length - 1);
}
}
değiştir
// Replaces the currently selected text with the passed text.
function replaceText(text, textarea)
{
if(editor_type==1){
text=BBCodeToHTML(text);
WriteHTML(text,"editor");
}
else{
WriteTEXT(text,"editor");
}
}
aç
Sources/Subs.php
bul
$codes = array(
sonrasına ekle
//HotEditor MOD
array(
'tag' => 'highlight',
'type' => 'unparsed_equals',
'test' => '(#[\da-fA-F]{3}|#[\da-fA-F]{6}|[A-Za-z]{1,12})\]',
'before' => '<span style="background-color: $1;">',
'after' => '</span>',
),
array(
'tag' => 'strike',
'before' => '<strike>',
'after' => '</strike>',
),
en son indirilen dosyanın içinde bulunan richedit klasörünü ve hoteditor_quickedit.html adlı dosyayı forum ana dizinine atmayı unutmayınız..
Türkçe yama:
İndirilen dosyanın içindeki zipli tryama dosyasının içindeki editor dosyasını,richedit klasörüne atıp değişimi onaylayın bu kadar...