1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Additional NodeTypes and Hundreds of nodes - issues?

Discussion in 'XenForo Development Discussions' started by MGSteve, Oct 27, 2011.

  1. MGSteve

    MGSteve Well-Known Member

    Hi Guys,

    I'm looking into starting my first XF addon and just wondering what the best way to do it is.

    Its a gallery, so the idea I had was to use the Node system to construct the category structure of the gallery.

    The Nodes would not be rendered on the forum listings (one thing I need to look into anyway), but would be used by the gallery addon itself to construct the category structure of the gallery itself.

    This would have the benefit of being able to use the Node permission system in XF and obvious integration with usergroup based permissions etc..

    I'm currently playing around with creating a new NodeType, but the though occurred to me, is this is correct way or even smart way to do it?

    This obviously would result in potentially hundreds of new nodes in the system, especially with large galleries, with the corresponding increases the in the tables that manage permissions on those nodes.

    Is this likely to cause performance issues for the rest of the forum system as a whole?
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You want to avoid having too many nodes and groups. The permission calculations can get large.

    What kind of organization do you want? What kind of permissions do you need? Using an existing data structure can save time but only if it's appropriate to the task. It sounds like you want a node only for its permissions which isn't a good reason. You can create your own permissions for your addon under the Development tab in the Admin CP.
     
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I am making my own gallery (if I ever get back to it) which simply pulls image attachments from a gallery forum. To upload an image users can create a new post in that forum. The addon simply presents those images in a gallery format on a separate page. A forum works well for this because I am using it as a forum and not trying to hide, obscure, or bend it to be something else.
     
  4. MGSteve

    MGSteve Well-Known Member

    Cheers for the feedback Jake, I'll have a look at doing it a different way then.
     

Share This Page