Improving blog plugin tutorial

I've updated the blog tutorial: http://docs.elgg.org/wiki/Tutorials/Blog

  • updated to Elgg 1.5
  • added the missing add page so code is now functional
  • fixed lots of errors

If anyone has other suggestions to improve this tutorial, I'm interested.

  • SInce you have been of great help Cash, though I'll contribute to the ongoing documentation. :)

    There is an error for:

    include_once(dirname(dirname(dirname(__FILE__))) . "engine/start.php");

    It's missing a forward slash before engine.

    I had problems displaying the blogs until it was corrected. Hope that helps
  • Thanks! It has been fixed.

  • I think an introduction about adding to the main menus and the side navigation might be of help.  What do you think?

  • As part of the simple blog tutorial or maybe as part of an extended blog tutorial (a continuation)?

    The first tutorial would a really basic one and the second could add to it with more advanced features to keep from overwhelming people in the first tutorial.

     

  • I think a continuation from the blog tutorial would be best.  we dont want to overload people.

    I know how to add a static navigation to the left for the plugin, but what i dont know is how to add a general one.

    for example adding to index.php is simple enough but what about:

    add.php, and blog.php.

    I noticed the page plugin is directed to a different url for its views. 

    Hope you get the picture.

    Thanks

  • If I understand your question, the answer is this:

    Plugins that want to have their own set of links on the side bar add them using the 'pagesetup','system' event. They register a handler for that event (which is triggered the first time elgg_view or related function is called).

    In the handler, you typically check for the right context and then add the links using:

    add_submenu_item(<link text>,<link>);

    There is usually also logic to control what links appear when the owner of the page is viewing versus someone else.

     

  • Thanks.  I'll experiment and let you know how I do.

  • Hi Cash,

    I'm using this plugin over a year ago, but now my client wants to add a new feature for it.

    He wants to add a search filter at the top of the page to filter the posts by most recently added and most recenlty commented.. I don't know how to do that.

    Can you help me please. I'm using v 1.5

    Many appreciated

     

  • This tutorial help me to actually learn how to create a plug-in it is commented beyond nice....

    here is my suggestion: Continue the tutorial and add edit and delete actions to it....

    And this is something i want to do: adding the ability to create categories inside the plug-in because the site wide category plug-in ads the categories to every plug-in that supports it and i what separate categories for my plug-ins.....

  • I am trying to learn coding plugins with that, but I am not sure, if this turorial is still up to date for elgg 1.11 - or if I made a mistake following it.

    http://learn.elgg.org/en/latest/tutorials/blog.html

    The plugin won't start, the error log says: 

    PHP Fatal error:  Call to undefined function elgg_view_resource() in /var/www/html/elgg/mod/my_blog/start.php on line 10

Feedback and Planning

Feedback and Planning

Discussions about the past, present, and future of Elgg and this community site.