The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

posting_body and SCEditor customization

View previous topic View next topic Go down

Solved posting_body and SCEditor customization

Post by KpuCk0 on September 29th 2015, 12:36 pm

Hello from me again, I had some troubles when I tried to edit my posting_body.
I want to remove the "Insert unformated text" button and also I want to fix the size of the SCEditor without possibility of resizing.

This screenshot can help you to understand my request(?): https://i21.servimg.com/u/f21/19/32/54/18/hdysik10.png

Yeah, I have a lot of modifications on my posting_body:
Click to see KpuCk0's posting_body:
Code:
<script src="{JS_DIR}extendedview.js" type="text/javascript"></script>

<!-- BEGIN privmsg_extensions -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
   <tr>
      <td align="center" valign="top" width="100%">
         <table border="0" cellspacing="2" cellpadding="0" height="40">
            <tr valign="middle">
               <td>{INBOX_IMG}</td>
               <td><span class="cattitle">{INBOX_LINK}</span></td>
               <td>{SENTBOX_IMG}</td>
               <td><span class="cattitle">{SENTBOX_LINK}</span></td>
               <td>{OUTBOX_IMG}</td>
               <td><span class="cattitle">{OUTBOX_LINK}</span></td>
               <td>{SAVEBOX_IMG}</td>
               <td><span class="cattitle">{SAVEBOX_LINK}</span></td>
            </tr>
         </table>
      </td>
   </tr>
</table>
<br clear="all" />
<!-- END privmsg_extensions -->

{POST_PREVIEW_BOX}{ERROR_BOX}

