lorenzo55

Send private message

You must be logged in to send a private message.

Friends

No friends yet.

Group membership

Activity

  • lorenzo55 replied on the discussion topic not working
    I copied the two files as you said RvR how do I proceed to change? view reply
  • lorenzo55 replied on the discussion topic not working
      I copied the account / register file to my view folder of my plugin, what do I do after that? view reply
  • lorenzo55 replied on the discussion topic not working
    I want to change the entire registry page, I did not quite understand how to change the whole page with your example could you give me a better example of how to change the entire registry page with plugin? Thanks. view reply
  • lorenzo55 added a new discussion topic not working in the group Plugin Development
    Pessoal porque não esta funcionando o meu load css, i want to change the css of the register. this is code that is in  register.php: directory: /vendor/elgg/elgg/views/default/forms register.php { elgg_register_css (...
  • lorenzo55 added a new discussion topic I developed a plugin but it is not working in the group Plugin Development
      Hello everyone, I have developed a plugin to modify the css of the elgg home screen, but it is not working I need help. follow codes for analysis: start.php <?php function modifica_init() { $priority =...
    • 1 - Move on github and share your code.

      2 - Learn docs.

      3 - Use the existing skeleton plugin.

      4 - Coding:

      So, your start.php should be:

      elgg_register_event_handler('init','system','modifica_init');
      
      function modifica_init(){
          elgg_extend_view('elgg.css','estilo.css', 1000); // this means that your CSS file is located in /mod/YOUR_PLUGIN_NAME/view/default/estilo.css
      } 
    • Problem 1: You css is not working because other css might be getting a priority. You can try using !important in your css

      Example:

      .classname{
       css_element: value!important;
      }

      Problem 2: Your css is not loaded correctly. You can use the following code in your start.php file

      elgg_register_css('estilo',elgg_get_simplecache_url('estilo.css')); // this means that your CSS file is located in /mod/YOUR_PLUGIN_NAME/view/default/estilo.css
      elgg_load_css('estilo');
      

      Alternatively, you can also try the solution given by RvR to load your css.

       

    • Assuming your css file is at mod/modifica/views/default/modifica/estilo.css you would load ADDITIONAL css code simply by this line in the init function in start.php of your plugin:

      <?php
      
      elgg_register_event_handler('init', 'system', 'modifica_init');
      
      function modifica_init() {
          elgg_extend_view('elgg.css','avatar_wall/estilo.css');
      }

      If you place your "modifica" plugin at the bottom of the list of plugins in the admin section plugin page estilo.css will be added last to elgg.css.

      Depending on what changes you want to make it might not necessary to do it this way though. If you only want to modify the css code of an existing css file, you wouldn't "extend" a css file (e.g. elgg.css) but you would just place your modified file at the same subpath within your plugin as it has been in the other plugin (or of Elgg core). For example the Aalborg theme overrides the Elgg core file vendor/elgg/elgg/views/default/elements/layout.css by a modified file by placing the changed file at mod/aalborg_theme/views/default/elements/layout.css. The same can be done with a plugin if you want to override the css file of another plugin if you just place your plugin below the other to overide the original file with your modified file. Then you don't need to use elgg_extend_view() in start.php at all as Elgg handles the overriding of the files automatically.

      P.S. the closing ?> at the end of php files should not be added. Elgg handles this on its own already.

  • lorenzo55 added a new discussion topic change visual of the registration screen in the group Beginning Developers
      Olá, alguém pode me ajudar com como eu mudo o html e css da tela de registro da minha rede social?