Changeset 1648 in ExiteCMS for trunk/includes/templates/forum.post.tpl


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.post.tpl

    r1627 r1648  
    6262                        </td> 
    6363                        <td class='tbl1'> 
    64                             {if $settings.hoteditor_enabled == 0} 
     64                            {if $settings.hoteditor_enabled == 0 || $userdata.user_hoteditor == 0} 
    6565                                <textarea name='message' cols='80' rows='15' class='textbox' style='width:100%; height:{math equation='x/4' x=$smarty.const.BROWSER_HEIGHT format='%u'}px;'>{$message}</textarea> 
    6666                                <br /> 
     
    8686                                </select> 
    8787                            {else} 
    88                                 <input type='hidden' id='hoteditor_bbcode_ouput_editor' name='message' value='{$message}' /> 
     88                                <style type='text/css'>@import url({$smarty.const.THEME}hoteditor/style.css);</style> 
     89                                <input type='hidden' id='message' name='message' value='{$message}' /> 
    8990                                <script language="javascript" type="text/javascript"> 
    9091                                    var hoteditor_path = "{$smarty.const.INCLUDES}jscripts/hoteditor-4.2/"; 
    9192                                    var hoteditor_theme_path = "{$smarty.const.THEME}hoteditor"; 
    9293                                </script> 
    93                                 <script language="javascript" type="text/javascript" src="{$smarty.const.INCLUDES}jscripts/hoteditor-4.2/editor.js?version=4.2"></script>                
     94                                <script language="javascript" type="text/javascript" src="{$smarty.const.INCLUDES}jscripts/hoteditor-4.2/editor__0001.js?version=4.2"></script>              
    9495                                {literal} 
    9596                                <script language="javascript" type="text/javascript"> 
    96                                     var getdata =""; 
    97                                     Instantiate("max","editor", getdata , "100%", "300px"); 
     97                                    var getdata = document.getElementById("message").value; 
     98                                    Instantiate("max","editor", getdata , "100%", "250px"); 
    9899                                     
    99100                                    //For Vietnamese User. Edit file editor.js to enable vietnamese keyboard 
     
    108109                                        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>"); 
    109110                                    } 
    110  
    111111                                    function get_hoteditor_data(){ 
    112112                                        setCodeOutput(); 
    113113                                        var bbcode_output=document.getElementById("hoteditor_bbcode_ouput_editor").value;//Output to BBCode 
    114114                                        document.getElementById("message").value = bbcode_output; 
    115                                         document.getElementById("preview_innerhtml").innerHTML=html_output; 
    116115                                    }                    
    117116                                </script> 
     
    120119                        </td> 
    121120                    </tr> 
     121                    {if $settings.hoteditor_enabled == 0 || $userdata.user_hoteditor == 0} 
    122122                    <tr> 
    123123                        <td align='right' width='145' valign='top' class='tbl2'> 
     
    128128                        </td> 
    129129                    </tr> 
     130                    {/if} 
    130131                    <tr> 
    131132                        <td align='right' width='145' valign='top' class='tbl2'> 
     
    137138                                <br /> 
    138139                            {/if} 
    139                             {if $opt_smileys} 
     140                            {if $opt_smileys && ($settings.hoteditor_enabled == 0 || $userdata.user_hoteditor == 0)} 
    140141                                <input type='checkbox' name='disable_smileys' value='1'{if $is_smileys_disabled} checked{/if} />{$locale.483} 
    141142                                <br /> 
     
    295296                {/if} 
    296297                <input type='submit' name='cancel' value='{$locale.417}' class='button' /> 
    297                 <input type='submit' name='preview' value='{$button_preview}' class='button' /> 
    298                 <input type='submit' name='save' value='{$button_save}' class='button' /> 
     298                <input type='submit' name='preview' value='{$button_preview}' class='button' onclick='javascript:get_hoteditor_data();' /> 
     299                <input type='submit' name='save' value='{$button_save}' class='button' onclick='javascript:get_hoteditor_data();' /> 
    299300                <input type='hidden' name='post_author' value='{$post_author}' /> 
    300301                <input type='hidden' name='random_id' value='{$random_id}' /> 
Note: See TracChangeset for help on using the changeset viewer.