Recent Forum Topics on Boardindex For 2.0.x

Started by Pipke, May 05, 2014, 09:37:08 AM

Previous topic - Next topic

PFigo

Quote from: @rjen on September 17, 2019, 09:26:25 AM
Quote from: oneteaminsouthend on September 17, 2019, 07:51:15 AM
On the mobile version of my site I'm having trouble with the width issue of this mod. I changed the settings that are mentioned 2 pages back which made the box contents smaller but I still have the empty space to the right as shown in the attatchment

Find this file in your forum: RecentForumTopics.template.php
It will be in the Themes/default folder...

echo'
<th scope="col" width="15%">', $txt['replies'], ' / ', $txt['views'], '</th>
<th scope="col" class="lefttext last_th" width="24%">', $txt['last_post'], '</th>';


and change this to


echo'
<th scope="col" class="stats" width="15%">', $txt['replies'], ' / ', $txt['views'], '</th>
<th scope="col" class="lastpost lefttext last_th" width="24%">', $txt['last_post'], '</th>';

Unfortunately it didn't work for me. Must be due to theme I am using :-(

@rjen

Very well possible. These edits work on his forum since he is using responsive curve. No clue what you are using... can you post a link to your forum? I can have a look...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

@rjen

Found your site...

In addition to the changes listed you will need to change the responsive.css file...


/* Remove */
table.table_list tbody.content td.stats {
display: none;
}


and change to


/* Remove */
table.table_list tbody.content td.stats, table.table_grid .stats, table.table_grid .lastpost {
display: none;
}
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

Pipke

Quote from: PFigo on September 18, 2019, 12:29:11 PM
Quote from: @rjen on September 17, 2019, 09:26:25 AM
Quote from: oneteaminsouthend on September 17, 2019, 07:51:15 AM
On the mobile version of my site I'm having trouble with the width issue of this mod. I changed the settings that are mentioned 2 pages back which made the box contents smaller but I still have the empty space to the right as shown in the attatchment

Find this file in your forum: RecentForumTopics.template.php
It will be in the Themes/default folder...

echo'
<th scope="col" width="15%">', $txt['replies'], ' / ', $txt['views'], '</th>
<th scope="col" class="lefttext last_th" width="24%">', $txt['last_post'], '</th>';


and change this to


echo'
<th scope="col" class="stats" width="15%">', $txt['replies'], ' / ', $txt['views'], '</th>
<th scope="col" class="lastpost lefttext last_th" width="24%">', $txt['last_post'], '</th>';

Unfortunately it didn't work for me. Must be due to theme I am using :-(

@PFigo you didnt do the edits (right) as i told you in this post. https://www.simplemachines.org/community/index.php?topic=522114.msg4028118#msg4028118
if i look in dev tools on your site you still have this code , you must change that.

<th scope="col" width="15%">Respostas / Visualizações</th>

and

<th scope="col" class="lefttext last_th" width="24%">Última mensagem</th>



"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

PFigo

I didn´t.....I don´t know why!

Done it already but didn´t work totally...is much better but still have you MOD (now all uniform) bigger than my theme.
Is probably something to do with theme I am using...
Thanks for your help and support.


Best regards
Pedro Figo

@rjen

Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

PFigo

Quote from: @rjen on September 18, 2019, 12:58:45 PM
Found your site...

In addition to the changes listed you will need to change the responsive.css file...


/* Remove */
table.table_list tbody.content td.stats {
display: none;
}


and change to


/* Remove */
table.table_list tbody.content td.stats, table.table_grid .stats, table.table_grid .lastpost {
display: none;
}

This was for me?
Thought it was for oneteaminsouthend.

Even so if is for me were is responsive.css file?  ;)

@rjen

Yes, that was for you , mind you TOGETHER with the other fix I posted
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

PFigo

Quote from: @rjen on September 20, 2019, 11:51:03 AM
Yes, that was for you , mind you TOGETHER with the other fix I posted
Thanks😉...but I don't have that file...

@rjen

#209
Yes you do. Its in the theme/css folder...

https://foruminovarnaconstrucao.pt/Themes/SunRise20_v2/css/responsive.css

But if I look at your site now it seems it is fixed already...
Not sure what the problem is you are trying to fix now...

can you explain?
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

@rjen

mmm, I think I see your issue: it's that the recent block is wider than the rest I guess...

