XF 2.2 Article thread and forum updates and improvements

article previews.jpg
Screenshot 2020-07-31 at 12.54.25.png
When we first announced support for article-type threads and forums, we noted that this was an initial foray and that revised styling was in the pipeline.

Today, we can show you some of those revisions and the options that come with them.

Revised article styling​

Screenshot 2020-07-31 at 12.31.41.png
Firstly, we have some updates for the main article thread page.

The author section at the bottom of the article has had some attention to visually separate it a little more from the article body, and in order to provide a bit more meat for search engines to bite into, the author's about text is rendered underneath their name too.

As articles can be very long, we also show the author's name in the attribution bar at the top of the article too, along with the number of comments that can be found below the article body.

Behind the scenes, we've also added schema.org metadata markup to help identify this content as an article and associated author, which will be more highly regarded as quality content by search engines than a standard forum thread.

Screenshot 2020-07-31 at 12.28.12.png


New listing layouts​

For 2.2.0 beta 1, article forums can list their contents either in standard thread listing format, or the new 'expanded' view.

Screenshot 2020-07-31 at 11.37.39.png Screenshot 2020-07-31 at 11.37.28.png

With 2.2.0 beta 2, these options have had a re-think.

Screenshot 2020-07-31 at 13.02.24.png


We have renamed the 'Full' option, which shows a standard thread listing to Standard. (We have also renamed any other instances where a thread listing is shown from full to standard, you'll find this mostly in widget options)

Expanded view​

Screenshot 2020-07-31 at 12.42.37.png
The existing Expanded option has been revised, and now pulls a modified version of the full article first-post template that removes the footer controls and adds the article title.

If you set the snippet length option here to 0, the entire first post (the article) will be rendered in the list, such that multiple full articles are visible on the listing page, much as you would expect to find on a blog.

Of course, you can choose a snippet length if your articles tend to be very long, or if you want people to view articles on their own canonical page along with their comments.

Preview​

Screenshot 2020-07-31 at 12.54.25.png
Preview is our new, third display option for article listings.

It displays article blocks in a responsive grid, with the first article on the page occupying the full width of the page, the next few being half-width and the subsequent blocks occupying a quarter width. The grid is entirely CSS driven, and I'm sure we'll see all manner of different layouts in use with custom CSS before too long.

Preview mode is intended to be used with a snippet of the article text, and includes the ability to show a cover image, which currently fetches the first embedded image from the article, whether that be hot linked with an [IMG] tag, or directly attached. If no image can be found, the layout will gracefully omit the cover image.

The most important info about the article is all here, including the author's name and avatar, a link to the comments and indicators to show unread comments.

Inline moderation works in all article listings now.

Screenshot 2020-07-31 at 13.01.01.png

Similar schema.org metadata markup to that in full and expanded articles is also present in previews.

It's worth noting that the cover image only has to be the first embed in the article in order to be used as a cover, but it does not necessarily have to be visible. A sneaky trick to get a cover image that is separate from the content of the article is to set its width and height to 0, rendering it invisible in the actual article body.

Screenshot 2020-07-31 at 12.52.40.png

Conclusion​

Article threads and forums are an important part of the feature set for XenForo 2.2, and one that we intend to continue to develop as time goes on. This is probably as far as we'll go for 2.2, but we hope that you'll be happy with what we've done so far.

I should also add some credit to The Brothers Brick, whose excellent RSS feed populates my article test data - Kier
 

Andy.N

Well-known member
Indeed I actually have. I originally used Xenporta as a homepage but with the layout of the articles page looking arguably better, using xenporta just kinda felt unnecissary so I now use the articles node as a homepage with a sidebar.
Is the link in profile is xF running articles forum as portal?
 

Andy.N

Well-known member
Yeah exactly. The xenporta addon isn't really needed when the buily in node looks better.
Can you tell me how you set up your index route in the ACP?
I entered the link to the articles forum which is forum/articles.36/ and the home page shows url to the articles forum instead of how it shows on your site.
Link to my site is quantnet.com
 

Kevin

Well-known member
Anyone has done anything similar?
At the moment my thinking is that I still want granular control over what shows up on the front page so I'm using CinVin Home for the front and working on a "featured threads" addon that displays selected threads in a widget but using the XF "article" template. Really the thought in my head was that not all article threads are necessarily to be featured on the front page and at the same time not all threads to be featured might be an article thread type.
 

JoyFreak

Well-known member
Did the schema.org article metadata markup for article thread types get removed? I can't find it in any of the templates.
 

Kevin

Well-known member
Did the schema.org article metadata markup for article thread types get removed? I can't find it in any of the templates.
With 2.2 the metadata has been removed from the templates and is now done in code by entity type (there's a generic abstract handler function getLdStructuredData and then at the type level it updates the default value to the individual type such as "article").
 

JoyFreak

Well-known member
With 2.2 the metadata has been removed from the templates and is now done in code by entity type (there's a generic abstract handler function getLdStructuredData and then at the type level it updates the default value to the individual type such as "article").
Is type the only value that gets updated?
 

JoyFreak

Well-known member
For an article, yes. Take a look at src/XF/ThreadType/Article.php and the getLdStructuredData function.
That's great. So If I wanted to change the schema from "Article" to "NewsArticle", that would be the only value that needs changing, right? Thank you!
 

Kevin

Well-known member
That's great. So If I wanted to change the schema from "Article" to "NewsArticle", that would be the only value that needs changing, right? Thank you!
Yes, but you wouldn't want to change the value in the file, instead doing as an extended function would be best. We can follow-up that line of though in the IM chat. :)
 

JoyFreak

Well-known member
I noticed that, when testing the structured data, the image doesn’t output the article cover photo url. Instead it uses the posters avatar. Wouldn’t it be better to check if the article has a cover photo and then to use it, and use the avatar as a fallback?
 

Kevin

Well-known member
That's great. So If I wanted to change the schema from "Article" to "NewsArticle", that would be the only value that needs changing, right? Thank you!

Yes, but you wouldn't want to change the value in the file, instead doing as an extended function would be best. We can follow-up that line of though in the IM chat. :)
Try the attached add-on instead of touching the XF php file; there's only one option 😁 in the ACP and it's to set a new schema @type value for "Article" threads. Changing the value in the PHP file may seem like an easy way versus doing an add-on with (currently) a single function but it'll just cause headaches in the long run.

If nothing else, as you work on getting a development environment up & running you can use it to see a quick & dirty function extension. :)
 

JoyFreak

Well-known member
Try the attached add-on instead of touching the XF php file; there's only one option 😁 in the ACP and it's to set a new schema @type value for "Article" threads. Changing the value in the PHP file may seem like an easy way versus doing an add-on with (currently) a single function but it'll just cause headaches in the long run.

If nothing else, as you work on getting a development environment up & running you can use it to see a quick & dirty function extension. :)
Thank you very much Kevin! I'll be installing shortly. :)
 

doublespaces

Well-known member
I just realized a search forum can't be displayed like an article page (preview/expanded). I don't care if the actual thread itself has the article format, but the display of the thread in the thread list, can that be shown like an article forum? Would be really nice if we could 'force article forum layout' on a search forum.

Then I just have to disallow the tag 'featured' and then as admin I should be able to over ride that and add the featured tag to every thread I want to promote to the 'front page'.
 

JoyFreak

Well-known member
I just realized a search forum can't be displayed like an article page (preview/expanded). I don't care if the actual thread itself has the article format, but the display of the thread in the thread list, can that be shown like an article forum? Would be really nice if we could 'force article forum layout' on a search forum.

Then I just have to disallow the tag 'featured' and then as admin I should be able to over ride that and add the featured tag to every thread I want to promote to the 'front page'.
There’s a lot of requests for this. I’m not sure quite sure if there’s a suggestion somewhere so you could vote for it. It seems like a popular request to have search forum allow to display as article type. Although they only thing I feel is a downside to search forums is the cache. It’s not always going to be “live” threads but I’m sure there’s a setting to adjust the timing but not fully turn it off. However, there is a work around. Like on my forums I’m using a couple of add-ons to achieve this.
 

doublespaces

Well-known member
There’s a lot of requests for this. I’m not sure quite sure if there’s a suggestion somewhere so you could vote for it. It seems like a popular request to have search forum allow to display as article type. Although they only thing I feel is a downside to search forums is the cache. It’s not always going to be “live” threads but I’m sure there’s a setting to adjust the timing but not fully turn it off. However, there is a work around. Like on my forums I’m using a couple of add-ons to achieve this.

Found one:


I don't mind the cache, however as a home page with featured 'articles' or threads in my case, the 'featured date' wouldn' be recognized so that would probably require a third party modification. However getting things displayed in article format would be the first step.
 

Slion

Active member
Just upgraded from XF 2.1 to XF 2.2.2 and started trying out that Article feature which is very relevant for me on slions.net.
I have not yet figured out how to enable that cover image on converted threads but I guess I'll get around it at some point.

I've also ported that newly published TOC add-on to XF 2.2.2.
It looks like it could be interesting for anyone publishing long articles.
Unless they already have something similar the XF team may also want to integrate such features to support those Articles.
Here is a demo:

Edit:
Just found out how to change the type of a forum node and enable Preview listing. Nicely done XF team (y)
 
Last edited:

erich

Active member
I love this feature about Xen 2 and hope you continue to expand on it. I've used MyBB in the past and they had a plugin called Xthreads where you had unlimited control over the design of the threadlist and newthreads. The flexibility was stunning and this is a great step towards that flexibility in Xen. I really do love it and looking forward to the future improvements.
 

Wildcat Media

Well-known member
I had an issue in one of my forums where I wanted to use Articles, but did not want to splinter articles off into their own forum, as we have our forums arranged by topics and I would rather keep them grouped that way.

My solution for that was another newer XenForo feature--a Search Forum. What I did was set up a search forum that allowed the Article thread type, and it pulled all of those into one tidy area that I used for feature articles and news. It's not quite ideal (members get confused that they're dumped into the originating forum vs. ending up back in the search forum), but it's a good way to highlight content.

Ideally I wanted to find a way to have that search forum be our entire site's home page, but for now this will do.
 
Top