Ignore:
Timestamp:
12/03/08 17:29:31 (3 years ago)
Author:
WanWizard
Message:

added bbcode editor and bbcode parsing for download and download category descriptions
fixed a few relative link issues in the news main module

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/templates/admin.downloads.tpl

    r2035 r2089  
    3535                    </td> 
    3636                    <td class='tbl'> 
    37                         <textarea name='download_description' rows='5' cols='80' class='textbox' style='width:400px;'>{$download_description}</textarea> 
    38                     </td> 
    39                 </tr> 
    40                 <tr> 
    41                     <td width='1%' class='tbl' style='white-space:nowrap'> 
    42                     </td> 
    43                     <td class='tbl'> 
    44                         <input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onclick="addText('download_description', '<b>', '</b>');" /> 
    45                         <input type='button' value='i' class='button' style='font-style:italic;width:25px;' onclick="addText('download_description', '<i>', '</i>');" /> 
    46                         <input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onclick="addText('download_description', '<u>', '</u>');" /> 
    47                         <input type='button' value='ul' class='button' style='width:25px;' onclick="addText('download_description', '<ul>', '</ul>');" /> 
    48                         <input type='button' value='li' class='button' style='width:25px;' onclick="addText('download_description', '<li>', '</li>');" /> 
    49                         <input type='button' value='link' class='button' style='width:35px' onclick="addText('download_description', '<a href=\'', '\' target=\'_blank\'>Link</a>');" /> 
    50                         <input type='button' value='img' class='button' style='width:35px' onclick="addText('download_description', '<img src=\'', '\' style=\'margin:5px\' align=\'left\'>');" /> 
    51                         <input type='button' value='center' class='button' style='width:45px' onclick="addText('download_description', '<center>', '</center>');" /> 
    52                         <input type='button' value='small' class='button' style='width:40px' onclick="addText('download_description', '<span class=\'small\'>', '</span>');" /> 
    53                         <input type='button' value='small2' class='button' style='width:45px' onclick="addText('download_description', '<span class=\'small2\'>', '</span>');" /> 
    54                         <input type='button' value='alt' class='button' style='width:25px' onclick="addText('download_description', '<span class=\'alt\'>', '</span>');" /> 
    55                         <br /> 
     37                        {if $settings.hoteditor_enabled == 0 || $userdata.user_hoteditor == 0} 
     38                            <textarea name='download_description' rows='5' cols='80' class='textbox' style='width:400px'>{$download_description}</textarea><br /> 
     39                            <input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onclick="addText('download_description', '[b]', '[/b]');" /> 
     40                            <input type='button' value='i' class='button' style='font-style:italic;width:25px;' onclick="addText('download_description', '[i]', '[/i]');" /> 
     41                            <input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onclick="addText('download_description', '[u]', '[/u]');" /> 
     42                            <input type='button' value='url' class='button' style='width:30px;' onclick="addText('download_description', '[url]', '[/url]');" /> 
     43                            <input type='button' value='mail' class='button' style='width:35px;' onclick="addText('download_description', '[mail]', '[/mail]');" /> 
     44                            <input type='button' value='img' class='button' style='width:30px;' onclick="addText('download_description', '[img]', '[/img]');" /> 
     45                            <input type='button' value='center' class='button' style='width:45px;' onclick="addText('download_description', '[center]', '[/center]');" /> 
     46                            <input type='button' value='small' class='button' style='width:40px;' onclick="addText('download_description', '[small]', '[/small]');" /> 
     47                            <br /> 
     48                        {else} 
     49                            <script language="javascript" type="text/javascript"> 
     50                                // non-standard toolbars for this editor instance 
     51                                var toolbar1 ="SPACE,btFont_Name,btFont_Size,btFont_Color,btHighlight"; 
     52                                var toolbar2 ="SPACE,btRemove_Format,SPACE,btBold,btItalic,btUnderline,SPACE,btAlign_Left,btCenter,btAlign_Right,SPACE,btStrikethrough,btSubscript,btSuperscript,btHorizontal"; 
     53                                var toolbar3 ="SPACE,btHyperlink,btHyperlink_Email,btInsert_Image,btEmotions"; 
     54 
     55                                var textarea_toolbar1 ="SPACE,btFont_Name,btFont_Size,btFont_Color,btHighlight"; 
     56                                var textarea_toolbar2 ="SPACE,btRemove_Format,SPACE,btBold,btItalic,btUnderline,SPACE,btAlign_Left,btCenter,btAlign_Right,SPACE,btStrikethrough,btSubscript,btSuperscript,btHorizontal"; 
     57                                var textarea_toolbar3 ="SPACE,btHyperlink,btHyperlink_Email,btInsert_Image,btEmotions"; 
     58                            </script> 
     59                            {include file="_bbcode_editor.tpl" name="download_description" id="download_description" author="" message=$download_description width="400px" height="200px"} 
     60                        {/if} 
    5661                    </td> 
    5762                </tr> 
     
    143148                            <br /><br /> 
    144149                        {/if} 
    145                         <input type='submit' name='save_download' value='{$locale.488}' class='button' /> 
     150                        {if $settings.hoteditor_enabled == 0 || $userdata.user_hoteditor == 0} 
     151                            <input type='submit' name='save_download' value='{$locale.488}' class='button' /> 
     152                        {else} 
     153                            <input type='submit' name='save_download' value='{$locale.488}' class='button' onclick='javascript:get_hoteditor_data("download_description");' /> 
     154                        {/if} 
    146155                    </td> 
    147156                </tr> 
Note: See TracChangeset for help on using the changeset viewer.