Thanks for that but i'm afraid it doesnt give a very specific answer to my problem. What i really need to know is what sort of file structure i would need inside my theme plugin if i want to overwrite another plugin contained inside 'mod'. I have already figured out how to overwrite normal views but those inside plugins continue to elude me.
Any help is appreciated
Hi all. really could use some help with the above problem still. I really need to know how to override the views of one plugin with another. As i say i can do the normal site views, but have no idea what structure i need inside my theme to override the views of other plugins. All i'm trying to do is overwrite some profile views with a theme plugin.
Please help a scared little newbie!
thanks
If a plugin has the file: /mod/profile/views/default/profile/userdetails.php
You can override it in your plugin by creating a file in the same location:
/mod/my_plugin/views/default/profile/userdetails.php
As long as your plugin is loaded after the profile plugin, your view takes priority.
Hi Ollie,
Check out the profile plugin's iconupload action. It will show you how to crop and resize photos. Adding another size would just be duplicating that, and then updating any references you want to your new size.
Thanks for that. i'll take a look. can i ask one more stupid question. Do i have to enable elgg to show a users profile pic in the profile page or should it be there by default? the reason i ask is because i can't see the pic i've uploaded in my profile, yet i can see it as a mini icon in the top bar and also in the newest memebers plugin etc.
I don't think i've touched anythign to break the function but i'll go back and check.
Thanks
Bad idea. Better to just create a custom ElggObject that saves your text. You could try looking at the blog tutorial on the Docs wiki except make it a tool for the admin to set custom front page text. Then load that object within your custom index and display. Much cleaner than trying to hack the access levels.
Ok, so i've followed your advice and have a nice plugin which has a form that i can use to input strapline and piece of welcome text into an object. I've even managed to protect it form people are not admin! The only issue i have now is that at current when i finally get around to calling 'save' on my object it creates a new record eachtime.
I've discovered that save() looks to see if a guid is set and otherwise creates a new record, so i tried passing in a guid with $object->guid = 1; but this seems to have no effect. Should i be using something other than save() or am i missing one fundament piece of the puzzle?
appreicate the help by the way, and even with my issues i'm liking Elgg.
Ollie
Ok scratch that, think i have it working now. Turns out i was going all about creating a new Object but instead i just did get_entity() and then edited and saved it again.
Thanks.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.