Christophe

Activity

  • Christophe joined the group Plugin Development
  • Christophe added a new discussion topic Trouble with /mod/messages in the group Elgg Technical Support
    Hello, In /mod/messages/actions/delete.php  you have to change (!array($message_id_array)) by (!is_array($message_id_array)) in line 20. Without this you can't delete messages with the cross. In...
  • Christophe joined the group Plugin Development
  • Christophe replied on the discussion topic Howto change url profile ? in the group Elgg Technical Support
    Hello, I would like to work with another URL than the default url.For example, I want to use http://community.elgg.org/pg/profile/guid_Christophe_Milhau instead of http://community.elgg.org/pg/profile/Christophe (same spirit than Facebook...
    • Hi Kevin,

      you're right, the url must have good caracters, but I don't thing the trouble is here (just have to create a good url with filtering caracters, I have this on one of my website). The trouble is how to know, where I have to change the informations correctly to keep elgg working correctly.

      Thank's for your answer.

      Christophe

    • I think that this could be done with a very simple plugin.

      The plugin would over-ride the register action like so:

      register_action("register", true, $CONFIG->pluginspath . "myplugin/actions/register.php");

      You would then take the actions/register.php file and copy it into

      mod/myplugin/actions/register.php

      You can then change the line near the top:

      $username = get_input('username');

      to autogenerate the username.

      If you want the username to actually contain the guid, that is a problem, but you could do that by setting the username temporaily to a timestamp followed by say ten random characters and then reset it to what you want once the user has been created and you know the guid.

      You would also need to over-ride the register view to remove the username.

      And the login form and action to allow people to login using their email address.

       

       

    • I started my plugin and it's now possible to change the username.

      But I want to insert the guid now.

      I can create the new username but I cant save the new value. Can you telle me where is the trouble ?

      My code :

       $new_username = $guid.'_'.$username;
       $new_user->username = $new_username;
       $new_user->language = 'fr';
       $new_user->save();

      Can you tell me if save() is right ?

      Thanks,
      Christophe

  • Christophe replied on the discussion topic Howto change url profile ? in the group Elgg Technical Support
    Hello, I would like to work with another URL than the default url.For example, I want to use http://community.elgg.org/pg/profile/guid_Christophe_Milhau instead of http://community.elgg.org/pg/profile/Christophe (same spirit than Facebook...
    • Hi Kevin,

      you're right, the url must have good caracters, but I don't thing the trouble is here (just have to create a good url with filtering caracters, I have this on one of my website). The trouble is how to know, where I have to change the informations correctly to keep elgg working correctly.

      Thank's for your answer.

      Christophe

    • I think that this could be done with a very simple plugin.

      The plugin would over-ride the register action like so:

      register_action("register", true, $CONFIG->pluginspath . "myplugin/actions/register.php");

      You would then take the actions/register.php file and copy it into

      mod/myplugin/actions/register.php

      You can then change the line near the top:

      $username = get_input('username');

      to autogenerate the username.

      If you want the username to actually contain the guid, that is a problem, but you could do that by setting the username temporaily to a timestamp followed by say ten random characters and then reset it to what you want once the user has been created and you know the guid.

      You would also need to over-ride the register view to remove the username.

      And the login form and action to allow people to login using their email address.

       

       

    • I started my plugin and it's now possible to change the username.

      But I want to insert the guid now.

      I can create the new username but I cant save the new value. Can you telle me where is the trouble ?

      My code :

       $new_username = $guid.'_'.$username;
       $new_user->username = $new_username;
       $new_user->language = 'fr';
       $new_user->save();

      Can you tell me if save() is right ?

      Thanks,
      Christophe

  • Christophe added a new discussion topic Howto change url profile ? in the group Elgg Technical Support
    Hello, I would like to work with another URL than the default url.For example, I want to use http://community.elgg.org/pg/profile/guid_Christophe_Milhau instead of http://community.elgg.org/pg/profile/Christophe (same spirit than Facebook...
    • Hi Kevin,

      you're right, the url must have good caracters, but I don't thing the trouble is here (just have to create a good url with filtering caracters, I have this on one of my website). The trouble is how to know, where I have to change the informations correctly to keep elgg working correctly.

      Thank's for your answer.

      Christophe

    • I think that this could be done with a very simple plugin.

      The plugin would over-ride the register action like so:

      register_action("register", true, $CONFIG->pluginspath . "myplugin/actions/register.php");

      You would then take the actions/register.php file and copy it into

      mod/myplugin/actions/register.php

      You can then change the line near the top:

      $username = get_input('username');

      to autogenerate the username.

      If you want the username to actually contain the guid, that is a problem, but you could do that by setting the username temporaily to a timestamp followed by say ten random characters and then reset it to what you want once the user has been created and you know the guid.

      You would also need to over-ride the register view to remove the username.

      And the login form and action to allow people to login using their email address.

       

       

    • I started my plugin and it's now possible to change the username.

      But I want to insert the guid now.

      I can create the new username but I cant save the new value. Can you telle me where is the trouble ?

      My code :

       $new_username = $guid.'_'.$username;
       $new_user->username = $new_username;
       $new_user->language = 'fr';
       $new_user->save();

      Can you tell me if save() is right ?

      Thanks,
      Christophe

  • Christophe joined the group Plugin Development