Notifications
Clear all

wpForo 1.x.x [Closed] Width of Latest Posts/Topics in Recent Posts & Extended Layout

10 Posts
5 Users
2 Likes
4,293 Views
Posts: 30
 envi
(@envi)
Eminent Member
Joined: 6 years ago
Posted by: @robert
Posted by: @robert

I'm sorry but there is no way to do this. CSS is not enough. These usernames are cut in wpForo template files. We'll add a filter hook in future versions to allow you control the max number of chars.

Did you add this filter? If yes, how can I control the max number of chars now?

Ok, I see.

Do you still plan to add a filter hook about this in future versions?

Robert
Posts: 10499
Admin
(@robert)
Support Team
Joined: 8 years ago
Posted by: @envi

Ok, I see.

Do you still plan to add a filter hook about this in future versions?

Hi @envi,

The hook is not needed. You can use the Extended Layout template file to customize.

1. Create /wpforo/ folder in your active WordPress theme, then create /layouts/ in that folder then /1/ folder. The end folders should be: /wpforo/layouts/1/

2. Copy wp-content/plugins/wpforo/wpf-themes/classic/layouts/1/forum.php file and paste in the /wpforo/layouts/1/ folder you created in #1 step.

3. Open forum.php file and find this code:

<?php wpforo_member_link($member, 'by', 9); ?>

4. Change the third "9" argument to whatever you want. It's the number of username chars.

 

This is the wpForo template file customization in upgrade-safe way. You can read more in wpForo Documentation:

 

2 Replies
Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10499
Posted by: @nutritionchat

Hi @robert, thanks for your fix for this (and thanks for your great plugin!)

In the same way, I also wish to extend the width of field: .wpforo-last-post-user as part of 'First post and replies'.

I've looked through the forum.php file to try to make a similar edit, but I'm unable to find the relevant code.

Could you please provide a newbie with a clue? 🙂

Hi @nutritionchat,

Please show it on some screenshot.

(@nutritionchat)
Joined: 4 years ago

Estimable Member
Posts: 93

Thanks @robert, and sure. 🙂

field: .wpforo-last-post-user >> screenshot here - and - link to my site here.

(weirdly, my profile seemed to have disappeared here on the wpForo forums, and I needed to re-register just now to login. [Same user handle was available]. I also posted my site in the 'wpForo showcase' topic and my post was a/w moderation. Now it's vanished!)

Page 2 / 2