Hello,
I am creating a journal plugin where there is a group of editors that publish things and the journal is publicly accesible.
The main object is a journal (an ElggObject). The journal object is the container for many objects (ElggObject).
$journal = new ElggObject();
$journal->title = get_input('title', '');
$journal->description = get_input('description','');
$journal->subtype = "journal";
$journal->access_id = 2;
$journal->save();
I have integrated the blog plugin which is perfect to publish things on the journals. I add new blogs to the journal doing:
Where 55 is the GUID of a journal object.
Am I using it correctly? In that case, the breadcrumb is not correctly written.
I propose the following change:
In blog/lib/blog.php, line 40, add (or something similar):
if (elgg_instanceof($container, 'group')) {
elgg_push_breadcrumb($crumbs_title, "blog/group/$container->guid/all");
} else if (elgg_instanceof($container, 'object')) {
elgg_push_breadcrumb($container->title, $container->getSubtype() . "/view/$container->guid");
} else {
elgg_push_breadcrumb($crumbs_title, "blog/owner/$container->username");
}
Best regards
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.
- Brett@brett.profitt
Brett - 0 likes
- Miguel@elmendavies
Miguel - 0 likes
- Miguel@elmendavies
Miguel - 0 likes
- Miguel@elmendavies
Miguel - 0 likes
- Brett@brett.profitt
Brett - 0 likes
You must log in to post replies.Hmm. This is an unanticipated use of blogs. As you discovered, we use the GUID in the add URL as a container and is intended only for groups. Would you mind opening a trac ticket for this so we can discuss it more? http://trac.elgg.org
Dear Brett,
I have been reading about ElggGroup. Maybe, the best would be to implement journals as ElggGroup?
Thank you!
I have checked the groups plugin. I could use the 'group' type and subtype it 'journal'. I think I would be following elgg philosophy better. In that case, the journal would appear in the list of groups (Not complettely what I spected). Does eanyone have a recommendation?
Thank you all!
I have creted a ticket here:
http://trac.elgg.org/ticket/4501
Miguel - I've updated the ticket to reflect the actual debate the team will have about implementing your changes.
Using an ElggGroup entity is a possibility, but yes, it will show up in the list of groups. You will need to override the groups page handler to change it. This is intentional behavior. There's a ticket about that here: http://trac.elgg.org/ticket/1987