Send private message

You must be logged in to send a private message.

Friends

No friends yet.

Activity

  • Thanks - that looks perfect. I wasn't planning on using that metadata field as a tag but I don't think it'll hurt. Cheers view reply
  • Thanks - but it's not really data export I'm after. I'm writing a plugin that needs to process & display all the 'companies' that users work for (companies being a custom metadata field I've added to users). I could look through an array of all... view reply
  • Hi, I was wondering if there is a built-in function, that for any entity (in my case, users) it will return all possible values of an individual piece of metadata. I couldn't see anything appropriate in...
  • stevewc replied on the discussion topic Using input/autocomplete with elgg_view
    Ta - I've gone with the libforms_utils plugin. view reply
  • stevewc added a new discussion topic Using input/autocomplete with elgg_view in the group Elgg Technical Support
    Hi, I'm trying to create a view that uses the "input/autocomplete" text input. The code in this test view is: <div class="contentWrapper"><form action="<?php echo $vars['url']; ?>action/issues/new" enctype="multipart/form-data"...
    • @Trajan,

      Take a look at hypeLiveSearch. I've done some modifications to autocomplete and its page_handler. Perhaps you can gather some ideas there.

    • @both:  thanks for the thoughts.

      @ihayredinov: I've found your new case for objects (just what I was looking for). What's the coding needed in the hypeautocomplete view for match_on to select a specific subtype?

      ''match_on' => 'objects' ??????

    • Update: Solved it with the following code. Thanks again to both of you guys.

      case 'words':

      // don't return results if groups aren't enabled.

      $query = "SELECT * FROM {$CONFIG->dbprefix}objects_entity as oe, {$CONFIG->dbprefix}entities as e

      WHERE e.guid = oe.guid

      AND e.enabled = 'yes'

      $owner_where

                              AND e.subtype = '43'

      AND (oe.title LIKE '$q%' OR oe.description LIKE '%$q%')

      LIMIT $limit

      ";

                          if ($entities = get_data($query)) {

                              foreach ($entities as $entity) {

                                  $json = json_encode(array(

                                              'type' => 'object',

                                              'subtype' => 'word',

                                              'name' => $entity->title,

                                              'desc' => elgg_get_excerpt(strip_tags($entity->description), 30),

                                              'icon' => '',

                                              'guid' => $entity->guid

                                          ));

                                  //$results[$entity->name . rand(1,100)] = "$json|{$entity->guid}";

                                  $results[$entity->title . rand(1, 100)] = $json;

                              }

                          }

                      break;

  • stevewc replied on the discussion topic Custom plugin based on groups
    True - but I'm hoping that as I don't need a lot of the functionality of groups - but more new, specific function - this way is going to be the lesser of two evils. Time to earn my wages I suppose :) view reply
  • stevewc replied on the discussion topic Custom plugin based on groups
    Thanks - sorry - didn't catch that post outside of the renaming angle. Looks like a lot of work then either way - if I use the existing groups, then I'm going to have to augment the triggers, events and hooks to accommodate the new functionality.... view reply
  • stevewc replied on the discussion topic Custom plugin based on groups
    Thanks - but I don't need to rename groups as I want to keep grounds - just have an additional group-style container for 'issues'. view reply