<form action="{S_POST_ACTION}" method="post" name="post" enctype="multipart/form-data">
   <table width="100%" border="0" cellspacing="2" cellpadding="0" align="center">
      <tr><td><span class="nav"><a class="nav" href="{U_INDEX}">{L_INDEX}</a>&nbsp;<!-- BEGIN switch_not_privmsg -->{NAV_CAT_DESC}<!-- END switch_not_privmsg --></span></td></tr>
   </table>
   
   <!-- BEGIN switch_forum_rules -->
   <table id="forum_rules" class="forumline" width="100%" border="0" cellspacing="0" cellpadding="0" style="margin: 1px 0px 1px 0px">
      <tbody>
         <tr>
            <td class="catBottom">
               <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tbody>
                     <tr>
                        <td valign="top">
                           <h1 class="cattitle">&nbsp;{L_FORUM_RULES}</h1>
                        </td>
                     </tr>
                  </tbody>
               </table>
            </td>
         </tr>
         <tr>
            <td class="row1 clearfix">
               <table>
                  <tr>
                     <!-- BEGIN switch_forum_rule_image -->
                     <td class="logo">
                        <img src="{RULE_IMG_URL}" />
                     </td>
                     <!-- END switch_forum_rule_image -->
                     <td class="rules postbody">
                        {RULE_MSG}
                     </td>
                  </tr>
               </table>
            </td>
         </tr>
      </tbody>
   </table>
   <!-- END switch_forum_rules -->
   
   <table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
      <tr>
      </tr>
      <!-- BEGIN switch_username_select -->
      <tr>
         <td class="row1" width="22%"><span class="gen"><b>{L_USERNAME}</b></span></td>
         <td class="row2" width="78%"><span class="genmed"><input class="post" type="text" name="username"  maxlength="25" value="{USERNAME}" size="25" tabindex="1" /></span></td>
      </tr>
      <!-- END switch_username_select -->
      
      <!-- BEGIN switch_reasons -->
      <tr>
         <td class="row1" width="22%"><span class="gen"><b>{L_REASON}</b></span></td>
         <td class="row2" width="78%"><span class="genmed">{REASON}</span></td>
      </tr>
      <!-- END switch_reasons -->

      <!-- BEGIN switch_privmsg -->
      <tr>
         <td class="row1" width="22%"><span class="gen"><b>{L_USERNAME}</b></span></td>
         <td class="row2" width="78%">
            <span class="genmed">
               <!-- BEGIN switch_username -->
               <input class="post" style="margin:1px 0" type="text" name="username[]" value="{switch_privmsg.switch_username.USERNAME}" size="25" /><br />
               <!-- END switch_username -->
               <input class="post" style="margin:1px 0" type="text" id="username" name="username[]" value="{USERNAME}" size="25" tabindex="1" />&nbsp;
               <img id="add_username" src="{ADD_USERNAME_IMG}" class="selectHover" alt="" />&nbsp;
               <input class="liteoption" type="button" id="find_user" value="{L_FIND_USERNAME}" />
            </span>
         </td>
      </tr>
      <!-- BEGIN switch_privmsg_friend -->
      <tr>
         <td class="row1" width="22%"><span class="gen"><b>{switch_privmsg.switch_privmsg_friend.L_OR_FRIEND}</b></span></td>
         <td class="row2" width="78%">{switch_privmsg.switch_privmsg_friend.FRIEND_PM}</td>
      </tr>
      <!-- END switch_privmsg_friend -->
      <!-- BEGIN switch_privmsg_group -->
      <tr>
      <td class="row1" width="22%"><span class="gen"><b>{switch_privmsg.switch_privmsg_group.L_OR_GROUP}</b></span></td>
      <td class="row2" width="78%">{switch_privmsg.switch_privmsg_group.MASS_PM}<input type="button" value="  ?  " title="{switch_privmsg.switch_privmsg_group.MASS_PM_EXPLAIN}" class="button2" /></td>
      </tr>
      <!-- END switch_privmsg_group -->
      <!-- END switch_privmsg -->

      <!-- BEGIN switch_groupmsg -->
      <tr>
         <td class="row1" width="22%"><span class="gen"><b>{L_USERNAME}</b></span></td>
         <td class="row2" width="78%"><span class="genmed">{USERNAME}</span></td>
      </tr>
      <!-- END switch_groupmsg -->

      <!-- BEGIN switch_subject -->
      <tr>
      <td class="row1" width="22%"><span class="gen"><b>{L_SUBJECT}</b></span></td>
      <td class="row2" width="78%">
         <span class="gen">
            <input class="post" style="width:450px" type="text" name="subject" value="{SUBJECT}" size="45" maxlength="{TOPIC_TITLE_MAXLENGTH}" tabindex="2" title="{TOPIC_TITLE_LENGTH_EXPLAIN}" onkeypress="if (event.keyCode==13){return false}" />
         </span>
      </td>
      </tr>
      <!-- END switch_subject -->
         
      <tr id="parent_editor_simple" {EDITOR_DISPLAY_SIMPLE}>
      <td class="row1" valign="top">
            <table width="100%" border="0" cellspacing="0" cellpadding="1">
               <tr>
                  <td><span class="gen" style="white-space: nowrap;"><b>{L_MESSAGE_BODY}</b></span></td>
               </tr>
               <tr>
                  <td align="center" valign="middle">
                                                    <table width="100%" border="0" cellspacing="0" cellpadding="5">
                                                        <tr align="center">
                     <td class="gensmall" colspan="{S_SMILIES_COLSPAN}">
                        <div id="smileyContainer">
                        {L_SMILIES_PREVIEW_NEW}
                        </div>
                     </td>
                  </tr>
                  </table>
                  </td>
               </tr>
            </table>
         </td>
         <td class="row2" valign="top"><span class="genmed"></span>
            <table border="0" cellspacing="0" cellpadding="0" width="100%">
               <tr>
                  <td valign="top">
                  <textarea id="text_editor_textarea" class="post" name="message" height="100%">{MESSAGE}</textarea>&nbsp;
                  </td>
                  <td id="smileyContainer" valign="top">
                     {L_SMILIES_PREVIEW_NEW}
                  </td>
               </tr>
            </table>
         </td>
      </tr>
      <!-- BEGIN edit_reason -->
      <tr>
         <td class="row1" width="22%"><span class="gen"><strong>{edit_reason.L_EDIT_REASON}</strong></span></td>
         <td class="row2" width="78%"><span class="gen"><input class="post" style="width:450px" type="text" name="edit_reason" value="{edit_reason.EDIT_REASON}" maxlength="255" /></span></td>
      </tr>
      <!-- END edit_reason -->
      {CODE_CONFIRM}
   </table>
  <br/>
   <table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
      <tr>
            <div align="center"><input type="hidden" name="lt" value="{LAST_TOPIC_ID}" />
            {S_HIDDEN_FORM_FIELDS}
            <!-- BEGIN switch_preview -->
            <input class="liteoption" type="submit" name="preview" value="Преглед" tabindex="5" />&nbsp;
            <!-- END switch_preview -->
            <!-- BEGIN switch_draft -->
            &nbsp;<input class="liteoption" type="submit" name="draft" value="{L_DRAFT}" tabindex="7" accesskey="d" />&nbsp;
            <!-- END switch_draft -->
            <!-- BEGIN switch_publish -->
            &nbsp;<input class="liteoption" type="submit" name="publish" value="{L_PUBLISH}" tabindex="8" accesskey="p" />&nbsp;
            <!-- END switch_publish -->
            &nbsp;<input class="mainoption" type="submit" name="post" value="Изпрати" tabindex="6" accesskey="s" /></div>
      </tr>
   </table>
  <br/>
