denis d

Send private message

You must be logged in to send a private message.

Friends

No friends yet.

Group membership

Activity

  • denis d added a new discussion topic Ajax in plugin settings in the group Plugin Development
    Hey guys I'm kind of stuck. In my plugin settingspage in Elgg 1.8 I would need to generate some php files, so I was thinking of using ajax to call a php script that generates the file i need, nothing seems to happen. When trying to return something...
  • denis d joined the group Plugin Development
  • denis d replied on the discussion topic Get all plugin settings
    Exactly what i need, thank you very much! view reply
  • denis d added a new discussion topic Get all plugin settings in the group Beginning Developers
    Hey guys, What i have right now is an plugin settings page that enables the admin to add fields dynamically to an object. On the site users will be able to make 'item pages' these items got a title, a description and the fields the admin set in...
  • denis d replied on the discussion topic Different object views
    Ah yes I see, the full_view is exactly what i need, thank you for this. I see what you mean with the different views, I'll try things out with the pointers you gave me. Thank you fro your help! view reply
  • denis d added a new discussion topic Different object views in the group Beginning Developers
    Hey everyone I would like to know if it is possible to make different object views for the same object.For example, when on the list page there needs to be a small 1 line view, when in 'full' list page there need to be a bigger object view with...
    • Hi Denis,

      I would like to know if it is possible to make different object views for the same object.
      For example, when on the list page there needs to be a small 1 line view, when in 'full' list page there need to be a bigger object view with more information.

      Yes this is possible, in the object view (eg /views/default/object/<yoursubtype>) there is a variable avaiable which tells you how people would like to view your object.

      The variable you're looking for is $vars["full_view"] which can be true or false. If you want to learn how to use this look at the blog plugin (Elgg core) in /mod/blog/views/default/object/blog.php you can learn how to handle different things.

      Another question that is kind of related, I want the objects i make with my module 'generic', when i change 1 line in the language file the object needs to be a different object name. But seeing the object view needs to be the name of the object is this possible in any way?

      Changing the subtype of you object is very hard, you need to thing ahead a little when chosing a subtype.

      What you can do is if you wish to have 1 view for 2 or more subtypes is: in both views of the objects just echo an another view (eg /views/default/object/subtype1 & /views/default/object/subtype2 both call elgg_view("my_plugin/generic_object_view", $vars).

      If you are using language keys based on the subtype you can just ask the $vars["entity"] which subtype it is by calling $vars["entity"]->getSubtype()

      Hope this helps

    • Ah yes I see, the full_view is exactly what i need, thank you for this.

      I see what you mean with the different views, I'll try things out with the pointers you gave me.

      Thank you fro your help!

  • denis d replied on the discussion topic Entity with 2 different object views
    I found a reference on this page: http://docs.elgg.org/wiki/Engine/Views   $full - Whether to display a full version of the entity. (Defaults to false.) This last parameter is passed to the view... view reply
  • denis d added a new discussion topic Entity with 2 different object views in the group Beginning Developers
    Hey guys Like my title states, I want to have a different object view when I go to the entity URL or when the entity gets listed in a elgg_list_entities.  Right now I made a custom view that's perfect for my object view but not for...