ED_shultz

Send private message

You must be logged in to send a private message.

Group membership

Activity

  • I want to limit the activity river items to 5
    • Where exactly you want to show this? In activity feed or user widgets?

      You can set the limit by passing limit parameter as 5 in elgg_list_river() API

    • <?php
      
      function myplugin_set_river_limit($hook, $type, $value, $params) {
        // like adding ?limit=6 to the URL
        set_input('limit', 6);
      }
      
      // execute just before the river page resource view is rendered.
      elgg_register_plugin_hook_handler('view_vars', 'resources/river', 'myplugin_set_river_limit');

      Try this out. For Elgg 2.0+

  • ED_shultz added a new discussion topic My elgg doesn't send verification email in the group Elgg Technical Support
    am using elgg 1.12 but it doesn't send email for users to verify there accounts,help needed
  • ED_shultz added a new discussion topic how to extend suggested friends to the river side bar in the group Elgg Technical Support
    I want to extend the suggested friends plugin into the river side bar, i want them friends to see suggested friends in the side bar
    • extend the sidebar view:

      elgg_extend_view('page/elements/sidebar', 'myplugin/suggested_friends');

      Then in your myplugin/suggested_friends view you can output the suggested friends stuff.  If you're using my suggested friends plugin I believe there are some convenience functions (possibly even just a view you can call, I can't remember, it's been a while).

  • ED_shultz replied on the discussion topic new elgg doesnt work
    [Fri Mar 11 05:13:06 2016] [error] [client 94.23.204.183] File does not exist: /home/dacari/public_html/404.shtml [Fri Mar 11 05:13:06 2016] [error] [client 94.23.204.183] File does not exist: /home/dacari/public_html/feeds [Fri Mar 11 05:06:43... view reply
  • ED_shultz replied on the discussion topic Elgg's SSL ran out?
    new elgg installs not working view reply
  • ED_shultz added a new discussion topic new elgg doesnt work in the group Elgg Technical Support
    MY new elgg install doesnt work am using arvixe hosting http://ucuconnection.dacari.net/elgg/
  • ED_shultz added a new discussion topic removing all and mine from activity river in the group Elgg Technical Support
    Am new to elg  but i want to remove all and mine in the activity river and remain with friends only
    • It's slightly different on Elgg 1.12 (might work on previous versions but I've not checked) and Elgg 2.0. On Elgg 2.0 it's easier.

      On Elgg 2.0 you only need to override a single view. Either do it witin a little customization plugin or add the modified view to another suitable plugin (e.g. your theme plugin).

      For a separate plugin you would have to add a manifest.xml to the plugin folder (check out one of the core plugins for reference).

      The start.php file must exist for the plugin to work but the file itself can be left empty (or add <?php in the first line).

      The modified view must be saved as mod/river_remove_tabs/views/default/resources/river.php (assuming here that you name your plugin "river_remove_tabs"). The content of river.php is

      <?php
      /**
       * Main activity stream list page
       */

      $options = array(
          'distinct' => false
      );

      $type = preg_replace('[\W]', '', get_input('type', 'all'));
      $subtype = preg_replace('[\W]', '', get_input('subtype', ''));
      if ($subtype) {
          $selector = "type=$type&subtype=$subtype";
      } else {
          $selector = "type=$type";
      }

      if ($type != 'all') {
          $options['type'] = $type;
          if ($subtype) {
              $options['subtype'] = $subtype;
          }
      }

      $title = elgg_echo('river:friends');
      $options['relationship_guid'] = elgg_get_logged_in_user_guid();
      $options['relationship'] = 'friend';

      $activity = elgg_list_river($options);
      if (!$activity) {
          $activity = elgg_echo('river:none');
      }

      $content = elgg_view('core/river/filter', array('selector' => $selector));

      $sidebar = elgg_view('core/river/sidebar');

      $params = array(
          'title' => $title,
          'content' =>  $content . $activity,
          'sidebar' => $sidebar,
          'filter' => false,
          'class' => 'elgg-river-layout',
      );

      $body = elgg_view_layout('content', $params);

      echo elgg_view_page($title, $body);

      That's all for Elgg 2.0.

      On Elgg 1.12 the above river.php file must be placed at mod/river_remove_tabs/pagesriver.php instead. Additionally the start.php file has some content:

      <?php

      elgg_register_event_handler('init', 'system', 'river_remove_tabs_init');

      function river_remove_tabs_init() {
          elgg_unregister_page_handler('activity');
          elgg_register_page_handler('activity', 'my_river_page_handler');
      }

      function my_river_page_handler($page) {
          elgg_set_page_owner_guid(elgg_get_logged_in_user_guid());
          $base = elgg_get_plugins_path() . 'river_remove_tabs/pages';
          require "$base/river.php";
          return true;
      }

      (I hope I haven't missed some faults in the code of start.php as I've to admit that I've not tested it on Elgg 1.X).

  • ED_shultz joined the group Elgg Technical Support