• [deleted]

  • Edited

meetdilip Thanks. That was caused by an issue with the server, which is now fixed. I've also had to recover the DB from a few days back, so you may need to reset your password again.

EDIT - Actually, I'm going to rebuild the server, so it'll be offline again shortly. I'll let you know when it's available again

    • [deleted]

    Hello @[deleted]
    How did you manage to change default font?

      • [deleted]

      • Edited

      [deleted] can you share basic CSS style/settings? I just want to change default font to Open Sans.

        • [deleted]

        [deleted] yep, sure. This is from my site - you can put this into the custom header

        <style>
        @font-face {
          font-family: 'Open Sans';
          font-style: normal;
          font-weight: 300;
          src: local('fontawesome'),
               url('/fonts/open-sans-v17-latin-300.woff2'),
               url('/fonts/open-sans-v17-latin-300.woff'); 
        }
        @font-face {
          font-family: 'Open Sans';
          font-style: normal;
          font-weight: 400;
          src: local('fontawesome'),
               url('/fonts/open-sans-v16-latin-regular.woff2'), 
               url('/fonts/open-sans-v16-latin-regular.woff');
        }
        @font-face {
          font-family: 'Open Sans';
          font-style: italic;
          font-weight: 400;
          src: local('fontawesome'),
               url('/fonts/open-sans-v16-latin-italic.woff2'), 
               url('/fonts/open-sans-v16-latin-italic.woff'); 
        }
        @font-face {
          font-family: 'Open Sans';
          font-style: normal;
          font-weight: 600;
          src: local('fontawesome'),
               url('/fonts/open-sans-v16-latin-600.woff2'),
               url('/fonts/open-sans-v16-latin-600.woff'); 
        }
        @font-face {
          font-family: 'Open Sans';
          font-style: italic;
          font-weight: 600;
          src: local('fontawesome'),
               url('/fonts/open-sans-v16-latin-600italic.woff2'),
               url('/fonts/open-sans-v16-latin-600italic.woff'); 
        }
        @font-face {
          font-family: 'Open Sans';
          font-style: normal;
          font-weight: 700;
          src: local('fontawesome'),
               url('/fonts/open-sans-v16-latin-700.woff2'), 
               url('/fonts/open-sans-v16-latin-700.woff');
        }
        </style>

        Note that I'm using a local path on my own server to provide this to save an extra trip to Google for the fonts. This site will help you host your own locally

        https://google-webfonts-helper.herokuapp.com/fonts

          • [deleted]

          Thanks, @[deleted]

          PageSpeed Insights says this:
          Consider using<link rel=preload>to prioritize fetching resources that are currently requested later in page load.

          How to acheive this?

            • [deleted]

            [deleted] You will probably be limited with that because of the way Flarum calls the relevant CSS file. Can you send a screenshot of the file being called ?

            • Kylo replied to this.

              [deleted] Just here to say while I'm passing by, you're so damn helpful everytime. Thanks for that!

                • [deleted]

                Kylo thanks ! I appreciate that

                8 days later
                • [deleted]

                Just circling back with an update - the forums at https://forum.phenomlab.com/ are now taking shape on their own - mostly thanks to two new scripts I have written that use the Flarum API. The first one ingests email, breaks each message apart, then creates a post out of it.

                This is handy if you're out and about, and are feeling creative. You compile the email, send it to a secured address (one that is not easily guessed or crawled), and let the script work it's magic.

                The second is an RSS parser. Phenomlab.com takes a number of technology news feeds and creates posts out of a standard RSS feed. We always provide attribution by including a link to the original article. The real difference here is that we actually discuss the topics rather than just be "force-fed" news.

                Of course, I'm keen to get the discussion juices flowing, so please feel free to sign up 🙂 I certainly have a lot to talk about when it comes to technology and security, and you never know, you may just enjoy it as much as I do !

                If anyone is interested in my scripts, do let me know, and I'll provide them here with instructions.

                  • [deleted]

                  • Edited

                  [deleted] I am really interested in the rss script 🙂 And i think lots of other people are also

                    • [deleted]

                    [deleted] great. That's the point of this post. I've been honing this for a while and whilst it's simple, it's also powerful in terms of what you can do with it.

                    It's important to know that seeing as RSS feeds vary in terms of update frequency, we need to keep a track of what has been processed and what hasn't. We achieve this with a simple database that sits outside of flarum. As each new item is processed, it's added to the database so that on subsequent runs, we do not process again hence avoiding duplicates. Each RSS item is then parsed, and if there is a URL match, it's skipped.

                    Obviously, if you process multiple feeds, you can still land up with some duplicates if you pull similar stories from multiple sources.

                      • [deleted]

                      [deleted] Alright that sounds interesting.

                      12 days later
                      • [deleted]

                      Another update !

                      We've got some great new topics and no longer just limited to security. Come over and take a look !

                        • [deleted]

                        • Edited

                        SezginYILDIRIM Yes, a small enhancement. Do you need the CSS ?

                        It's here

                        @media (min-width: 992px) {
                        .sideNav, .sideNav>ul {
                            width: 190px;
                            position: sticky;
                            top: 80px;
                        }
                        .sideNav>ul {
                            margin-top: 30px;
                        }
                        }

                        Bear in mind that you will likely need to change this to suit your environment - particularly the top and margin-top variables as this has been adapted for the various changes I made to my forum.