Group activity

  • Thiago Reis added a new discussion topic How to Embed Videos in Posts? Version Elgg: 6.1.2
    Hello, I am trying to insert videos using Elgg's default editor, CKEditor. However, when I insert the video, it only saves on the backend and does not appear on the frontend. I cannot embed the videos because there is a restriction on...
    • The oEmbed plugin solved the issue of inserting videos and adjusting the layout. When inserting the link, it must not have any formatting.

      There’s only a small difference in the video layout depending on the link format. For example:

      https://www.youtube.com/watch?v=vE26dVkCvpw  
      https://youtu.be/vE26dVkCvpw?si=qBS0Sou_DYqD8TGI  
      

      One video appears larger than the other. I know this is a minor issue, but for the sake of standardization, I’ll run some tests and get back to you soon.

      When pasting the link (without formatting) into the editor, it doesn’t convert in the backend (which is fine); it’s only rendered on the frontend. I’ll run some tests with adjustments in the file:

      /vendor/elgg/elgg/mod/ckeditor/views/default/ckeditor/config/base.mjs


      Thank you for your help; your suggestion works. The issue has been resolved.
       

    • The issue was with the plugin configuration in the backend.

      Whitelisted domains for oEmbed support was set as:

      https://youtube.com,
      https://youtube.com.br,
      https://www.youtube.com/watch?v=,
      

      When I left the configuration blank, the plugin worked.

      In the help text of the plugin settings it gives you a hint of what you should fill in.

      https://youtube.com is an URL, not a domain. The domain of that link would be 'youtube', that will catch any URL with the same domain (like https://www.youtube.com or https://youtube.com).

      There’s only a small difference in the video layout depending on the link format. For example:

      https://www.youtube.com/watch?v=vE26dVkCvpw  
      https://youtu.be/vE26dVkCvpw?si=qBS0Sou_DYqD8TGI  
      

      One video appears larger than the other. I know this is a minor issue, but for the sake of standardization, I’ll run some tests and get back to you soon.

      With the plugin setting 'height' we try to make sure the format is the same, but it can still be that the height is the same but the width isn't. Let me know of any issues.

    • Hello!
       
      I ran some tests, and CKEditor works well when sharing YouTube videos, either by pasting the direct link into the editor or using the media Embed feature.
       
      The issue is that the iframe doesn’t work for non-logged-in users. The idea behind the code is to ensure that shared videos have a standardized height and width and are responsive on mobile devices.
       

      Copy the code below and paste it into:
       

      <elgg_folder>/vendor/elgg/elgg/mod/ckeditor/views/default/ckeditor/config/base.mjs

      ==============================================

      CODE :

      // Gets the height of the top bar, if present

      var topbar_height = $('.elgg-page-topbar').height();
       
      // Define the language of the editor
      language: elgg.config.current_language,
       
      // UI configuration: setting top margin based on the top bar height
      ui: {
          viewportOffset: {
              top: topbar_height,
          }
      },
       
      // Toolbar configuration
      toolbar: [
          'bold', 'italic', 'underline', 'strikethrough', '|',
          'link', 'unlink', 'blockquote', 'code', '|',
          'bulletedList', 'numberedList', 'indent', 'outdent', '|',
          'alignLeft', 'alignCenter', 'alignRight', 'alignJustify', '|',
          'undo', 'redo', '|',
          'mediaEmbed', 'insertTable', 'tableColumn', 'tableRow', 'mergeTableCells', '|',
          'insertImage', 'insertHorizontalRule', 'subscript', 'superscript', '|',
          'removeFormat', 'source',
      ],
       
      // Ensure to include the mediaEmbed plugin
      extraPlugins: ['mediaembed'],
       
      // Configuration for the mediaEmbed plugin
      mediaEmbed: {
          previewsInData: true,
          providers: [
              {
                  name: 'youtube',
                  url: /https:\/\/www\.youtube\.com\/watch\?v=([a-zA-Z0-9_-]+)/,
                  html: function (match) {
                      var videoId = match[1];
                      return '<div class="responsive-video-container" style="position: relative; overflow: hidden; padding-top: 56.25%; width: 100%; margin: 0 auto; max-width: 1000px; text-align: center;">' +
                          '<iframe src="https://www.youtube.com/embed/&#39; + videoId + '" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen' +
                          ' style="position: absolute; top: 0; left: 0; border: none; width: 100%; height: 100%;">' +
                          '</iframe></div>';
                  }
              }
          ]
      },
       
      // Function to apply responsive styles to the iframe
      function applyIframeStyles() {
          $('.elgg-output.ck-content iframe').each(function () {
              var $iframe = $(this);
       
              // Ensure the iframe is inside a responsive container
              if (!$iframe.closest('.responsive-video-container').length) {
                  $iframe.wrap('<div class="responsive-video-container" style="position: relative; overflow: hidden; padding-top: 56.25%; width: 100%; max-width: 1000px; margin: 0 auto; text-align: center;">');
                  $iframe.css({
                      position: 'absolute',
                      top: 0,
                      left: 0,
                      border: 'none',
                      width: '100%',
                      height: '100%',
                  });
              }
          });
      }
       
      // Apply responsive styles as soon as the page loads
      $(document).ready(function () {
          // Apply responsiveness immediately
          applyIframeStyles();
       
          // Adjust the video width based on screen resolution
          $(window).on('resize', function () {
              $('.responsive-video-container').each(function () {
                  var $container = $(this);
                  var parentWidth = $container.parent().width();
       
                  // Adjust the maximum width based on screen size
                  if (parentWidth < 1000) {
                      $container.css('max-width', parentWidth + 'px');
                  } else {
                      $container.css('max-width', '1000px');
                  }
              });
          }).trigger('resize');
      });
       
      // Insert style rules directly in the HTML for non-logged-in users
      $('<style>')
          .prop('type', 'text/css')
          .html(`
              .responsive-video-container {
                  position: relative;
                  overflow: hidden;
                  padding-top: 56.25%;
                  width: 100%;
                  max-width: 1000px;
                  margin: 0 auto;
                  text-align: center;
              }
              .responsive-video-container iframe {
                  position: absolute;
                  top: 0;
                  left: 0;
                  border: none;
                  width: 100%;
                  height: 100%;
              }
          `)
          .appendTo('head');

       

      ========================================================

      How to standardize shared videos through iframe? The code above does not work for users not connected to the network.


      Thanks

  • Thank you for your reply. Your linked version is the one I installed. view reply
  • Tip: Try this TidyPics fork for Elgg 6. This doesn't guarantee that your issues will be solved, but this fork is at least compatible with the latest Elgg. view reply
  • Hello everyone, as my username shows, I'm new at Elgg. I found it only this month and had not heard of it before. I installed Elgg and most of the plugins for version 6 and created a nicely working project site. I want to say thanks to the...
    • Since I wasn't able to figure out how to create the design I was hoping for, I changed my plan and don't do it like instagram anymore. Instead I use it as intended with albums.

      But maybe someone can answer me this: How do I change the CSS for Tidypics? Testing with manual changes in the views/default/photos/CSS.php file of Tidypics won't do anything. Is this not the right file for it?

      I want to display the $title in the $heading smaller. Not as a <h2> (?), but normal sized text. I would like to add this to my own plugin as an overwrite, but I don't know what I have to overwrite, sorry.

    • Nikolai's reply to my other question in the "hide header" thread answers how to update the CSS. So there is no more need for a reply here. Thank you.

    • In case someone finds this thread and is wondering how it went:

      After one month of trying all kinds of things out, I actually succeeded: My "siteimagesall" page looks (kinda) like Instagram now. :)

      All changes happened in the "summary.php". The downside is that the changes in this file effect other views as well, e.g. all photo albums page and the album list. This is OK for me for now. But step by step I will try to correct this as well.

      This is what I did:

      1. Copied code I found in elgg/views/detail/object/elements/summary to add an image block view above the photo which created the area from the full view with the user icon, display name, date and social links.

      2. Set $header to false in the body view section, so that the title of the picture isn't shown.

      3. Added $image->description below the picture.

      4. Changed the thumbnail size from 153 pixels to 500 pixels on the admin settings page.

      5. Styled the max-width for the view to 500 pixels, so that all entries look the same, no matter how long the description or amount of tags.

      6. Added a <hr> to separate between entries. (This is only until I find a better solution to style the page more beautifully.)

      (7. I also found out how to get metadata to show under the picture to get the social links there. This would be even nicer than having them above the picture. But I wasn't able to hide the social links from the image block view I called above the picture, so I hid that lower metadata area again. If someone tells me how I can easily hide the social links from the image block view, please let me know.)

      And all of that without knowing anything about PHP! Just observing the code everywhere, reading the hints from Nikolai and the documentation, and, of course, a loooot of trial and error.

  • Nirmalya Sikdar added a new discussion topic How can I add Advertsement in Elgg - 6.0.1 ?
    Site - https://safalaya.com . How can I add Advertsement in Elgg - 6.0.1 ? There is no plugin for this . Please help .
  • Nirmalya Sikdar added a new discussion topic How can I add Adsterra Ad code in elgg 6.0
    How can I add Adsterra Ad code to display ads throughout my elgg site safalaya.com in elgg 6.0 ?
  • Jerome Bakker replied on the discussion topic Elgg password reset
    there is nothing in Elgg which does this. In default Elgg the only way a password changes is if the user requested a new password (and clicks the confirm link), if the user changes the password on their settings page or if an admin resets their... view reply
  • Jerome Bakker replied on the discussion topic How can I increase the upload file size ?
    In the .htaccess (which is in the root of your website) you can change the max file size. https://github.com/Elgg/Elgg/blob/7ea56c6dfebd0937c854a92fc12f37b9b19c6c4c/install/config/htaccess.dist#L48-L51 Make sure you also increase the... view reply
  • Abhi replied on the discussion topic Elgg password reset
    Thanks for the response. This page doesn't list out my exact issue. Also, the example I mentioned above, that a user is facing this, they are already a second admin. But still, when they logout, they are not able to login again with same... view reply
  • Nikolai Shcherbin replied on the discussion topic How can I increase the upload file size ?
    https://stackoverflow.com/questions/2184513/change-the-maximum-upload-file-size view reply
  • Nirmalya Sikdar added a new discussion topic How can I increase the upload file size ?
    I am using Elgg - 6.0.1 . How can I increase the upload file size ?
  • Book Of Likes replied on the discussion topic Elgg password reset
    Probable this URL could help you http://learn.elgg.org/en/stable/design/security.html and while you are in the administrator panel, maybe you could create a second administrator user with different password just in case you ever lose the first... view reply
  • Abhi added a new discussion topic Elgg password reset
    Hi, I am facing an issue with Elgg login. Whenever I logout from the website, the password is expiring and I have to reset to new password every time, so that I can login.
    • You gave the 'login' events, are there any 'logout' events?

      If not then I no idea what the issue is. I've never encountered anything like that.

    • There is nothing on the logout event except this. That's why I haven't shared above. I also checked the elgg core files login, logout and register php files, and I don't see any changes there.

      register, menu:topbar 500 Elgg\Menus\Topbar::registerUserLinks
      500 Elgg\Menus\Topbar::registerLogoutAs
    • Hello, I know there is not a solution here, but can I know what are the core elgg files I need to check for login, logout and user register? I would like to double confirm if nothing has been changed there

  • It's nonsense to run Debian 12 on a 32-bit platform. Of course, you should use only a 64-bit platform. Updated: But you can anyway. Most likely one of the packages requires a 64-bit platform  view reply
  • I tried to install on lamp server on Debian 12 (32 bit). It displayed the error "Composer detected  issues in your platform: Your composer dependencies require a 64 built of PHP." Does it mean it is impossible to install it on my...
  • Jerome Bakker replied on the discussion topic CSV files import in Elgg website
    please don't double post your questions. I'll close this one, follow up can be here https://elgg.org/discussion/view/3322711/csv-file-upload-to-elgg-website view reply
  • Abhi added a new discussion topic CSV files import in Elgg website
    Hello, I am building a Elgg website for my enterprise and I would like to add a feature where I can upload csv files and import data from csv files to the fields in Elgg site. I did check for plugins but nothing is available. Any...
  • IKE.TEKNIS replied on the discussion topic Delete user by user
    Thanks, the indicated plugin works correctly. view reply
  • Nikolai Shcherbin replied on the discussion topic Delete user by user
    https://github.com/rohit1290/account_removal view reply
  • IKE.TEKNIS added a new discussion topic Delete user by user
    hello i've been trying elgg for a few days, but i noticed that it is not possible for users to delete themselves from the social network, the delete user command is not present anywhere in the profile and profile settings. can someone help me...