Ignore:
Timestamp:
08/17/08 22:34:14 (4 years ago)
Author:
hverton
Message:

added the HotEditor BBcode WYSIWYG editor
added a user profile open to disable the editor (if globally enabled)
replaced the smiley system. Now images are included instead if smiley shorthand
added a few hundered new smiley images

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/templates/forum.viewthread.tpl

    r1627 r1648  
    256256{include file="_opentable.tpl" name=$_name title=$locale.512 state=$_state style=$_style} 
    257257<form name='inputform' method='post' action='{$smarty.const.FUSION_SELF}?forum_id={$forum_id}&amp;thread_id={$thread_id}'> 
    258     <table align='center' cellpadding='0' cellspacing='1' width='75%' class='tbl-border'> 
     258    <table align='center' cellpadding='0' cellspacing='1' width='100%' class='tbl-border'> 
    259259        <tr> 
    260260            <td align='center' class='tbl1'> 
     261            {if $settings.hoteditor_enabled == 0 || $userdata.user_hoteditor == 0} 
    261262                <textarea name='message' cols='80' rows='7' class='textbox' style='width:100%; height:{math equation='x/4' x=$smarty.const.BROWSER_HEIGHT format='%u'}px;'></textarea> 
    262263                <br /> 
     
    273274                <input type='button' value='code' class='button' style='width:40px;' onclick="addText('message', '[code]', '[/code]');" /> 
    274275                <input type='button' value='quote' class='button' style='width:45px;' onclick="addText('message', '[quote]', '[/quote]');" /> 
     276            {else} 
     277                <style type='text/css'>@import url({$smarty.const.THEME}hoteditor/style.css);</style> 
     278                <input type='hidden' id='message' name='message' value='' /> 
     279                <script language="javascript" type="text/javascript"> 
     280                    var hoteditor_path = "{$smarty.const.INCLUDES}jscripts/hoteditor-4.2/"; 
     281                    var hoteditor_theme_path = "{$smarty.const.THEME}hoteditor"; 
     282                </script> 
     283                <script language="javascript" type="text/javascript" src="{$smarty.const.INCLUDES}jscripts/hoteditor-4.2/editor.js?version=4.2"></script>                
     284                {literal} 
     285                <script language="javascript" type="text/javascript"> 
     286                    var getdata = document.getElementById("message").value; 
     287                    Instantiate("max","editor", getdata , "100%", "150px"); 
     288                     
     289                    //For Vietnamese User. Edit file editor.js to enable vietnamese keyboard 
     290                    if(enable_vietnamese_keyboard==1){ 
     291                        document.write("<script language=\"JavaScript\" type=\"text/javascript\" src={/literal}{$smarty.const.INCLUDES}jscripts/hoteditor-4.2/avim.js{literal}><\/script>"); 
     292                        var hoteditor_avim_method = hot_readCookie("hoteditor_avim_method");var him_auto_checked="";var him_telex_checked="";var him_vni_checked="";var him_viqr_checked="";var him_viqr2_checked="";var him_off_checked="";if(hoteditor_avim_method=="0"){him_auto_checked="checked";}else if(hoteditor_avim_method=="1"){him_telex_checked="checked";}else if(hoteditor_avim_method=="2"){him_vni_checked="checked";}else if(hoteditor_avim_method=="3"){him_viqr_checked="checked";}else if(hoteditor_avim_method=="4"){him_viqr2_checked="checked";}else if(hoteditor_avim_method=="-1"){him_off_checked="checked";} 
     293                        document.write("<div style='width:100%;text-align:center;font-family:Verdana;font-size:11px;'><input "+him_auto_checked+" id=him_auto onclick=setMethod(0); type=radio name=viet_method> Auto :: <input "+him_telex_checked+" id=him_telex onclick=setMethod(1); type=radio name=viet_method> Telex :: <input "+him_vni_checked+" id=him_vni onclick=setMethod(2); type=radio name=viet_method> VNI :: <input "+him_viqr_checked+" id=him_viqr onclick=setMethod(3); type=radio name=viet_method> VIQR :: <input "+him_viqr2_checked+" id=him_viqr2 onclick=setMethod(4); type=radio name=viet_method> VIQR* :: <input "+him_off_checked+" id=him_off onclick=setMethod(-1); type=radio name=viet_method> Off<br><img src="+styles_folder_path+"/vietnamese_symbol.gif></div>"); 
     294                    } 
     295 
     296                    if(enable_vietnamese_keyboard==1){ 
     297                        var hoteditor_avim_method = hot_readCookie("hoteditor_avim_method");var him_auto_checked;var him_telex_checked;var him_vni_checked;var him_viqr_checked;var him_viqr2_checked;var him_off_checked;if(hoteditor_avim_method=="0"){him_auto_checked="checked";}else if(hoteditor_avim_method=="1"){him_telex_checked="checked";}else if(hoteditor_avim_method=="2"){him_vni_checked="checked";}else if(hoteditor_avim_method=="3"){him_viqr_checked="checked";}else if(hoteditor_avim_method=="4"){him_viqr2_checked="checked";}else if(hoteditor_avim_method=="-1"){him_off_checked="checked";} 
     298                        document.write("<script language=\"JavaScript\" type=\"text/javascript\" src={/literal}{$smarty.const.INCLUDES}jscripts/hoteditor-4.2/avim.js{literal}><\/script><div style='width:100%;text-align:center;font-family:Verdana;font-size:11px;'><input "+him_auto_checked+" id=him_auto onclick=setMethod(0); type=radio name=viet_method> Auto :: <input "+him_telex_checked+" id=him_telex onclick=setMethod(1); type=radio name=viet_method> Telex :: <input "+him_vni_checked+" id=him_vni onclick=setMethod(2); type=radio name=viet_method> VNI :: <input "+him_viqr_checked+" id=him_viqr onclick=setMethod(3); type=radio name=viet_method> VIQR :: <input "+him_viqr2_checked+" id=him_viqr2 onclick=setMethod(4); type=radio name=viet_method> VIQR* :: <input "+him_off_checked+" id=him_off onclick=setMethod(-1); type=radio name=viet_method> Off</div>"); 
     299                    } 
     300                    function get_hoteditor_data(){ 
     301                        setCodeOutput(); 
     302                        var bbcode_output=document.getElementById("hoteditor_bbcode_ouput_editor").value;//Output to BBCode 
     303                        document.getElementById("message").value = bbcode_output; 
     304                    }                    
     305                </script> 
     306                {/literal} 
     307            {/if} 
    275308            </td> 
    276309        </tr> 
     310        {if $settings.hoteditor_enabled == 0 || $userdata.user_hoteditor == 0} 
    277311        <tr> 
    278312            <td align='center' class='tbl1'> 
     
    282316            </td> 
    283317        </tr> 
     318        {/if} 
    284319        <tr> 
    285320            <td align='center' class='tbl1'> 
    286                 <input type='submit' name='postquickreply' value='{$locale.514}' class='button' />&nbsp; &nbsp; 
    287                 <input type='button' name='toggle' class='button' value='{$locale.517}' onclick='javascript:loadSmileys("smileys", "smileys_loaded", "{$smarty.const.BASEDIR}includes/ajax.response.php?request=smileys&parms=message");return false;' /> 
     321                <input type='submit' name='postquickreply' value='{$locale.514}' class='button' onclick='javascript:get_hoteditor_data();' />&nbsp; &nbsp; 
     322                {if $settings.hoteditor_enabled == 0 || $userdata.user_hoteditor == 0} 
     323                    <input type='button' name='toggle' class='button' value='{$locale.517}' onclick='javascript:loadSmileys("smileys", "smileys_loaded", "{$smarty.const.BASEDIR}includes/ajax.response.php?request=smileys&parms=message");return false;' /> 
     324                {/if} 
    288325                <input type='hidden' name='random_id' value='{$random_id}' /> 
    289326            </td> 
Note: See TracChangeset for help on using the changeset viewer.