<div id="optionsitems_show" style="display:{OPTIONSITEMS_OPEN}">
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr><th class="thHead" colspan="2">
<table width="100%"><tr>
<td width="10"></td><td align="center"><span class="gen"><b>{L_OPTIONS}</b></span></td>
</tr></table>
</th></tr>
            <!-- BEGIN switch_type_toggle -->
            <tr>
               <td></td>
               <td align="center"><span class="gen">{S_TYPE_TOGGLE}</span></td>
            </tr>
            <!-- END switch_type_toggle -->
</table>
</div>
<!-- BEGIN switch_type_cal -->
<div id="calendaritems" style="display:{CALENDARITEMS_CLOSE}">
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr><th class="thHead">
<table width="100%"><tr>
<td width="10"></td><td align="center"><span class="gen"><b>{L_CALENDAR}</b></span></td><td width="10"><a href="javascript:ShowHideLayernew('calendaritems')"><img src="{TABS_MORE_IMG}" alt="+" align="middle" border="0" /></a></td>
</tr></table>
</th></tr>
</table>
</div>
<div id="calendaritems_show" style="display:{CALENDARITEMS_OPEN}">
<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr><th class="thHead" colspan="2">
<table width="100%"><tr>
<td width="10"></td><td align="center"><span class="gen"><b>{L_CALENDAR}</b></span></td><td width="10"><a href="javascript:ShowHideLayernew('calendaritems')"><img src="{TABS_LESS_IMG}" alt="-" align="middle" border="0" /></a></td>
</tr></table>
</th></tr>
<tr><td class="row1" width="22%"><span class="gen"><b>{L_CALENDAR_TITLE}&nbsp;:</b></span></td>
<td class="row2" width="78%"><span class="genmed">
{S_CALENDAR_DAY}{S_CALENDAR_MONTH}{S_CALENDAR_YEAR}&nbsp;
<a href="javascript:void(0)" name="#" class="genmed" style="font-style:normal;font-weight:normal" onclick="document.post.topic_calendar_day.value={TODAY_DAY};document.post.topic_calendar_month.value={TODAY_MONTH};document.post.topic_calendar_year.value={TODAY_YEAR}">{L_TODAY}</a>
</span>
</td>
</tr>
<tr>
<td class="row1"><span class="gen"><b>{L_TIME}&nbsp;:</b></span></td>
<td class="row2"><span class="genmed">
<input name="topic_calendar_hour" type="post" maxlength="2" size="3" value="{CALENDAR_HOUR}" class="post" />&nbsp;{L_HOURS}&nbsp;&nbsp;
<input name="topic_calendar_min" type="post" maxlength="2" size="3" value="{CALENDAR_MIN}" class="post" />&nbsp;{L_MINUTES}
</span>
</td>
</tr>
<tr>
<td class="row1"><span class="gen"><b>{L_CALENDAR_DURATION}&nbsp;:</b></span></td>
<td class="row2">
<span class="genmed">
<input name="topic_calendar_duration_day" type="post" maxlength="5" size="3" value="{CALENDAR_DURATION_DAY}" class="post" />&nbsp;{L_DAYS}&nbsp;&nbsp;
<input name="topic_calendar_duration_hour" type="post" maxlength="5" size="3" value="{CALENDAR_DURATION_HOUR}" class="post" />&nbsp;{L_HOURS}&nbsp;&nbsp;
<input name="topic_calendar_duration_min" type="post" maxlength="5" size="3" value="{CALENDAR_DURATION_MIN}" class="post" />&nbsp;{L_MINUTES}
<input name="create_event" type="hidden" value="{CREATE_EVENT}" />
<input name="calendar_d" type="hidden" value="{CALENDAR_D}" />
</span>
</td>
</tr>
</table>
</div>
<!-- END switch_type_cal -->
{POLLBOX}

<!-- BEGIN switch_display_menus -->
<script type="text/javascript">
//<![CDATA[
ShowHideLayernew('rolldice');
ShowHideLayernew('optionsitems');
ShowHideLayernew('calendaritems');
ShowHideLayernew('pollitems');
//]]>
</script>
<!-- END switch_display_menus -->

</form>
{TOPIC_REVIEW_BOX}

<!-- BEGIN switch_privmsg -->
<div id="find_username" class="jqmWindow"></div>

<script src="{JS_DIR}jquery/jqmodal/jqmodal.js" type="text/javascript"></script>
<!-- END switch_privmsg -->
<script type="text/javascript">
//<![CDATA[
$(function(){
<!-- BEGIN switch_privmsg -->
   privmsg_add_username('{U_SEARCH_USER}', '<br /><span class="genmed"><input class="post" style="margin:1px 0" type="text" name="username[]" size="25" /></span>');
<!-- END switch_privmsg -->
<!-- BEGIN switch_image_resize -->
    resize_images({ 'selector' : '.postbody', 'max_width' : {switch_image_resize.IMG_RESIZE_WIDTH}, 'max_height' : {switch_image_resize.IMG_RESIZE_HEIGHT} });
<!-- END switch_image_resize -->
});
//]]>
</script>
{SCEDITOR}