That is caused by the title being too long for the screen and set to nowrap...
Caused by this section in index.css.


table.table_grid thead tr.catbg th
{
white-space: nowrap;
}


the nowrap prevents the long title from wrapping to the next line...
You can take that out to fix it... just make sure you check what is doe to other tables in your theme...
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

PFigo

Quote from: @rjen on September 20, 2019, 03:59:50 PM
Yes you do. Its in the theme/css folder...

https://foruminovarnaconstrucao.pt/Themes/SunRise20_v2/css/responsive.css
You are correct....my bad.

Quote from: @rjen on September 20, 2019, 04:29:39 PM
mmm, I think I see your issue: it's that the recent block is wider than the rest I guess...

That is caused by the title being too long for the screen and set to nowrap...
Caused by this section in index.css.


table.table_grid thead tr.catbg th
{
white-space: nowrap;
}


the nowrap prevents the long title from wrapping to the next line...
You can take that out to fix it... just make sure you check what is doe to other tables in your theme...
Exactly the problem like you said.
Before I try your changes do you know where I can change the words on the header that can be the cause of width?
I believe I can write in other way, meaning the same, but shorter...

@rjen

It uses these text strings that are in your language file...
The rtf_ strings are in RecentForumTopics.xxx.php

$txt['rft_name']
$txt['rft_to']
$txt['started_by']
$txt['rft_in_Board']

But that will changes the strings also on desktop view. I personally would suppress the started by and in Board strings on mobile.
In your theme you can do that by updating the file RecentForumTopics.template.php

Find

echo'<th scope="col" class="lefttext ',$class,'" >', $txt['rft_name'], ' <span style="color: #'.$modSettings['rft_color_viewnumbers'].';">&laquo; ', $counter = $_REQUEST['start'] + 1 ,' '.$txt['rft_to'].' ', $sum['counter'], ' &raquo;</span> / ', $txt['started_by'], ' / ', $txt['rft_in_Board'], '</th>';
}


and change that to:


echo'<th scope="col" class="lefttext ',$class,'" >', $txt['rft_name'], ' <span style="color: #'.$modSettings['rft_color_viewnumbers'].';">&laquo; ', $counter = $_REQUEST['start'] + 1 ,' '.$txt['rft_to'].' ', $sum['counter'], ' &raquo;</span><span class="phoneNone"> / ', $txt['started_by'], ' / ', $txt['rft_in_Board'], '</span></th>';
}
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

PFigo

Quote from: @rjen on September 21, 2019, 02:33:43 AM

But that will changes the strings also on desktop view.


Thanks for your reply.
Top of recent topic, on my case has this in Portuguese:
QuoteTÓPICOS RECENTES NO FÓRUM « 1 A 10 » / INICIADO POR / NO GRUPO
I changed it to:
QuoteTÓPICOS RECENTES  « 1 A 10 » / INICIADO POR / GRUPO
Meaning is the same and I "bypass" width issue.
Now is okay for me also on mobile version.

Thanks for those who help me...

Best regards

Pedro Figo


PFigo

Ant ideas how to increase number of topics on recent topic board?
Maximum is 10 at this moment....

Thanks

Pipke

"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

PFigo

Quote from: Pipke on October 26, 2019, 05:16:42 AM
they can click page 2 ;)
If your answer was for me related to have more than 10 topics on your mod, I didn´t saw any relevant information on page 2 regarding that!
If is my mistake (eyes) sorry...

enesdemirall

How can I move the mod to footer section of my forum.?

Pipke

Quote from: enesdemirall on May 02, 2020, 12:00:30 PM
How can I move the mod to footer section of my forum.?

yes you can by edit this file(make backup first): at .../Themes/{yourtheme}/RecentForumTopics.template.php

Code (find) Select

function template_rft_above()

Code (replace by ) Select

function template_rft_below()


and the other way round

Code (find) Select

function template_rft_below()

Code (replace by) Select

function template_rft_above()
"If something is wrong, fix it if you can. But train yourself not to worry: Worry never fixes anything."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

DreadPirateRoberts

Is there a way to show recent topics on the bottom of the forum as oppose to the top of the forum?
Welcome to Agora Road's Macintosh Cafe || A retro design vaporwave community forum! Enjoy your stay!

Advertisement: