tipsandtricks

  • More
Timeline
Forum's Comments
  • One more way to invalidate all caches is to change revision number, you can try to do it as well in Studio > Developer > Revision number

    💓0 😆0 😲0 😥0 😠0 0
    • You can try to set background for mobile splash when you are setting splash with this command:

      npx react-native set-splash --platform android --path ./img/background.png --resize contain --background ""


      💓0 😆0 😲0 😥0 😠0 0
      • To allow other than images uploads in comments across the site (except discussions) run the following query:

        UPDATE `sys_objects_storage` SET `ext_allow` = 'jpg,jpeg,jpe,gif,png,pdf,zip' WHERE `object` = 'sys_cmts_images';

        In above example pdf and zip file types were added, but other extensions can be added there as well.

        Please note that preview is generated for image files only, video and audio files will not have preview.


        💓0 😆0 😲0 😥0 😠0 0
        • To add custom API endpoint to UNA, please create an empty module first, I think it's better to rename modules/boonex/api module to your own and delete or replace existing endpoints with yours. 

          To add custom endpoint - add service function, for example to add endpoint which get time you can add something like this:

          public function serviceClock() 
          {
              return ['time' => date('H:i:s')];
          }

          Then declare if you want to use this endpoint with authentication or not, for public endpoint add name of the endpoint to serviceGetPublicServices method:

          public function serviceGetPublicServices()
          {
              $a = parent::serviceGetPublicServices();
              return array_merge($a, array ('Clock' => ''));
          }

          for protected endpoint add it the same way but to serviceGetSafeServices method.

          After above you will be able to call your custom endpoint with the following URL:

          http://example.com/m/oauth2/com/clock?client_id=1234abcd&module=your_modulename

          You will get response in JSON format

          💓0 😆0 😲0 😥0 😠0 0
          • Hi ... by clicking     there are errors comming :-(

            Warning:  array_merge(): Expected parameter 2 to be an array, bool given in /home/unaio/public_html/modules/boonex/timeline/classes/BxTimelineTemplate.php on line 2566

            Notice: unserialize(): Error at offset 195 of 289 bytes in /home/unaio/public_html/modules/boonex/timeline/classes/BxTimelineTemplate.php on line 561

            Notice: unserialize(): Error at offset 195 of 289 bytes in /home/unaio/public_html/modules/boonex/timeline/classes/BxTimelineModule.php on line 4040

            Notice: unserialize(): Error at offset 195 of 289 bytes in /home/unaio/public_html/modules/boonex/timeline/classes/BxTimelineTemplate.php on line 2566

            Warning: array_merge(): Expected parameter 2 to be an array, bool given in /home/unaio/public_html/modules/boonex/timeline/classes/BxTimelineTemplate.php on line 2566

            💓0 😆0 😲0 😥0 😠0 0
            • I am using Rocketchat 2.3.2 which sadly does not have una connect within it.  I could create a custom oauth but have no idea how to fill out most of the fields.....but one thing at a time....I need to be able to open chat.mysite.com and it open mysite.com:3000 or https purposes

              Yes, you can use latest Rocket.Chat and use Custom OAuth, steps are the following:

              1.

              image_transcoder.php?o=bx_froala_image&h=2707&dpx=2&t=1577683413

              2.

              image_transcoder.php?o=bx_froala_image&h=2708&dpx=2&t=1577683427

              3.

              image_transcoder.php?o=bx_froala_image&h=2709&dpx=2&t=1577683437

              image_transcoder.php?o=bx_froala_image&h=2710&dpx=2&t=1577683449

              4. Activate 'Merge Users' setting

              I have done all that and it is not working

              💓0 😆0 😲0 😥0 😠0 0
              • 24h format can be enabled in calendar by adding calendar.html & calendar_compact.html files in your template with the following contents:

                for calendar.html:

                <div id="__id__"></div>
                <script>
                    var oDefaults = {
                            eventTimeFormat: {
                                hour12: false,
                                hour: 'numeric',
                                minute: '2-digit',
                                omitZeroMinute: true,
                                meridiem: false
                            },
                            headerToolbar: {
                                initialView: 'dayGridMonth',
                                left: 'prev,next today',
                                center: 'title',
                                right: 'dayGridDay,dayGridWeek,dayGridMonth' 
                            },
                            navLinks: true, // can click day/week names to navigate views
                    };
                    var oOptions = __options__;    
                    document.addEventListener('DOMContentLoaded', function() {
                        new FullCalendar.Calendar(document.getElementById('__id__'), $.extend({}, oDefaults, oOptions)).render();
                    });
                </script>

                for calendar_compact.html:

                <div id="__id__"></div>
                <script>
                    var oDefaults = {
                            eventTimeFormat: {
                                hour12: false,
                                hour: 'numeric',
                                minute: '2-digit',
                                omitZeroMinute: true,
                                meridiem: false
                            },
                            headerToolbar: {
                                initialView: 'dayGridMonth',
                                left: 'prev,next today',
                                center: 'title',
                                right: '' 
                            },
                            navLinks: true, // can click day/week names to navigate views
                    };
                    var oOptions = __options__;    
                    document.addEventListener('DOMContentLoaded', function() {
                        new FullCalendar.Calendar(document.getElementById('__id__'), $.extend({}, oDefaults, oOptions)).render();
                    });
                </script>

                💓0 😆0 😲0 😥0 😠0 0
                • Hello JPa !

                  When it's better to post the content as "public" but use the hashtags there. Like we have here .

                  💓0 😆0 😲0 😥0 😠0 0
                  • Hello KinkyC.com !

                    The channel is created automatically if you post something with the hashtag. Like here.

                    I have test it but under the Timline and channels is nothing


                    💓0 😆0 😲0 😥0 😠0 0
                    • Hello KinkyC.com !

                      The channel is created automatically if you post something with the hashtag. Like here.


                      💓0 😆0 😲0 😥0 😠0 0

                      One more way to invalidate all caches is to change revision number, you can try to do it as well in Studio > Developer > Revision number

                      • 3

                      You can try to update Rocket.Chat settings directly in DB

                      1) login to your server via SSH

                      2) run the following command, so mongodb shell will be opened:

                      mongo

                      3) select current DB in the opened shell, the default db name is "rocketchat":

                      use rocketchat;

                      4) run the following queries to update settings, make sure to replace FULL-URL-TO-UNA-SITE (starting with http:// or https://), YOUR-KEY & YOUR-SECRET with your actual values

                      db.rocketchat_settings.update({"_id": "Accounts_OAuth_UNA_URL"}, { $set: {"value": "FULL-URL-TO-UNA-SITE", "meteorSettingsValue": "FULL-URL-TO-UNA-SITE"}});
                      db.rocketchat_settings.update({"_id": "Accounts_OAuth_UNA_id"}, { $set: {"value": "YOUR-KEY", "meteorSettingsValue": "YOUR-KEY"}});
                      db.rocketchat_settings.update({"_id": "Accounts_OAuth_UNA_secret"}, { $set: {"value": "YOUR-SECRET", "meteorSettingsValue": "YOUR-SECRET"}});

                      As the result you should see something like this: "WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })"

                      It maybe Rocket.Chat restart will be required.

                      • 7

                      You can try to set background for mobile splash when you are setting splash with this command:

                      npx react-native set-splash --platform android --path ./img/background.png --resize contain --background ""


                      • 11

                      To allow other than images uploads in comments across the site (except discussions) run the following query:

                      UPDATE `sys_objects_storage` SET `ext_allow` = 'jpg,jpeg,jpe,gif,png,pdf,zip' WHERE `object` = 'sys_cmts_images';

                      In above example pdf and zip file types were added, but other extensions can be added there as well.

                      Please note that preview is generated for image files only, video and audio files will not have preview.


                      • 57
                      Added a discussion  to  , tipsandtricks

                      There are several factors affecting your page speed. Some of them can be improved by tweaking some settings.

                      First of all we need to use the profiler app to analyze the problems. The profiler app gives us a lot of detailed information about the UNA pages.

                      When you see the details you will notice that there may be something to improve the page speed.

                      If you are having a lot of content for the visitors of your site in the home page, One important and may be less used method could be separating the homepages for members and visitors.
                      When you have the same home page and use the visibility options to show selected blocks to unauthenticated visitors and others to logged in members in fact the page is loading all. So if you have a lot of content in the visitors blocks this will still grap some important amount of time of the page loads for logged in members.
                      Lets go on real world examples:
                      I have 100 medical articles on the visitors index and this block is not shown to the logged in members. When I disable this block it saved me like 2 seconds from the total 5 seconds of server processing time reported by profiler.
                      So I created another home page for unauthenticated site visitors, put this block there. Logged in home page became lighter and dropped to 3 seconds for server proccessing.

                      As Alex explained I retested the above mentioned invisible block effect on loading times and yes it didnt effect the loading times.

                      Another issue I found with the help of profiler app was again releated to the  new posts galery view block which I locete on the right column of the page, it was showing only one new post (blog) and with the arrows you may see the others one by one. (I realized that this block was also loading the 100 blogs due to the settings to show how many blogs in different situations. So I disabled this block. And woooow see the results before and after:

                      zfjsupv4r4ek44fe2dkajgwctzusr4vy.pngjackazymqvpg7qjh9epctt7e4uxjf4fw.png

                      Also notice that all the active modules are loaded they create mysql queries etc. so disable any module you dont use. Any block you left unused and invisible delete.

                      (Compare the query number of each measurement)
                      Now the logged in home page is loaded in less then 1 second :)


                      • 1340
                        • Any good triсs to score homepage after login? Cem 

                          💓0 😆0 😲0 😥0 😠0 0
                          • all above are for logged in homepage Rocco

                            💓0 😆0 😲0 😥0 😠0 0
                            • Hi ... by clicking     there are errors comming :-(

                              Warning:  array_merge(): Expected parameter 2 to be an array, bool given in /home/unaio/public_html/modules/boonex/timeline/classes/BxTimelineTemplate.php on line 2566

                              Notice: unserialize(): Error at offset 195 of 289 bytes in /home/unaio/public_html/modules/boonex/timeline/classes/BxTimelineTemplate.php on line 561

                              Notice: unserialize(): Error at offset 195 of 289 bytes in /home/unaio/public_html/modules/boonex/timeline/classes/BxTimelineModule.php on line 4040

                              Notice: unserialize(): Error at offset 195 of 289 bytes in /home/unaio/public_html/modules/boonex/timeline/classes/BxTimelineTemplate.php on line 2566

                              Warning: array_merge(): Expected parameter 2 to be an array, bool given in /home/unaio/public_html/modules/boonex/timeline/classes/BxTimelineTemplate.php on line 2566

                              💓0 😆0 😲0 😥0 😠0 0
                              Not logged in users can't 'Comments Post'.

                              UNA - Network Infrastructure for Communities

                              Close