Send private message

You must be logged in to send a private message.

Friends

No friends yet.

Group membership

Activity

  • TCB replied on the discussion topic Adding a footer image using css
    I believe it should be at /my-plugin/views/default/my-plugin/myFooter.css but still not working. view reply
  • TCB replied on the discussion topic Adding a footer image using css
    Thank you.. I shall give this a try. One question I need to verify is. where should my 'myFooter.css' be located in my directory structure for my plugin? view reply
  • TCB added a new discussion topic Adding a footer image using css in the group Beginning Developers
    Hi, I'm using Elgg 2.3.14 and trying to do something that should be pretty simple.  I'd like to add an image as a backround for my site's footer.  I've uploaded the image to my /mod/my-plugin/graphics directory and in my...
    • Create a new file views.php:

      <?php
      
         return [
            'default' => [
                'images/' => __DIR__ . '/graphics',
            ],
      ];
       
      Put it in your plugin:
      /mod/my-plugin/views.php
      Change your myFooter.css on this:
      .elgg-page-footer {
          background: url(<?= elgg_get_simplecache_url("images/my-image.png"); ?>);
      }
      Clean the caches.
       
      In future, you can use this snippet elgg_get_simplecache_url("images/name.jpg"); to call any images from your directory /mod/my-plugin/graphics
       
    • Thank you.. I shall give this a try. One question I need to verify is. where should my 'myFooter.css' be located in my directory structure for my plugin?

    • I believe it should be at /my-plugin/views/default/my-plugin/myFooter.css but still not working.

  • TCB replied on the discussion topic Upgrading from 2.3.14 to 3.3.6
    Yeah... it's weird and I'm not sure why I would need to override ANY of those views.  I think if I were to open the site, go to admin panel, remove my version of the page/elements directory, then flush the cache it may work. ... view reply
  • TCB added a new discussion topic Upgrading from 2.3.14 to 3.3.6 in the group Beginning Developers
    HI, I've recently upgraded to 3.3.6 from 2.3.14 (this is my first Elgg upgrade) and I've noticed that my custom plugin causes view issues when it's activated.  The reason for this, I believe, is that in my plugin I wasn't...
    • Really don't understand what happend on your installation.

      If you've any issues with the custom plugin then upgrade them.

      If you've any problem with upgrade then try to search my post on Community - how to upgrade Elgg 2 on Elgg 3:

      Shortly:

      UPGRADE 2.3 > 3.1
      - backup DB
      - backup production
      - backup /mod
      - backup elgg-config/settings.php
      - login as Administrator
      - turn off all plugins
      - turn off all simple caches' options (Dashboard -> Advanced settings)
      - go to Dashboard and stay on there
      - format your DB, tables and columns to utf8mb4 and InnoDB
      - change a new .htaccess \ nginx
      - delete old /vendor and files
      - copy the new 3.1 /vendor and files
      - add new changes in elgg-config/settings.php
      - turn on $CONFIG->image_processor = 'imagick'; in elgg-config/settings.php
      - delete old /mod
      - delete in /data folders: /views_simplecache and /system_cache
      - clean opCache
      - run upgrade.php -> go to admin/upgrades and run Upgrades -> return on Dashboard
      - copy new /mod 
      - activate only bundled plugins
      - run upgrade.php \ flush the caches

      Again, search my replies on Community for very advanced tips.

       

    • Overriding means the views provided by a plugin totally replace the original core view (or the corresponding view provided by a plugin higher in the plugin list). Overriding views is one way of modifying views if you want to change some code in the view. As the core views probably have changed between Elgg 2 and 3 you can't simply override the views of Elgg 3 using the modified views of your plugin based on the Elgg 2 core views.

      It shouldn't be necessary at all to copy ALL views into the views folder of your plugin. Only the views you need to modify need be copied and altered. Question is why it doesn't work without the views in your plugin as Elgg should just use the unmodified core views in this case. Have you references to these views elsewhere in your plugin (using elgg_extend_view is NOT necessary when overriding views btw.!). Not knowing your plugin I can't say if anything else needs to be updated in your code to work on Elgg 3.

    • Yeah... it's weird and I'm not sure why I would need to override ANY of those views.  I think if I were to open the site, go to admin panel, remove my version of the page/elements directory, then flush the cache it may work.  Fingers crossed.

  • TCB replied on the discussion topic input text field size
    Thanks.  Will give that a try. view reply
  • TCB added a new discussion topic input text field size in the group Beginning Developers
    Is there no easy way to change the size of an individual text field without overriding the input/text.php file in my plugin?  I'm using Elgg 2.3.14. echo elgg_view_field([         '#type' =>...
  • TCB replied on the discussion topic Restricting new profile field
    Sorry for not replying.. I had some family health distractions over the past couple of weeks.  So I tried using $user = elgg_get_logged_in_user_entity(); but still get the same behavior.. as in when I visit another user's profile page... view reply