Notifications
Clear all

wpForo 1.x.x [Closed] Is it possible to limit topic lenghs?

5 Posts
2 Users
1 Reactions
1,641 Views
RealAct
Posts: 238
Topic starter
(@realact)
Reputable Member
Joined: 7 years ago

Is there any way to limit a new topic title character length? I particularly need to limit how long topics title show in widgets on our homepage.

Thanks

4 Replies
Alvina
Posts: 1862
Moderator
(@alvina)
Member
Joined: 5 years ago

Hi @realact,

Please navigate to the Dashboard > Forums > Settings > Styles admin page put the following CSS code in the "Custom CSS Code" textarea: 

.posttitle{
white-space: nowrap;
width: 50px;
overflow: hidden;
text-overflow: ellipsis;
}

Please note the red marked value can be changed.

Don't forget to delete all caches and press CTRL+F5(twice) on the frontend before checking.

3 Replies
RealAct
(@realact)
Joined: 7 years ago

Reputable Member
Posts: 238

@alvina thanks a lot, it works but then I have this little problem, after 250 or so then it doesn't break the title line and it goes outside the sidebar edge.

How could I make it so it breaks the line like it normally does? It's weird because it happens with the "Recent Posts" widget, but not with the "Recent Topics" one.

The page where the problem happens is at https://deepinenespañol.org/ if you want to take a look at the code.

Thanks in advance.

-Eli

Alvina
Moderator
(@alvina)
Joined: 5 years ago

Member
Posts: 1862

@realact,

We've just checked on your website and don't find such an issue, everything work as expected. See the screenshot below: https://www.screencast.com/t/9V1Z6yfVt

Please make sure the issue exists and let us know.

 

RealAct
(@realact)
Joined: 7 years ago

Reputable Member
Posts: 238

@alvina thanks for replying, it looks good whenever I keep the width in the code you gave me under 250px; if I go anything above that then it looks like in the screenshot I showed above where the titles go beyond the edge of the sidebar 🙁

Right now my code is like this:

.posttitle{
white-space: nowrap;
width: 250px;
overflow: hidden;
text-overflow: ellipsis;
}

Also ideally I would like to keep it like it is now where the topic titles cannot go above one line, but then this problem happens where the "New" tag cuts out sometimes or is not visible, any way to fix that?

I attached a screenshot. Again thanks a lot for whatever help you could provide.