RobParker

Registered
If this could be part of XenBase then that'd be great but I'm certainly not expecting Steve/Russ to come up with a solution as it's probably quite niche.

We have a couple of forums that we treat as "news" forums and we'd like to style the thread view in these forums to look more like articles (i.e. remove the postbit, make replies look more like "comments", etc). The horizontal postbit setting would almost be enough for the comments, then the first post would just need styling differently.

This all sounds like it should be possible but if anyone has any suggestions/advice that'd be great.
 

Russ

Pixel Exit Staff
We could probably add some classes to assist with this but I don't think it'll any further than that as you mentioned it's rather specific.

The classes could be as simple as open-post on the first message of the first page. I'm pretty quick with CSS itself if you had an example of how you wanted it to appear I can always provide the CSS.
 

Steve

Pixel Exit Staff
The only issue those changes require main template edit which then break addons, CSS would be would the best route but I’m not sure it can be done in the same manner as Xenporta 1.
 

RobParker

Registered
The only issue those changes require main template edit which then break addons, CSS would be would the best route but I’m not sure it can be done in the same manner as Xenporta 1.
Does the first post in a thread not have it's own CSS class? If it doesn't then I can see that'd be trickier!

Edit: isn't first-child an option?
 
Last edited:

Steve

Pixel Exit Staff
Well we can make it look different without doubt but just don’t think we can mimic that whole layout of article view in Xenporta. It would also have to be done per node basis which isn’t a big deal, just a good bit of extra leg work to make it configurable. It would really be easier in the long run to just purchase XP 2 :p
 

RobParker

Registered
Well we can make it look different without doubt but just don’t think we can mimic that whole layout of article view in Xenporta. It would also have to be done per node basis which isn’t a big deal, just a good bit of extra leg work to make it configurable. It would really be easier in the long run to just purchase XP 2 :p
Ah ok, I see what you mean. XP2 no longer allows the automatic promotion of a whole forum so it doesn't really fit our needs any more and a simple widget/portal page does what we need better.

If the first post can be made to look something like the horizontal postbit and all subsequent posts the standard postbit then I think that'd be all the help I'd need :)
 

RobParker

Registered
Never to be implemented?
Nope

It's basically all we used XP1 for but XP2 focuses on manually promoting content (which is fair enough). Apparently automatic promotion was a big resource issue and Jaxel said it won't be re-added. As a compromise he added a scraper in the ACP to scrape a forum and promote the content that way but it's not automatic, it's more a batch promote which is still not much use to us.

A page utilising some widgets to display latest content from a specified forum is a much better way for us going forward, just need to figure out how to style it a bit more like an article :)
 

Russ

Pixel Exit Staff
This is just one example what some simple CSS can do:

Screenshot_1.png

Code:
.message:not(.opening-post)
{
    padding: 10px;
    background-color: @xf-contentAltBg;
    border: 1px solid @xf-borderColor;
    .message-cell
    {
        padding: 0;
    }
    .message-cell--user
    {
        background-color: transparent;
        padding-left: 0;
        border-width: 0;
        .avatar
        {
            width: 70px;
            height: 70px;
        }
        .message-avatar img
        {
            width: 70px;
            height: 70px;
        }
    }
    .userTitle, .message-userExtras, .message-userArrow, .userBanner
    {
        display: none;
    }
}
Or if you change this line:

Code:
.message:not(.opening-post)
To:

Code:
.message.opening-post
It'll give just the first post the styling:

Screenshot_8.png



Of course... this is with an added class. I think XF ditched the whole showing which node you're in by default so we'll need to dig up and make sure we can add that class in.
 

RobParker

Registered
That's great, thanks!

Is it straightforward enough to change the post bit on the first post to the horizontal version?

I'm not sure I understand what you mean with your last paragraph? Is the extra class you mention the opening-post class? Or do you mean to apply this to a specific forum you'd need to add a new class?
 

Russ

Pixel Exit Staff
That's great, thanks!

Is it straightforward enough to change the post bit on the first post to the horizontal version?

I'm not sure I understand what you mean with your last paragraph? Is the extra class you mention the opening-post class? Or do you mean to apply this to a specific forum you'd need to add a new class?
So opening-class in the CSS doesn't exist right now, we'll need to add that in which I'm fine being in XB.

In XF1 it added classes like this on the body: node142 so you could easily target specific nodes, I don't think that exists in XF2 so just need to make sure which node you're in is actually exposed without an add-on.

I suppose changing just the first post to horizontal would be easy, we use just CSS so you'd just need to load that CSS under the opening-post class which we can help when we push the release with the right classes.
 

Pre-Sale Questions

If you have any questions or concerns you want to ask before you make a purchase don't hesitate to use one of our multiple support channels for your convenience.