Send private message

You must be logged in to send a private message.

Group membership

Activity

  • Colin replied on the discussion topic private_profile standard stopping site pages from working
    Im so blown away with the way you know this, i have sat looking  at the registration page for ages, if you call the page , and then view source there are no values set for a drop down of male female and yet it gets  it 100% into the... view reply
  • Colin replied on the discussion topic private_profile standard stopping site pages from working
    am I correct i in saying that this system is a oop framework ? what has composer got to do with it ? , Im looking for a light bulb moment here , but so far Im a bit dim :-) I created a extra field in the registration page Gender , using... view reply
  • Colin replied on the discussion topic private_profile standard stopping site pages from working
    Thank you so much for your help , I really appreciate it :-)   view reply
  • Colin replied on the discussion topic private_profile standard stopping site pages from working
    HI The 3 pages display fine when you are logged in, but will not when you are logged out , also the problem only happens when i have the private profile mod activated , I disable it , then the pages display fine when im logged out ,, about... view reply
  • Colin added a new discussion topic private_profile standard stopping site pages from working in the group Elgg Technical Support
    Hi I have been messing around with this for a few ways now and Thanks to iionly i can now hide the admin users but now for some reason and even with an unmodified version of private profile the about , terms and privacy pages will not work for...
    • am I correct i in saying that this system is a oop framework ? what has composer got to do with it ?

      , Im looking for a light bulb moment here , but so far Im a bit dim :-)

      I created a extra field in the registration page Gender , using profile manager, I now want to set a tiger to forward the user to ether the normal , we have sent you and email , Or a rules page based on gender selection , normal i would add a if then to the registration button , but how would you go about it in elgg as it seems to build these pages on the fly.

      Do you mind teaching ? I had a friend that taught me a lot over the years but I have sadly recently lost touch , and cant find out what happend to him 

       

       

    • The original purpose of composer is management of dependencies (e.g. 3rd party scripts/libs). The developer doesn't have to fetch all the 3rd party code from different sources and add it to the code (e.g. a plugin) but can define the dependencies and let composer do the job.

      For the composer based installation of Elgg to work Elgg itself is defined as a dependency and fetched by composer then. The zip archives of the Elgg releases contain an image of an installation made with composer (simply said) with all the external dependencies already included.

      For developing or customizing Elgg and using composer nonetheless you would have to fork Elgg and then pull your forked Elgg version instead. Strictly speaking, you shouldn't modify Elgg core files though but make all customizations by creating a plugin(s). So, you wouldn't necessarily have to fork Elgg itself. You could also put your plugin(s) on github/packagist and then add them in the composer project as dependencies. Then they will get added to an Elgg installation made by composer. Or you could just copy your own or other additional plugins in the mod folder regardless if it's a composer or zip archive made installation of Elgg.

      Elgg already has some event handlers that get triggered at specifc situations, e.g. a user logs in (see http://learn.elgg.org/en/stable/guides/events-list.html). Another mechanism are plugin hooks that get triggered by Elgg/plugins at specific points.

      The login redirect depending on gender could work with the following code (untested and also the part of the code that checks the gender profile field is not included - you would have to add that on your own depending on the profile field name/type... shouldn't be too complicated):

      <?php
      
      elgg_register_event_handler('init','system','gender_login_init');
      
      function gender_login_init() {
          elgg_register_event_handler('login:after', 'user', 'gender_login_event_handler', 9999);
      }
      
      function gender_login_event_handler($event, $type, $user) {
          if (empty($user) || !elgg_instanceof($user, "user")) {
              return;
          }
      
          elgg_register_plugin_hook_handler("forward", "system", "gender_login_forward_hook");
      }
      
      function gender_login_forward_hook($hook_name, $entity_type, $return_value, $params) {
          
          $user = elgg_get_logged_in_user_entity();
          if (empty($user)) {
              return $return_value;
          }
      
          // HERE YOU HAVE TO ADD THE CODE THAT CHECKS THE GENDER OF THE USER AND SETS THE FORWARD FORWARD URL
          // AS YOU WANT IT TO BE DEPENDING ON THE GENDER
          $return_value = $forward_url;
      
          return $return_value;
      }
    • Im so blown away with the way you know this, i have sat looking  at the registration page for ages, if you call the page , and then view source there are no values set for a drop down of male female and yet it gets  it 100% into the db.

      Thank you so much for your help i will go back and look again with what you have given me ..

      Have an awesome day :-)

  • Colin replied on the discussion topic the admin users
    Hi,Thanks very much for having a look , i think i might have  a different problem here :-) view reply
  • Colin replied on the discussion topic the admin users
    Hi iionly I could really use your help again if you can have a look , on first glance that mod to the private profile l seemed perfect , but firstly the pages about terms and privacy only work if your longed in , and the second thing is it was... view reply
  • Colin replied on the discussion topic the admin users
    hi iionly You are 100% correct , I wilI try my best to be more considerate in the future :-), would like to make friends here , not aggravate people.  I do not know how to thank you enough,  it works perfectly, I got so frustrated... view reply