![]() |
|
|||||||
| Kayıt ol | Blogs | Yardım | Üye Listesi | Ajanda | iTrader | Forumları Okundu Kabul Et |
| SMF SMF Temalar Eklentiler |
|
|
|
LinkBack | Seçenekler | Stil |
|
||||
![]() Ne işe yarar: Alıntı:
Demo: http://www.ecardmax.com/smf_111 Download: http://www.ecardmax.com/ehelpmax/res...or_smf_mod.zip Hızlı cevapta hoteditor olmasın diyorsanız display.template.php dosyasını düzenlemeyiniz. Eğer olsun diyorsanız Not Forum seçeneklerinide "Url'leri göstermeden kullan " seçeneğini kapatın. Aksi takdirde gözükmez Kurulum ########DEĞİŞİKLİK YAPILACAK DOSYALAR########## ## Themes/default/Display.template.php, ## Themes/default/Post.template.php, ## Themes/default/Profile.template.php, ## Themes/default/script.js ## Themes/classic/Post.template.php ## Sources/Subs.php ## #-----[ AÇ]------------------------------------------ Kod:
Themes/default/Display.template.php Kod:
<textarea cols="75" rows="7" style="width: 95%; height: 100px;" name="message" tabindex="1"></textarea><br /> Kod:
<!--//HotEditor MOD - Quick Reply -->
<textarea style="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 -->
Kod:
var smf_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'], '" /><input type="hidden" name="topic" value="', $context['current_topic'], '" /><input type="hidden" name="msg" value="%msg_id%" /><div style="text-align: center;"><input type="submit" name="post" value="', $txt[10], '" onclick="return modify_save(\\\'' . $context['session_id'] . '\\\');" accesskey="s" /> ', $context['show_spellchecking'] ? '<input type="button" value="' . $txt['spell_check'] . '" onclick="spellCheck(\\\'quickModForm\\\', \\\'message\\\');" /> ' : '', '<input type="submit" name="cancel" value="', $txt['modify_cancel'], '" onclick="return modify_cancel();" /></div>\'; #-----[ DEĞİŞTİR]------------------------------------------ Kod:
//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=no target="_top"></iframe><textarea style="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'], '" /><input type="hidden" name="topic" value="', $context['current_topic'], '" /><input type="hidden" name="msg" value="%msg_id%" /><div style="text-align: center;"><input type="hidden" name="post" value="', $txt[10], '" onclick="return modify_save(\\\'' . $context['session_id'] . '\\\');" accesskey="s" /> ', $context['show_spellchecking'] ? '<input type="button" value="' . $txt['spell_check'] . '" onclick="spellCheck(\\\'quickModForm\\\', \\\'message\\\');" /> ' : '', '<input type="hidden" name="cancel" value="', $txt['modify_cancel'], '" onclick="return modify_cancel();" /></div>\'; Kod:
Themes/default/Post.template.php Kod:
// Finally the most important bit - the actual text box to write in! echo ' <tr> <td valign="top" align="right"></td> <td> <textarea class="editor" name="', $context['post_box_name'], '" rows="', $context['post_box_rows'], '" cols="', $context['post_box_columns'], '" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="', $context['tabindex']++, '"', isset($context['post_error']['no_message']) || isset($context['post_error']['long_message']) ? ' style="border: 1px solid red;"' : '', '>', $message, '</textarea> </td> </tr>'; #-----[ DEĞİŞTİR]------------------------------------------ Kod:
// Finally the most important bit - the actual Hoteditor box to write in!
//HotEditor MOD
print<<<EOF
<tr>
<td valign="top" align="right"></td>
<td>
<textarea style="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,"[STRIKE]");
getdata=getdata.replace(/\[\/S\]/gi,"[/STRIKE]");
Instantiate("max","editor", getdata , "100%", "300px");
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("hoteditor_holder").value = bbcode_output;
}
}
</script>
</td>
</tr>
EOF;
#-----[ BUL]------------------------------------------ Kod:
foreach ($smiley_row['smileys'] as $smiley) echo ' <a href="javascript:void(0);" onclick="replaceText(\' ', $smiley['code'], '\', document.forms.', $context['post_form'], '.', $context['post_box_name'], '); return false;"><img src="', $settings['smileys_url'], '/', $smiley['filename'], '" align="bottom" alt="', $smiley['description'], '" title="', $smiley['description'], '" /></a>'; #-----[ DEĞİŞTİR]------------------------------------------ Kod:
foreach ($smiley_row['smileys'] as $smiley)
{
//Hoteditor MOD
$smiley_src= $settings['smileys_url'] . '/' . $smiley['filename'];
print "<img style='cursor:pointer' onmousedown=\"if(editor_type==1){WriteHTML('<img src=$smiley_src>','editor');}else{WriteTEXT('\[IMG\]$smiley_src\[\/IMG\]','editor');}\" src=\"$smiley_src\" alt=\"$smiley[description]\" title=\"$smiley[description]\" /> ";
}
Kod:
// Assuming BBC code is enabled then print the buttons and some javascript to handle it.
if ($context['show_bbc'])
{
echo '
<tr>
<td align="right"></td>
<td valign="middle">
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function bbc_highlight(something, mode)
{
something.style.backgroundImage = "url(" + smf_images_url + (mode ? "/bbc/bbc_hoverbg.gif)" : "/bbc/bbc_bg.gif)");
}
// ]]></script>';
// The below array makes it dead easy to add images to this page. Add it to the array and everything else is done for you!
$context['bbc_tags'] = array();
$context['bbc_tags'][] = array(
'bold' => array('code' => 'b', 'before' => '', 'after' => '', 'description' => $txt[253]),
'italicize' => array('code' => 'i', 'before' => '', 'after' => '', 'description' => $txt[254]),
'underline' => array('code' => 'u', 'before' => '', 'after' => '', 'description' => $txt[255]),
'strike' => array('code' => 's', 'before' => '
Kod:
//Hoteditor MOD - Remove original BBCode Kod:
replaceText(text, document.forms.postmodify.message); Kod:
//HotEditor MOD
if(editor_type=="0"){//BBCode Editor
WriteTEXT(text,"editor");
}
else{//WYSIWYG Editor
text=BBCodeToHTML(text);
WriteHTML(text,"editor");
}
#-----[ BUL]------------------------------------------ Kod:
// Finally, the submit buttons. echo ' <tr> <td align="center" colspan="2"> <span class="smalltext"><br />', $txt['smf16'], '</span><br /> <input type="submit" name="post" value="', $context['submit_label'], '" tabindex="', $context['tabindex']++, '" onclick="return submitThisOnce(this);" accesskey="s" /> <input type="submit" name="preview" value="', $txt[507], '" tabindex="', $context['tabindex']++, '" onclick="return event.ctrlKey || previewPost();" accesskey="p" />'; #-----[ DEĞİŞTİR]------------------------------------------ Kod:
// HotEditor MOD - add code get_hoteditor_data() - Finally, the submit buttons. echo ' <tr> <td align="center" colspan="2"> <span class="smalltext"><br />', $txt['smf16'], '</span><br /> <input type="submit" name="post" value="', $context['submit_label'], '" tabindex="', $context['tabindex']++, '" onclick="return get_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Ç]------------------------------------------ Kod:
Themes/default/Profile.template.php #-----[ BUL]------------------------------------------ Kod:
echo ' </td> <td> <textarea class="editor" onkeyup="calcCharLeft();" name="signature" rows="5" cols= #-----[ DEĞİŞTİR]------------------------------------------ Kod:
//HotEditor MOD
$sign_message=$context['member']['signature'];
print<<<EOF
</td>
<td>
<textarea style="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,"[STRIKE]");
getdata=getdata.replace(/\[\/S\]/gi,"[/STRIKE]");
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>
EOF;
#-----[ BUL]------------------------------------------ Kod:
// The main containing header. echo ' <form action="', $scripturl, '?action=profile2" method="post" accept-charset="', $context['character_set'], '" name="creator" id="creator" enctype="multipart/form-data"> #-----[ DEĞİŞTİR]------------------------------------------ Kod:
// The main containing header. //HotEditor MOD - add code onsubmit="return get_hoteditor_data();" echo ' <form onsubmit="return get_hoteditor_data();" action="', $scripturl, '?action=profile2" method="post" accept-charset="', $context['character_set'], '" name="creator" id="creator" enctype="multipart/form-data"> #-----[ AÇ]------------------------------------------ Kod:
Themes/default/script.js #-----[ BUL]------------------------------------------ Kod:
function submitThisOnce(form)
{
#-----[ SONRASINA EKLE ]------------------------------------------ Kod:
//HotEditor MOD get_hoteditor_data(); #-----[ BUL]------------------------------------------ Kod:
function submitonce(theform)
{
smf_formSubmitted = true;
}
#-----[ DEĞİŞTİR]------------------------------------------ Kod:
function submitonce(theform)
{
//HotEditor MOD
get_hoteditor_data();
smf_formSubmitted = true;
}
#-----[ BUL]------------------------------------------ Kod:
// 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);
}
}
Kod:
//HotEditor MOD
// 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");
}
}
Kod:
Sources/Subs.php Kod:
$codes = array( #-----[ SONRASINA EKLE]------------------------------------------ Kod:
//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>',
),
#-----[ BUL]------------------------------------------ Kod:
'before' => '<table style="font: inherit; color: inherit;">', #-----[ DEĞİŞTİR]------------------------------------------ Kod:
'before' => '<table align=center style="border-collapse: collapse;border-spacing: 0px;border: 1px solid #6CAFF7;background-color: #F4F4F4;width:98%;font-family:Verdana,Arial,Sans-Serif,Tahoma;font-size:12px;color: black;">', #-----[ BUL]------------------------------------------ Kod:
'before' => '<td valign="top" style="font: inherit; color: inherit;">', #-----[ DEĞİŞTİR]------------------------------------------ Kod:
'before' => '<td style="height:25px; border: 1px solid #6CAFF7">', |
![]() |
| Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir) | |
| Seçenekler | |
| Stil | |
|
|
Benzer Konular
|
||||
| Konu | Konuyu Başlatan | Forum | Cevaplar | Son Mesaj |
| WYSIWYG Editor mi ihtiyacınız var? :) (ceviz.net) | RSS | Ordan burdan konumuzla ilgili RSS ler | 0 | 2007-06-19 04:41 |
| bedava wysiwyg editoru (bildirgec.org) | RSS | Ordan burdan konumuzla ilgili RSS ler | 0 | 2007-06-10 09:11 |
| Ajax ve Wysiwyg editör (ceviz.net) | RSS | Ordan burdan konumuzla ilgili RSS ler | 0 | 2007-06-05 09:55 |
| WYSIWYG Editor yardıma ihtiyacım var (zoque.net) | RSS | Ordan burdan konumuzla ilgili RSS ler | 0 | 2007-05-28 17:10 |
| WYSIWYG Editor (ceviz.net) | RSS | Ordan burdan konumuzla ilgili RSS ler | 0 | 2007-05-27 18:30 |