Jaime Parra

Send private message

You must be logged in to send a private message.

Friends

No friends yet.

Group membership

Activity

  • Jaime Parra added a new discussion topic Need Help Replacing a page in the group Beginning Developers
    So, here is the deal, I am writting a plugin that adds some features to a few specific pages. And I'm basically done with it, however, since so far I've been having trouble with rewritting pages, I've done it in the original plugin.  Basically...
    • using elgg_register_page_handler will require you to replace *every* page starting with photos/

       

      To replace a single page you should look at the route hook

       

      elgg_register_plugin_hook_handler('route', 'photos', 'my_photos_handler');

  • Jaime Parra added a new discussion topic Need help replacing a page in the group Tidypics Photo Gallery Plugin
    I wrote a plugin that adds some features to this plugin, speciafically on the siteimagesowner page, it adds unctionality to throw images into a default folder, and I'm basically finished with it. However, I'm having some trouble with the start.php...
  • I've been tasked with making a plugin that extends the functionality of tidypic. When you click on "add photo" a regular upload page, where you are able to load the images into an generic upload folder. And frankly I need some help. First of all, I...
  • Jaime Parra replied on the discussion topic Very specific question about overwrittig a page
    yes, I am just removing the crop functionality,I have not tried the dummy functionality or extentions, so I'll be trying this now, thanks a lot for all your help! view reply
  • Jaime Parra replied on the discussion topic Very specific question about overwrittig a page
    ok, I got the view one to work now. But I still need to do the second one. I need to make it so that instead of uploading /elgg-1.8.15\pages\avatar\edit.php I need \elgg-1.8.15\mod\SpikeDisplayPage\pages\avatar\edit.php to be displayed. Can you give... view reply
  • Jaime Parra replied on the discussion topic Very specific question about overwrittig a page
    is there any way I can test this? it does not seem to be working for me. Is there a line of code I need to add somewhere? If there is a place on the documentation I can read up on this I woud be mega appreciative. Thanks a lot for  your time... view reply
  • Jaime Parra added a new discussion topic Very specific question about overwrittig a page in the group Beginning Developers
    Thanks in advance for the help! Basically I am making a basic plugin, and I've figured out most of it. I ave located where the changes are going to go and everything. Getting down to my question, I need to replace the file...
    • Replacing a single page (from some other plugin) is a little trickier. There's a plugin hook called "route" that gets called for every (non-action) page. You'll want to register for that hook, analyze the segments of the URL and, if they match what you want, you call your function to echo a page and return true.

      I highly recomment setting up an xdebug environment where you can walk through requests, set breakpoints, see values at each step, etc.

    • What exactly do you want to change in pages/avatar/edit.php?

      This page is built up with two views:

      views/default(core/avatar/upload

      and in case an avatar image has been uploaded also

      views/default/core/avatar/crop

      The noCrop() function in your initial posting makes me believe that you might want to prevent image cropping. This might work without changing the pages/avatar/edit.php. You can not only overwrite a view by adding a view file with code in your own plugin. If the view file (same name for the view file in the corresponding place within the views directory of your plugin) is present but is only an empty file (more precisely not creating any output) the original view gets overwritten nonetheless. So, if you create a placeholder file mod/SpikeDisplay/views/default/views/default/core/avatar/crop.php it could already solve your issue.

      Or it might work by "extending" the views/default/core/avatar/upload and/or views/default/core/avatar/crop views to add some options to the avatar edit page. I've extended this page by extending the upload view for example in my Identicon plugin (http://community.elgg.org/plugins/1155619/1.8.0/elgg-18-identicons). In this case the line elgg_extend_view('core/avatar/upload', 'identicon/editusericon'); in start.php extends the upload view with the editusericon view.

    • yes, I am just removing the crop functionality,I have not tried the dummy functionality or extentions, so I'll be trying this now, thanks a lot for all your help!