Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: User2 on January 20, 2023, 09:21:19 AM

Title: SMF 2.1. How can I increase the height of the field that is used to create post.
Post by: User2 on January 20, 2023, 09:21:19 AM
SMF 2.1.3.
How can I increase the height of the field that is used to create and edit a post?
Not manually, but so that after the appearance of the form, there was immediately a large height.
Title: Re: SMF 2.1. How can I increase the height of the field that is used to create post.
Post by: Diego Andrés on January 20, 2023, 09:51:02 AM
It's hardcoded.
I made a mod for it too: https://custom.simplemachines.org/index.php?mod=4332
Title: Re: SMF 2.1. How can I increase the height of the field that is used to create post.
Post by: User2 on January 20, 2023, 02:43:28 PM
No, this mod does not do what is written in the first post.
The following is needed: when the user enters the editor (when creating a post or when editing a post), the editor must have the desired height.
When using your mod, after entering the editor, the editor has a standard height.
Title: Re: SMF 2.1. How can I increase the height of the field that is used to create post.
Post by: Kindred on January 20, 2023, 02:45:27 PM
what, EXACTLY, do you mean by "the desired height" and "a standard height"?

Title: Re: SMF 2.1. How can I increase the height of the field that is used to create post.
Post by: Diego Andrés on January 20, 2023, 02:46:38 PM
It does do that if you enable the infinite height option.
Title: Re: SMF 2.1. How can I increase the height of the field that is used to create post.
Post by: User2 on January 20, 2023, 02:50:05 PM
Diego Andrés, this check mark allows you to increase the height of the editor indefinitely.
I need the height to be done automatically without the participation of the visitor.
Title: Re: SMF 2.1. How can I increase the height of the field that is used to create post.
Post by: Sesquipedalian on January 20, 2023, 04:06:02 PM
Just change the two occurrences of "175px" in these lines (https://github.com/SimpleMachines/SMF/blob/5bc137dabe88aada50f2b450957f169e058f224a/Themes/default/css/jquery.sceditor.css#L199-L219) in jquery.sceditor.css.

You should be aware that there is currently an open pull request (https://github.com/SimpleMachines/SMF/pull/7676) that will change these lines when merged. So if you change these lines manually now, you will need to revert your changes before you apply the next SMF patch.
Title: Re: SMF 2.1. How can I increase the height of the field that is used to create post.
Post by: User2 on January 21, 2023, 12:56:15 PM
Quote from: Sesquipedalian on January 20, 2023, 04:06:02 PMSo if you change these lines manually now, you will need to revert your changes before you apply the next SMF patch.
If I don't undo these changes, what will happen when installing the SMF patch?
Title: Re: SMF 2.1. How can I increase the height of the field that is used to create post.
Post by: Doug Heffernan on January 21, 2023, 01:05:40 PM
Quote from: Participant on January 21, 2023, 12:56:15 PMIf I don't undo these changes, what will happen when installing the SMF patch?

Most likely you will get error warnings for the aforementioned files.
Title: Re: SMF 2.1. How can I increase the height of the field that is used to create post.
Post by: User2 on January 22, 2023, 01:46:55 AM
Diego Andrés, hello, will you add to your mod so that the height of the editor increases automatically when the user enters the editor?
Title: Re: SMF 2.1. How can I increase the height of the field that is used to create post.
Post by: Diego Andrés on January 22, 2023, 08:19:21 AM
Quote from: Participant on January 22, 2023, 01:46:55 AMDiego Andrés, hello, will you add to your mod so that the height of the editor increases automatically when the user enters the editor?

No