Ross Knight

Location:

Send private message

You must be logged in to send a private message.

Friends

No friends yet.

Activity

  • Ross Knight replied on the discussion topic Sample Users
    Thank you! view reply
  • Ross Knight added a new discussion topic Sample Users in the group General Discussion
    Hope this is the correct place to post... it has been a while since I used Elgg but I am sure there used to be a plugin which would install a number of sample users. I am currently putting together a proof concept site and would like would like to...
  • Ross Knight joined the group General Discussion
  • Ross Knight replied on the discussion topic Site Navigation in the group Elgg Technical Support
    I am looking to insert navigation between the top banner and content area much like this -  can anyone offer any suggestions.
  • Ross Knight added a new discussion topic Site Navigation in the group Elgg Technical Support
    I am looking to insert navigation between the top banner and content area much like this -  can anyone offer any suggestions.
  • Ross Knight replied on the discussion topic Make everyone friends with specific user in the group Elgg Technical Support
    I have imported a large number of users from a Drupal based site into an newly created Elgg install. Everything went resonably well and the Elgg community has been really helpful when I bumped up against a couple of issues. So hopefully you can help...
    • @shillo

      The second parameter is "subtype" which is not applicable for entities of type "user" (first parameter), The third parameter is owner_guid, and the 4th parameter is the limit (of items you want on this call).

      Which brings up a coding issue that has bothered me in all of the elgg engine calls regarding "limit". If you set the limit to 9999, then if you happen to have more than that number of users, you will miss the rest. In general the way I get around this is to have two loops as follows:

          $total = 0;

          for (  ;  ;  ) 

               {

               $newcount = 0;

               $users = get_entities("user", "", 0, "", 9999);

               foreach($users as $user)

                   {

                   // check to make sure relationship does not already exist then add it

                    add_entity_relationship(); 

                    $newcount++;

                   }

               if ( $newcount == 0 )

                      break;

               $total += $newcount;

               }

       

       

    • That's wonderful, ChungNg.

      I had the intution is that "9999" is the member limit, but don't worry, my site will never hit that barrier. There are not that many intelligent people on the planet :) hahaha.

    • Ok, thanks for this. I understand what is going on with code I can see the function referenced in elgg/lib/relationships.php but how best to go about running this. Sorry, I am a newbie!

  • Ross Knight added a new discussion topic Make everyone friends with specific user in the group Elgg Technical Support
    I have imported a large number of users from a Drupal based site into an newly created Elgg install. Everything went resonably well and the Elgg community has been really helpful when I bumped up against a couple of issues. So hopefully you can help...
    • @shillo

      The second parameter is "subtype" which is not applicable for entities of type "user" (first parameter), The third parameter is owner_guid, and the 4th parameter is the limit (of items you want on this call).

      Which brings up a coding issue that has bothered me in all of the elgg engine calls regarding "limit". If you set the limit to 9999, then if you happen to have more than that number of users, you will miss the rest. In general the way I get around this is to have two loops as follows:

          $total = 0;

          for (  ;  ;  ) 

               {

               $newcount = 0;

               $users = get_entities("user", "", 0, "", 9999);

               foreach($users as $user)

                   {

                   // check to make sure relationship does not already exist then add it

                    add_entity_relationship(); 

                    $newcount++;

                   }

               if ( $newcount == 0 )

                      break;

               $total += $newcount;

               }

       

       

    • That's wonderful, ChungNg.

      I had the intution is that "9999" is the member limit, but don't worry, my site will never hit that barrier. There are not that many intelligent people on the planet :) hahaha.

    • Ok, thanks for this. I understand what is going on with code I can see the function referenced in elgg/lib/relationships.php but how best to go about running this. Sorry, I am a newbie!

  • Ross Knight replied on the discussion topic Moved Data folder now old download links don't work in the group Elgg Technical Support
    I had need to move my Elgg install from a subdirectory into the root. I placed the data folder above root, cleared out the data cache and updated the references in the db to the url, root and data (ensuring I included trailing slash). The problem is...
    • mucho problemo ;-) u fixed the datalists data root ? but elgg Objects still point to older data folder. sooooo you see "broken" file object  @ download time.

    • When I move a site, I export the database and then do sed search and replace's on the dump file before importing it. I've never had a problem and have done it a few times. I think it is more robust than the instructions on the wiki site.

      To your specific problem, you should be able to do a search through your database for entries related to your old data path. I think there are just 2 entries that need to be changed, the dataroot in the datalists table and in the metastrings/metadata tables, look for filestore::dir_root

    • @Cash, thanks a lot - easy when you know how.