You forgot to register the event 'register' => 'menu:title' in the elgg-plugin.php.
'events' => [
'register' => [
'menu:title' => [
'\MyPlugin\Profile\Menus\Title::register' => [],
],
],
],Now create a file \mod\my_plugin\classes\MyPlugin\Profile\Menus\Title.php with this code:
<?php
namespace MyPlugin\Profile\Menus;
class Title {
public static function register(\Elgg\Event $event) {
$user = $event->getEntityParam();
if (!$user instanceof \ElggUser || !$user->canEdit() || !elgg_in_context('profile')) {
return;
}
$return = $event->getValue();
$return[] = \ElggMenuItem::factory([
'name' => 'avatar:edit',
'icon' => 'image',
'text' => elgg_echo('avatar:edit'),
'href' => elgg_generate_entity_url($user, 'edit', 'avatar'),
'link_class' => ['elgg-button', 'elgg-button-action'],
]);
return $return;
}
}
Fantastic!
Thank you so much for the fast and easily understandable answer.
At least I had the folder path correct in the first try.
The idea for the menu was also the right one, but not fully correct.
And once again, I forgot to register the event in my plugin. That's a lesson you taught me before, but I forgot as I didn't do any updates on my Elgg since last Spring.
I applied the code already and it looks perfect now.
Once again, thank you very much for your help!
Goodbye everyone my developing days are overwith for good. I don't know enough to carry out my project so, I am giving up on for it for good. My project is for someone with a lot more knowledge than me to do. No reason to come back anymore for good.
Take care everyone.
Goodbye for good.
I haven't quit developing, still going.
Even though I haven't quit I am not asking for help anymore with my project for good.
Welcome to Elgg!
I'm afraid you'll need a third-party developer's help to integrate an Emoji plugin into CKEditor - it's not a built-in feature in Elgg's setup. Alternatively, consider opening an issue on GitHub to get the core team's attention.
In our projects, we stick with our custom TinyMCE plugin, which packs in massive functionality including full emoji support out of the box.
Hello Nikolai,
Thank you for your reply.
I'm interested in the Tinymce plugin.
I already use Tinymce, which I've implemented on one of my forums.
For faster deployment, I'll purchase your plugin.
However, it's listed for Elgg 6.1.
Is it compatible with Elgg 6.3.3 ?
Regards
Yes, TinyMCE plugin is fully compatible with the latest Elgg version, including 6.3.3. The badge on the product card indicates the minimum compatible Elgg version.
Please reach out to me or our managers directly via the marketplace to avoid cluttering this community ;)
You can schedule this update.
Just comment out \Elgg\Upgrades\ContentOwnerSubscriptions::class, string in this file https://github.com/Elgg/Elgg/blob/5.1/engine/upgrades.php
Like Nikolai said. You can do this upgrade later.
Once you've migrated your site to 5.x you can re-enable the upgrade and run that specific upgrade in the CLI (check the params for elgg-cli upgrade). I don't know if you could run it in batches (by canceling the upgrade mid run) but most of the time these long running upgrades don't have a heavy impact on the database (you could test this). So you can have it running on the background of your live site.
Excellent -- thank you both. This will really help simplify our migration plan.
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.