Francisco

Send private message

You must be logged in to send a private message.

Friends

No friends yet.

Group membership

Activity

  • Francisco added a new discussion topic LetsEncrypt on Plesk in the group Elgg Technical Support
    Hi all On my VPS I'm using Plesk, with LetsEncrypt extension. This manages LetsEncrypt certificates automatically, installing them an renewing them. But I'm having problems using it with my elgg (1.12) installation.  The extension...
  • Francisco replied on the discussion topic Allow elgg_echo in menus
    Finally I asked a colleage who is great at php and he kindly provided me with the solution, or workaround if you prefer. This works if, as the title of the menu item, you enter the languaje string code between square brackets [ ] like, for example... view reply
  • Francisco added a new discussion topic Allow elgg_echo in menus in the group Beginning Developers
    Hello all. Currently I'm using menu_builder and I'd like to use multilingual menus. The easy way could be allowing elgg_echo as menu item titles, as this module (https://elgg.org/plugins/1226896) does, but don't know where to fit the...
    • Finally I asked a colleage who is great at php and he kindly provided me with the solution, or workaround if you prefer. This works if, as the title of the menu item, you enter the languaje string code between square brackets [ ] like, for example [mymenu:activity]. For other types of delimiters you'll have to change the first if comparators. Tested and running in elgg 1.12.2 with menu_builder 2.0 downloaded from https://github.com/ColdTrick/menu_builder

      Override views/default/navigation/menu/elements/item.php in your module copying the original view to start with, and insert this code at line 36:

      if(substr(trim($item->getText()), 0, 1) =='[' && substr(trim($item->getText()), strlen(trim($item->getText()))-1, 1) ==']') {
          $del = array('[',']');
          $item->setText(elgg_echo( str_replace($del, array(''), trim($item->getText()) ) ) );
      }
      else {
          $pat = '@<a href=\'#\'>\[(.[^\>]*)]@ui';
          preg_match($pat, trim($item->getText()), $arr);
          if(isset($arr) && is_array($arr) && isset($arr[1])) {
              $del = array('[',']');
              $item->setText(
                   str_replace('' . $arr[0], '<a href=\'#\'>' . elgg_echo($arr[1]), $item->getText() )
                  );
      
          }
      }

      Then include all your strings in all languajes you like, in your module.

      Regards

      Fran

  • Francisco replied on the discussion topic Landing page
    Same thing is happening to me with elgg 1.11. I haven't got that plugin installed. I am running elgg in walled garden, should it help. ¿It may have something related to this issue? https://github.com/Elgg/Elgg/issues/7261 Also,... view reply
  • Francisco replied on the discussion topic Overriding changing password for user
    Oh my!! I'm such a noob. Thanks a lot. Works perfectly! (and now I understand why, which is better) Regards Fran view reply
  • Francisco replied on the discussion topic Overriding changing password for user
    Thanks Matt (I'm using your Comment Tracker too :)) I'm adding those lines to the start.php of my modified version of ldap_auth plugin, right after Juho's original line 12: elgg_register_event_handler('init',... view reply
  • Francisco added a new discussion topic Overriding changing password for user in the group Beginning Developers
    Hello all. I'm extending the fantastic plugin ldap_auto by Juho Jaakkola (wich works perfectly OOTB by the way) to add two features, one of it scapes my small php coding skill (I'm an IT man, only some skills in .NET) I want to override...
    • Thanks Matt (I'm using your Comment Tracker too :))

      I'm adding those lines to the start.php of my modified version of ldap_auth plugin, right after Juho's original line 12:

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

      I am running elgg 1.10.2 (up to date as it's not in production yet)

      Thanks again

    • You should put them inside the ldap_auth_init function

    • Oh my!! I'm such a noob. Thanks a lot. Works perfectly! (and now I understand why, which is better)

      Regards

      Fran

  • Francisco joined the group Beginning Developers