Send private message

You must be logged in to send a private message.

Friends

No friends yet.

Group membership

Activity

  • Alex added a new discussion topic profile pictures in the group Beginning Developers
    Hello everybody My question is, how can i change the maximum upload size of a picture for my profile? I am not sure, but i think there is a border of 3 MB. If i want to upload a bigger picture, it does not work. Please can you help...
  • Alex replied on the discussion topic Save plugin settings
    Thanks for your answers. Now it works. The problem was, that I wrote the wrong paths in my elgg_register_action. Thanks for helping. view reply
  • Alex added a new discussion topic Save plugin settings in the group Beginning Developers
    I have written my own plugin. Now i want to save some plugin settings. The form with the settings is ready and does work. But now I want to write my own save action. In the standard save.php of elgg there is this code: .... // allow a...
    • 1. You can set your options on the plugin's settings page and call them in your views:

      mod/my_plugin/views/default/plugins/my_plugin/settings.php

      $entity = elgg_extract('entity', $vars);
      
      echo elgg_view_input('text', [
          'name' => 'params[my_option]',
          'label' => elgg_echo('my_option:name'),
          'value' => $entity->my_option,
      ]);

      some file:

      $plugin_option = elgg_get_plugin_setting('my_option', 'my_plugin');
      
      //Use echo if ...

      2. Or learn how to register action

    • I think it's not the location of the action but the name of the action that is important here. You need to register the action in the init function of start.php with the action name "my_plugin/settings/save", e.g.

      $base_dir = elgg_get_plugins_path() . 'my_plugin/actions';
      
      elgg_register_action("my_plugin/settings/save", $base_dir . "settings.php", 'admin');

      and then you can place the save action file where you want it (i.e. somewhere in the actions folder of your plugin) as long as the second parameter of elgg_register_action() gives the correct path to the action file.

    • Thanks for your answers. Now it works.

      The problem was, that I wrote the wrong paths in my elgg_register_action.

      Thanks for helping.

  • Alex replied on the discussion topic Blog with file attachment
    thanks for your answer. I'm sorry, I'm new on elgg,how can i do this with this plugin? view reply
  • Alex added a new discussion topic Blog with file attachment in the group Beginning Developers
    When i write a blog, i want the opportunity to attach a file to the blog. I created the form, but i can't see the attached file in the river. I did it like it was described in the developer guides "file System". I modified the form...
  • Alex added a new discussion topic Problem with lightbox in the group Beginning Developers
    I've got a problem with my plugin and js. Without my plugin elgg works fine. But when i activate my plugin, i have the problem that in the river i can't see, who likes my entries. Get an error "Uncaught SyntaxError: Unexpected...
    • elgg_load_js() loads the script asynchronously, inline JS is implemented synchronously at runtime before lightbox is loaded.
      Try at least wrapping your JS as an init, system event handler, might help but not bullet proof. In 2.3, lightbox is an AMD module which solves that problem.

    • <script>
      require(['elgg'], function(elgg) {
          elgg.register_hook_handler('init', 'system', function() {
             // put your $.colorbox dependent code here
          });
      });
      </script>
      

      This will probably work in most cases, but might still fail on occasion.

  • Alex replied on the discussion topic Load users from database
    Thanks a lot, that works view reply
  • Alex added a new discussion topic Load users from database in the group Beginning Developers
    Hello I want to load all registered users from the database. Currently i have 2 users. With this code: $entity_type = 'elgg_users_entity'; $entities = elgg_get_entities(array('type' => $entity_type)); I only get one...