HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Adjusting the line-height of text in the advanced editor

Hi all, I am using VF 3.3 and the Advanced Editor plugin (Created by Dane MacMillan•Version 1.8.1). My main issue is that I can't work out how to correct the double spacing/line-height to be normal instead of how it appears below in WYSWYG mode.

*OR* Alternatively, I much prefer the editor I am writing this message in, is that available to install?

Many thanks, I'm new to VF but really like the modern forum feel and hope I can use it on my project. Also looking forward to reactions and the other cool stuff coming in 4.x ... I hope it is production ready soon.

Many thanks all.


Comments

  • K17K17 Français / French Paris, France ✭✭✭

    Hi 😊

    The editor you're using here is called RichEditor. It is provided within the Vanilla package. So you should already have it.

    For the AdvancedEditor line height, it may be defined by CSS rules.

  • w1n55tw1n55t New
    edited February 11

    Many thanks for the reply. I Did try to use the rich editor plugin first, but when you load up a new discussion or reply, it briefly shows the text box and then it vanishes before you can write into it and post the discussion. I created a screen capture here to show what I see when I try to do it.

    https://streamable.com/x4sd02

    Any ideas on what could be going on with this???

  • As I recall, not having pretty URLs enabled could cause that

    https://open.vanillaforums.com/discussion/comment/220157/#Comment_220157

  • Thanks @Kaspar, I spent a while trying to get it work using the mod rewrite in .htaccess as defined in that post, but unfortunately I get exactly the same issue is this guy in another thread from 2019 has: https://open.vanillaforums.com/discussion/comment/256418/#Comment_256418


    I also tried the other suggestion of changing to PHP 7.3, that didn't help either.

  • Which theme do you use?

  • Keystone dark

  • R_JR_J Ex-Fanboy Munich Moderator

    @w1n55t you need to get pretty urls running. It's a requirement and you can never be sure what issues you might face in the future when you are starting without satisfying the requirements. Tell us what you tried and what is the error and we should try to fix it together.


    Not sure what you meant about your comment concerning PHP version 7.3. If you are still using you should upgrade anyway: https://www.php.net/eol.php


  • Many thanks @R_J, I almost have pretty URLs working. They work on the /discussions and /categories pages and the posts etc...

    But the homepage shows an error 'page not found. I think it is almost there, I have made conf/config.php change also.

    Here is what my .htaccess looks like, I am sure there's one thing wrong there that is causing the homepage not to be found and it might be more painfully obvious to you guys than me. Note as well that the base folder for my install is the root folder, not a subfolder like /forums or anything.

    Any advice here on what is wrong with the .htaccess below to get it working would be amazing.

    Thank you.

    # Original
    # If you modify this file then change the above line to: # Modified
    
    
    <IfModule mod_rewrite.c>
        RewriteEngine On
    
    
        ####
        # Certain hosts may require the following line.
        # If vanilla is in a subfolder then you need to specify it after the /.
        # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
        ####
        RewriteBase /
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
    
    
        # Make sure that / doesn't try to go to index.php without a rewrite :)
        DirectoryIndex disabled
    
    
        ####
        # Deny access to certain directories that SHOULD NOT be exposed.
        ####
        RewriteRule (^|/)\.git - [L,R=403]
        RewriteRule ^cache/ - [L,R=403]
        RewriteRule ^cgi-bin/ - [L,R=403]
        RewriteRule ^uploads/import/ - [L,R=403]
        RewriteRule ^vendor/ - [L,R=403]
    
    
        ####
        # Prevent access to any php script by redirecting the request to /index.php
        # You can add an exception by adding another RewriteCond after this one.
        # Example: RewriteCond %{REQUEST_URI} !^/yourscriptname.php$
        # You can comment out this section if it causes you problems.
        # This is just a nice to have for security purposes.
        ####
        RewriteCond %{REQUEST_URI} !/index.php$
        RewriteRule (.+\.php) [E=X_REWRITE:1,E=X_PATH_INFO:/$1,L]
    
    
        ####
        # Redirect any non existing file/directory to /index.php
        ####
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule (.*) index.php [E=X_REWRITE:1,E=X_PATH_INFO:/$1,L]
    
    
        ####
        # Add the proper X_REWRITE server variable for rewritten requests.
        ####
        RewriteCond %{ENV:REDIRECT_X_REWRITE} .+
        RewriteCond %{ENV:REDIRECT_X_PATH_INFO} (.+)
        RewriteRule ^index\.php - [E=X_REWRITE:1,E=!REDIRECT_X_REWRITE,E=X_PATH_INFO:%1,E=!REDIRECT_X_PATH_INFO,L]
    </IfModule>
    
    
    <IfModule mod_headers.c>
       <FilesMatch "(?<!embed)\.(css|js|woff|ttf|eot|svg|png|gif|jpeg|jpg|ico|swf)$">
          Header set Cache-Control "max-age=315360000"
          Header set Expires "31 December 2037 23:59:59 GMT"
       </FilesMatch>
    </IfModule>
    
    
    
  • R_JR_J Ex-Fanboy Munich Moderator

    In the past every now and then people had problems with the current htaccess. For all of them the really ancient version worked:


    <IfModule mod_rewrite.c>
       RewriteEngine On
       # Certain hosts may require the following line.
       # If vanilla is in a subfolder then you need to specify it after the /.
       # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
       RewriteBase /
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
    </IfModule>
    


    I would do the following: start with that short one and see if it works, I assume it will.

    Then add everything from the long version starting from "DirectoryIndex ..." to it and see if it still works.

    I'm sure we will get feedback from you if you don't succeed, but it would also be great if you are successful and you show us your final htaccess.


  • That's great @R_J Thank you so much man. As you guessed, using that code only it works! I didn't know that the rest was optional. As soon as I added the Directory Index line the homepage broke.... see the screenshot of the code on the left and what the homepage looks like on the right now with that line added.

        # Make sure that / doesn't try to go to index.php without a rewrite :)
        DirectoryIndex disabled
    


  • Then leave that out for now and test with the next section(s) 😀

  • Big thanks for your help guys, below is the final .htaccess that worked for me. The issue for me was the DirectoryIndex disabled line.

    I wonder if that is because I am using the forum at the domain level and not under a /forums level or otherwise.

    Anyway, in summary, for anyone else who has similar issues - this worked for me:

    # Modified
    # If you modify this file then change the above line to: # Modified
    
    
    <IfModule mod_rewrite.c>
       RewriteEngine On
       # Certain hosts may require the following line.
       # If vanilla is in a subfolder then you need to specify it after the /.
       # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
       RewriteBase /
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
    
    
        ####
        # Deny access to certain directories that SHOULD NOT be exposed.
        ####
        RewriteRule (^|/)\.git - [L,R=403]
        RewriteRule ^cache/ - [L,R=403]
        RewriteRule ^cgi-bin/ - [L,R=403]
        RewriteRule ^uploads/import/ - [L,R=403]
        RewriteRule ^vendor/ - [L,R=403]
    
    
    
    
        ####
        # Prevent access to any php script by redirecting the request to /index.php
        # You can add an exception by adding another RewriteCond after this one.
        # Example: RewriteCond %{REQUEST_URI} !^/yourscriptname.php$
        # You can comment out this section if it causes you problems.
        # This is just a nice to have for security purposes.
        ####
        RewriteCond %{REQUEST_URI} !/index.php$
        RewriteRule (.+\.php) [E=X_REWRITE:1,E=X_PATH_INFO:/$1,L]
    
    
        ####
        # Redirect any non existing file/directory to /index.php
        ####
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule (.*) index.php [E=X_REWRITE:1,E=X_PATH_INFO:/$1,L]
    
    
    
    
        ####
        # Add the proper X_REWRITE server variable for rewritten requests.
        ####
        RewriteCond %{ENV:REDIRECT_X_REWRITE} .+
        RewriteCond %{ENV:REDIRECT_X_PATH_INFO} (.+)
        RewriteRule ^index\.php - [E=X_REWRITE:1,E=!REDIRECT_X_REWRITE,E=X_PATH_INFO:%1,E=!REDIRECT_X_PATH_INFO,L]
    </IfModule>
    
    
    <IfModule mod_headers.c>
       <FilesMatch "(?<!embed)\.(css|js|woff|ttf|eot|svg|png|gif|jpeg|jpg|ico|swf)$">
          Header set Cache-Control "max-age=315360000"
          Header set Expires "31 December 2037 23:59:59 GMT"
       </FilesMatch>
    </IfModule>
    
    KasparR_J
  • R_JR_J Ex-Fanboy Munich Moderator

    Just out of curiosity: could you please insert the following block?

    <IfModule mod_dir.c>
       DirectoryIndex disabled
    </IfModule>
    



  • I have added that now. Not sure if it's doing what it's meant to, but it didn't break anything and the site works as expected.

    Here's the final code. Also, I can't change the thread name, but feel free to change it to something related to the rich editor issue which might make it easier to find if people are searching for a solution to the same issue.

    # Modified
    # If you modify this file then change the above line to: # Modified
    
    
    <IfModule mod_rewrite.c>
       RewriteEngine On
       # Certain hosts may require the following line.
       # If vanilla is in a subfolder then you need to specify it after the /.
       # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum)
       RewriteBase /
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]
    
    
        ####
        # Deny access to certain directories that SHOULD NOT be exposed.
        ####
        RewriteRule (^|/)\.git - [L,R=403]
        RewriteRule ^cache/ - [L,R=403]
        RewriteRule ^cgi-bin/ - [L,R=403]
        RewriteRule ^uploads/import/ - [L,R=403]
        RewriteRule ^vendor/ - [L,R=403]
    
    
        ####
        # Prevent access to any php script by redirecting the request to /index.php
        # You can add an exception by adding another RewriteCond after this one.
        # Example: RewriteCond %{REQUEST_URI} !^/yourscriptname.php$
        # You can comment out this section if it causes you problems.
        # This is just a nice to have for security purposes.
        ####
        RewriteCond %{REQUEST_URI} !/index.php$
        RewriteRule (.+\.php) [E=X_REWRITE:1,E=X_PATH_INFO:/$1,L]
    
    
        ####
        # Redirect any non existing file/directory to /index.php
        ####
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule (.*) index.php [E=X_REWRITE:1,E=X_PATH_INFO:/$1,L]
    
    
        ####
        # Add the proper X_REWRITE server variable for rewritten requests.
        ####
        RewriteCond %{ENV:REDIRECT_X_REWRITE} .+
        RewriteCond %{ENV:REDIRECT_X_PATH_INFO} (.+)
        RewriteRule ^index\.php - [E=X_REWRITE:1,E=!REDIRECT_X_REWRITE,E=X_PATH_INFO:%1,E=!REDIRECT_X_PATH_INFO,L]
    </IfModule>
    
    
    <IfModule mod_headers.c>
       <FilesMatch "(?<!embed)\.(css|js|woff|ttf|eot|svg|png|gif|jpeg|jpg|ico|swf)$">
          Header set Cache-Control "max-age=315360000"
          Header set Expires "31 December 2037 23:59:59 GMT"
       </FilesMatch>
    </IfModule>
    
    
    <IfModule mod_dir.c>
       DirectoryIndex disabled
    </IfModule>
    


  • R_JR_J Ex-Fanboy Munich Moderator

    You can remove it, it has no benefit for you. And since the .htaccess is parsed on every page access, you shouldn't bloat it when not needed.

    It just showed me that your server comes without the mod_dir which is very strange but will be a valuable information for helping people in the future who have problems like you had. My first suggestion will be to encapsulate the DirectoryIndex line with the if condition then.


    But for security reasons you might want to try Options -Indexes instead


    w1n55t
Sign In or Register to comment.