And this CSS
Code:
/* SC Editor Buttons*/
.sceditor-button-justify, .sceditor-button-code, .sceditor-button-fahide, .sceditor-button-table, .sceditor-button-headers, .sceditor-button-removeformat, .sceditor-button-more, .sceditor-button-source, .sceditor-button-date, .sceditor-button-time, .sceditor-button-dailymotion, .sceditor-button-flash, .sceditor-button-unformat { display:none !important; }
div.sceditor-group {
    border-radius: 0px !important;
    margin: 0px 0px 0px 0px !important;}

/* SC Editor Color*/
.sceditor-container iframe, .sceditor-container textarea {
  color: #FFFFFF !important;}

.sceditor-container iframe, .sceditor-container textarea {
    background-color: #2E2E2E !important;
    border: 0px !important;}

.sceditor-container {
    border-radius: 0px !important;}

My forum URL is http://lfszone.com , but I work on my test forum.


Last edited by KpuCk0 on October 1st 2015, 9:58 pm; edited 2 times in total

KpuCk0
Graphic Designer
Graphic Designer

Male Posts : 785
Reputation : 155
Language : Bulgarian, English
Location : Bulgaria

http://www.lfszone.com

Back to top Go down

Solved Re: posting_body and SCEditor customization

Post by KpuCk0 on September 30th 2015, 2:04 pm

Anyone help?


Design Team Leader


Rules of the Graphic Design Section || Becoming a Designer || Graphic Requests

Never tell your password to anyone!
No help without your forum URL!
No support via PM!

KpuCk0
Graphic Designer
Graphic Designer

Male Posts : 785
Reputation : 155
Language : Bulgarian, English
Location : Bulgaria

http://www.lfszone.com

Back to top Go down

Solved Re: posting_body and SCEditor customization

Post by KpuCk0 on October 1st 2015, 6:46 pm

Anyone, help me?


Design Team Leader


Rules of the Graphic Design Section || Becoming a Designer || Graphic Requests

Never tell your password to anyone!
No help without your forum URL!
No support via PM!

KpuCk0
Graphic Designer
Graphic Designer

Male Posts : 785
Reputation : 155
Language : Bulgarian, English
Location : Bulgaria

http://www.lfszone.com

Back to top Go down

Solved Re: posting_body and SCEditor customization

Post by Ange Tuteur on October 1st 2015, 8:24 pm

Hi @KpuCk0,

Sorry for the late reply. You can hide that button with the following CSS :
Code:
.sceditor-button-pastetext {
  display:none
}

I think you want to adjust the height, right ? You should be able to do that through JS. Go to Modules > JS codes management and create a new script in all the pages :
Code:
/\/post/.test(window.location.href) && $(function() {
  if (height) height = 450;
});

450 is equal to 450 pixels.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: posting_body and SCEditor customization

Post by KpuCk0 on October 1st 2015, 8:56 pm

Thank you, Ange!This is totally what I want.I have one more question for this thread.How I can fix the width and height of emoticons box, this is what I have now http://prntscr.com/8mn41m


Design Team Leader


Rules of the Graphic Design Section || Becoming a Designer || Graphic Requests

Never tell your password to anyone!
No help without your forum URL!
No support via PM!

KpuCk0
Graphic Designer
Graphic Designer

Male Posts : 785
Reputation : 155
Language : Bulgarian, English
Location : Bulgaria

http://www.lfszone.com

Back to top Go down

Solved Re: posting_body and SCEditor customization

Post by Ange Tuteur on October 1st 2015, 9:06 pm

Here, you can adjust the smiley frame with this CSS rule :
Code:
#smileyContainer iframe {
  width:250px !important;
  height:400px !important;
}

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: posting_body and SCEditor customization

Post by KpuCk0 on October 1st 2015, 9:57 pm

Many, many thanks!You are fantastic, @Ange Tuteur


Design Team Leader


Rules of the Graphic Design Section || Becoming a Designer || Graphic Requests

Never tell your password to anyone!
No help without your forum URL!
No support via PM!

KpuCk0
Graphic Designer
Graphic Designer

Male Posts : 785
Reputation : 155
Language : Bulgarian, English
Location : Bulgaria

http://www.lfszone.com

Back to top Go down

Solved Re: posting_body and SCEditor customization

Post by Ange Tuteur on October 1st 2015, 10:30 pm

You're welcome ^^

Topic archived

Have a great day. Smile

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum