Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Roundcube
  3. Request to change plugin load workflow

Request to change plugin load workflow

Scheduled Pinned Locked Moved Roundcube
6 Posts 3 Posters 753 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jaschaezraJ Offline
      jaschaezraJ Offline
      jaschaezra
      wrote on last edited by
      #1

      Hi!

      I want to use the "Nextcloud Attachment" plugin (see here) because it would be great to have it.

      Unfortunately it needs to be loaded before any other attachment plugin. From the readme:

      When enabling the plugin make sure to place it before any other attachment plugins like filesystem_attachments E.g.

      $config['plugins'] = array('nextcloud_attachments', /*...*/ 'filesystem_attachments', /*...*/ 'vcard_attachments' /*...*/);
      

      At the moment the plugins coming with the package are loaded like this:

      $config['plugins'] = array('acl', 'archive', 'attachment_reminder', 'emoticons', 'managesieve', 'markasjunk', 'newmail_notifier', 'vcard_attachments', 'zipdownload');
      

      I would suggest:

      • Create an empty array for the plugins
      • require_once "/app/data/customconfig.php";
      • array_push($config['plugins'], 'acl', 'archive', 'attachment_reminder', 'emoticons', 'managesieve', 'markasjunk', 'newmail_notifier', 'vcard_attachments', 'zipdownload')

      Could that be possible?

      1 Reply Last reply
      0
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #2

        @jaschaezra /app/data/customconfig.php is loaded in the very end - https://git.cloudron.io/cloudron/roundcube-app/-/blob/master/config.inc.php?ref_type=heads#L64 . You can do whatever php manipulation to $config['plugins'] in that file. Wouldn't that be enough?

        1 Reply Last reply
        0
        • jaschaezraJ Offline
          jaschaezraJ Offline
          jaschaezra
          wrote on last edited by
          #3

          If someone can tell me how I can manipulate the array that plugins from /app/data/customconfig.php are loaded first because I have nearly no clue about php.

          1 Reply Last reply
          0
          • girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #4

            Think you just use https://www.php.net/manual/en/function.array-unshift.php ?

            array_unshift($config['plugins'], "nextcloud_attachments", "filesystem_attachments");
            
            jaschaezraJ 1 Reply Last reply
            1
            • girishG girish

              Think you just use https://www.php.net/manual/en/function.array-unshift.php ?

              array_unshift($config['plugins'], "nextcloud_attachments", "filesystem_attachments");
              
              jaschaezraJ Offline
              jaschaezraJ Offline
              jaschaezra
              wrote on last edited by
              #5

              @girish this worked for me, thanks.

              robiR 1 Reply Last reply
              1
              • jaschaezraJ jaschaezra

                @girish this worked for me, thanks.

                robiR Offline
                robiR Offline
                robi
                wrote on last edited by
                #6

                @jaschaezra what did you do?

                Conscious tech

                1 Reply Last reply
                1
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Bookmarks
                  • Search