• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

XenForo Article Addon

IanC

Active member
There have been lots of requests for an article system addon for XenForo, but as yet I couldn't find one that was finished or ready to be integrated in to the core.

So for the time being, I've created a very simple one by just adding a custom template. I thought it may help by outlining how to do this, as it's simple do and works well.

Here's an example of the article listing page and an article:
http://www.win8forums.com/forums/windows-8-articles.24/
http://www.win8forums.com/threads/install-windows-8-in-virtualbox.80/

I'm hoping to add a simple expansion by adding a thumbnail as the avatar placeholder (in time).

To begin:
  • Create a "child" to your main style
  • Create your article forum(s) and force the new child style choice
You've now got your article sections using the new style, but you need to customise it properly. You'll need to open up the following templates in your editor and edit them as you see fit to get the look you are after:
  • message
  • thread_view
  • thread_list
  • thread_list_item
The changes I made were to remove the author info box, quick reply options and then tweak some of the button text. As each site design differs, I've not posted the exact changes as I've made so many others to the template. But as an example, you'd need to look for the following code in "message" to remove the user info box:

<xen:include template="message_user_info">
<xen:map from="$message" to="$user" />
</xen:include>

It should also be possible to re-style the replies so that it looks like a comments section - there are lots of things that are easy to do with the templating system that will allow you to make an article section without needing an addon. Once addons start to appear it should be possible to import them easily enough as they are just within the normal thread/post DB.
 
Why are replies to the Article hard to do if the article is just a regular XenForo thread ?

It's not hard, but it's requires some extra work to work properly - especially if you want the first post to be shown on all pages of comments (I'm not sure how to do that yet). I'm currently working on a way to get a separate comments thread to be automatically created when an article is posted :).
 
So really as long it's a first post on each page, all you'd have to do is make sure the first post of the thread is styled different to match your article template. Which I think is what they were talking about in the chief post thread.
 
Your addon is very intresting.
It automatically has permissions/ can display a category in node tree/ has author, date of posting.
bbcode editing wiith all that includes for styling, links, images.
Comments in a far richer mode than blogging.

Could also have pagination, using a series of posts on a thread.

Would be useful to be able to create fields to submit to the post for different kinds of Articles, like Quotes.

Congrats Ian. Nice bit of lateral thinking there!
 
Top Bottom