Send private message

You must be logged in to send a private message.

Friends

No friends yet.

Group membership

Activity

  • nalonso released a new version of the plugin Who Viewed Me
  • nalonso commented on the plugin Who Viewed Me
    Interesting... :) I'll do my best to include it in the next release!
  • nalonso released a new version of the plugin Who Viewed Me
  • nalonso replied on the discussion topic Update of "Who viewed me" plugin
    Just for the record, I've found the solution here: https://elgg.org/plugins/1101901/releases/1.1#elgg-object-1749249 In a nutshell, it says: The problem here is that the relationship ID which is tried to be fetched here just doesn't... view reply
  • nalonso replied on the discussion topic River notifications on profile update
    Thanks RvR! Maybe I wasn't very clear. In /mod/profile_river_updates/start.php, is written: $view = "river/user/default/profileupdate";         // First delete any existing river entry about... view reply
  • nalonso added a new discussion topic Update of "Who viewed me" plugin in the group Plugin Development
    Hi all! I'm trying to update the plugin "Who Viewed Me", https://elgg.org/plugins/1101901, which is 4 years old. It still works fine, but there is a problem with the date calculation for the viewed profile. Right now, is showing...
    • Just for the record, I've found the solution here:

      https://elgg.org/plugins/1101901/releases/1.1#elgg-object-1749249

      In a nutshell, it says:

      The problem here is that the relationship ID which is tried to be fetched here just doesn't exist, so instead of giving you the proper date, it gives you the default date 00:00:00 1/1/1970 which was exactly 15892 days ago when you tried out this plugin and gave your reply here.

      Anyway, I was just trying to explain how it worked, that is wasn't elgg date related and why those days were standing there, here is a small fix to get it working:

      replace the line:

      $relationship = get_relationship($ent->id);

      with:

      $relationship = check_entity_relationship($ent->guid, "viewed", elgg_get_logged_in_user_guid());

      So, problem solved!!!

  • nalonso joined the group Plugin Development
  • nalonso added a new discussion topic River notifications on profile update in the group General Discussion
    Hi all! I need to show on the river the events on profile update. I have installed the plugin "Profile Manager", and I've created some customs fields. Lets use as an example "Current project", which is a free text field....
    • Thanks RvR!

      Maybe I wasn't very clear. In /mod/profile_river_updates/start.php, is written:

      $view = "river/user/default/profileupdate";

              // First delete any existing river entry about profile updates of this user
              $access = elgg_set_ignore_access(true);
              $access_status = access_get_show_hidden_status();
              access_show_hidden_entities(true);

              $river_items = new ElggBatch('elgg_get_river', array(
                  'action_type' => 'update',
                  'subject_guid' => $user->guid,
                  'limit' => false,
                  'wheres' => array("rv.view = \"$view\""),
              ));

              $river_items->setIncrementOffset(false);
              foreach ($river_items as $river_item) {
                   $river_item->delete();
              }

              access_show_hidden_entities($access_status);
              elgg_set_ignore_access($access);

              // Then create new river entry informing about profile update of this user
              elgg_create_river_item(array(
                  'view' => $view,
                  'action_type' => 'update',
                  'subject_guid' => $user->guid,
                  'object_guid' => $user->guid,
                  'access_id' => get_default_access($user),
              ));

      My actual problem is that I don't know where to get the information that changes in the profile, in order to be able to show it with the function elgg_create_river_item

      Thanks again!

    • Set your profile's name with:

      elgg_set_config('profile_fields', [
          'description' => 'longtext',
          'location' => 'location',
          'contactemail' => 'email',
          'mobile' => 'phone',
          'skills' => 'tags',
          'website' => 'url',
          'projectname' => 'text',
      ]);

      in start.php

       

      Or override this view:

      views\default\forms\profile\edit.php

      See at

      $profile_fields = elgg_get_config('profile_fields');