I am writing a plugin for school project to create special type of group. I extended the ElggGroup with a new class let's say Committee. I have trouble listing the objects of type Committee. The committee objects when listed the url still points to them being as 'group' object. When I tried to edit these objects it goes to default 'group' edit page rather than my newly created page.
The objects listed show up with trailing brackets '( )' and hovering over them shows the message "
This entity cannot be displayed correctly. This may be because it requires support provided by a plugin that is no longer installed."
Help is greatly appreciated
Animesh
This discussion is closed and is not accepting new comments.
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.
<?php
$objects=str_replace("mentorspace","groups",$objects);
$area2 .= elgg_view
(
'groups/contentwrapper',
array
(
'body' => elgg_view
(
"groups/group_sort_menu",
array
(
"count" => $group_count,
"filter" => $filter
)
)
. $objects
)
);
?>
<?php
$objects=str_replace('</a>)','',$objects);
$objects=str_replace('(<a href','<a style="display:none;" href',$objects);
$area2 .= elgg_view
(
'mentorspace/contentwrapper',
array
(
'body' => elgg_view
(
"mentorspace/group_sort_menu",
array
(
"count" => $group_count,
"filter" => $filter
)
)
. $objects
)
);
?>
@a4animesh, I used the original content of group/group in group/elggteste.
Dhrup
Thanks for your post. Your filtring works for me.
Actually digging deeper looks like I do not need the filtering in my new cloned group plugin. The problem was in my start.php
on following statement
register_entity_url_handler('groups_url','group','all');
when I changed it to
register_entity_url_handler('committee_url','group', 'committee');
All the urls started showing up properly. I did not need to use the filter approach anymore. Leo & Dhrup thanks for your suggestions.
Animesh
@animesh i need a simple way to clone a group
did i understand you right,
that you copy the group plugin and rename it to "committee"
and you replace "group" with "committee" and "groups" with "committees" in the php code
and you did the same with the filenames?
except the statement in the start.php: register_entity_url_handler('groups_url','group','all');
you changed to: register_entity_url_handler('committee_url','group', 'committee'); ?
and the group clone is ready . . .
please, say yes ;-))
Yes I am trying to do that but haven't gone too far. At each step there is some or other trouble. I wish I can set up PHP debugger to work with Eclipse and WAMP. I am fumbling with plain elgg_log.
Ok it probably isnt just me thinking this, and I am no coder, but can we link up all the group discussions. there are a few over the community and they all point to the same thing. "how can we adapt the Elgggroup entity to do what we want." In my opinion (lol again non coder) the Core is the issue. It restricts the the Core Ellggroup entity to being the only entity with serious coding. This is more than a mod that needs to be donw, it needs a core change. In fact the four entities restrict Elgg to being just that, a locked down website without serious changes that then make it harder for upgrades and plugins to be used.
@n0de
There's no need for a "core change" lolz ;-)
The Elgg MVC Architecture - Data Model, Views, Controller is far more powerful than a "non-coder" could imagine in their dreams...
I have cloned, extended, etc Groups far beyond Elgg and - it is not rocket science.
btw - if you're a non-coder - you really should not comment on highly technical post
Ok...
It most probably is just only you thinking this, and you are no coder
LOLZ
@node those 4 basic entities in Elgg allow you to do pretty much anything you want. One of the things I love about Elgg is the actual thought that went into the design of the core and its ability to be easily adapted, tailored, and reused. Adapting groups isn't particularly difficult once you understand how they work. What it does require is coding skill.