Link to the mod (https://custom.simplemachines.org/index.php?mod=4356)
Recent Forum Topics on Board Index For SMF 2.1.xTested only with the SMF default theme!This mod will add Recent Forum Topics on the Boardindex, it has some options:
- Change on wich side you want it to display
- Filtering the forum topics by selecting categories or boards
- Display posters avatars (Note: this only works if you have the Avatars Display Integration (https://custom.simplemachines.org/index.php?mod=4246) mod installed)
- More...
License* This SMF modification is subject to the BSD 2-Clause License
User options- Options are available through icons (some are only available when you are logged in!)
Languages- English
Version 1.2 - Mar 15, 2023- Fixed the constructpages
Version 1.1 - Feb 11, 2023- Fixed undefined array key due php > 8.0
- Added language Spanish/Latin by Rock Lee (https://www.simplemachines.org/community/index.php?action=profile;u=322597)
Version 1.0 - Jan 17, 2023- Initial Release
Nice work !
Good job and I'll leave you the translation by the way :D
Regards!
Hello, thanks for the mod. One question, if I only want to use the recent topic, how can I do it?
(https://i.imgur.com/K0UL92k.png)
It happens that I would like to use only that part, but when I urge it, it modifies my entire menu of categories and others... Thanks!
@Matias- The mod is not intended to function that it only shows the recent topics on the boardindex, that's why its called recent topics on the boardindex ;), however it should be possible, ill take a look when i have time how it can be easy achieved.
Quote from: Pipke on February 06, 2023, 11:48:00 AM@Matias- The mod is not intended to function that it only shows the recent topics on the boardindex, that's why its called recent topics on the boardindex ;), however it should be possible, ill take a look when i have time how it can be easy achieved.
It would be nice since there is no day of date a "recent topics" that can be put in the boardindex.
I add: It would also be very useful to have compatibility with the prefix mod: https://custom.simplemachines.org/index.php?mod=4038
Thank you!
Looks nice! Any idea why I'm getting "file not found" in the two "extract tree" steps for ./Themes and ./Sources? Naturally, these paths are there, above the Packages dir.
Quote from: Gryzor on February 07, 2023, 05:00:06 AMLooks nice! Any idea why I'm getting "file not found" in the two "extract tree" steps for ./Themes and ./Sources? Naturally, these paths are there, above the Packages dir.
I dont know what you mean, can you explain better?
@Matias- I'm not going to implement the option to hide the board structure/categories so that it shows only the recent topics in the mod, if I did... the way to use the filter options will lose its function and that is not the purpose for which I built the mod.
I'll just explain how you can achieve this with these edits,
but it's not recommended to do so... it's entirely up to you. First you should set the user options like you want it, you'and other users can't change it later anymore trough the menu after the edits, because it gets removed!in Sources/RecentTopicsBoardIndex.php
// Fire it up ;)
loadTemplate('RecentTopicsBoardIndex', 'RecentTopicsBoardIndex'); #template, css
$rtbi['options']['align'] = 'top';
$rtbi['quickbuttons'] = array();
unset($context['rtbi_buttons']['applyfilter']);
in {your_theme}/RecentTopicsBoardIndex.template.php
// Disable smf default mark read button
$context['mark_read_button'] = array();
$context['categories'] = array();
Quote from: Pipke on February 07, 2023, 10:09:43 AMQuote from: Gryzor on February 07, 2023, 05:00:06 AMLooks nice! Any idea why I'm getting "file not found" in the two "extract tree" steps for ./Themes and ./Sources? Naturally, these paths are there, above the Packages dir.
I dont know what you mean, can you explain better?
Not much to explain unfortunately, these errors just come up and reported by smf when trying to install the mod. Installation stops with those 2 errors... 😐
Quote from: Gryzor on February 07, 2023, 02:31:17 PMQuote from: Pipke on February 07, 2023, 10:09:43 AMQuote from: Gryzor on February 07, 2023, 05:00:06 AMLooks nice! Any idea why I'm getting "file not found" in the two "extract tree" steps for ./Themes and ./Sources? Naturally, these paths are there, above the Packages dir.
I dont know what you mean, can you explain better?
Not much to explain unfortunately, these errors just come up and reported by smf when trying to install the mod. Installation stops with those 2 errors... 😐
Can you install other mods without errors, if so it looks like the file you downloaded as the mod is fault, try to download a new one, and see how that goes.
Quote from: Pipke on February 07, 2023, 02:27:57 PM@Matias- I'm not going to implement the option to hide the board structure/categories so that it shows only the recent topics in the mod, if I did... the way to use the filter options will lose its function and that is not the purpose for which I built the mod.
I'll just explain how you can achieve this with these edits, but it's not recommended to do so... it's entirely up to you. First you should set the user options like you want it, you'and other users can't change it later anymore trough the menu after the edits, because it gets removed!
in Sources/RecentTopicsBoardIndex.php
// Fire it up ;)
loadTemplate('RecentTopicsBoardIndex', 'RecentTopicsBoardIndex'); #template, css
$rtbi['options']['align'] = 'top';
$rtbi['quickbuttons'] = array();
unset($context['rtbi_buttons']['applyfilter']);
in {your_theme}/RecentTopicsBoardIndex.template.php
// Disable smf default mark read button
$context['mark_read_button'] = array();
$context['categories'] = array();
Thanks for your answer, I was able to do it but now my categories are not visible... What could it be?
(https://i.imgur.com/KPhqQ1S.png)
Quote from: Matias- on February 07, 2023, 09:50:29 PMThanks for your answer, I was able to do it but now my categories are not visible... What could it be?
Quote from: Matias- on February 06, 2023, 11:41:08 AMHello, thanks for the mod. One question, if I only want to use the recent topic, how can I do it?
that is why?
Quote from: Pipke on February 08, 2023, 04:44:43 AMQuote from: Matias- on February 07, 2023, 09:50:29 PMThanks for your answer, I was able to do it but now my categories are not visible... What could it be?
Quote from: Matias- on February 06, 2023, 11:41:08 AMHello, thanks for the mod. One question, if I only want to use the recent topic, how can I do it?
that is why?
Maybe because of my bad English it was misunderstood.
What I want is to use the "recent topics" part and for everything else to be seen by default.
For example:
-Box Shoutbox
-Box Recent Topics
- Categories
- Etc...
All by default.
@Matias- I'll put it in ideas for the next update to add that option.
Quote from: Pipke on February 08, 2023, 12:26:10 PM@Matias- I'll put it in ideas for the next update to add that option.
Excellent, a mod to see recent topics would be nice.
I would add the option to view the prefixes of the mod that already exists.
https://custom.simplemachines.org/index.php?mod=4038
Example:
https://prnt.sc/LFYrSxnB3Opk
Quote from: Pipke on February 08, 2023, 12:26:10 PM@Matias- I'll put it in ideas for the next update to add that option.
I thought about it for a while, you can keep the boards hidden by clicking on the arrow up/down behind the category name, this way the boards are also hidden ;) much easier.
updated mod to v1.1
- Fixed undefined array key due php > 8.0
- Added language Spanish_Latin by Rock Lee
Can you make it like the 2.0 version with the round poster avatars next to the topic?
Quote from: EthanR on February 26, 2023, 10:50:04 PMCan you make it like the 2.0 version with the round poster avatars next to the topic?
What do you mean exaclty, as it is now the mod does that... or do i don't understand you correctly?
Sorry I should really start reading properly, I forgot to install your Avatar mod.. :-[
Just to confirm, the only settings available for the recent topics are the ones on the 9 dot button?
Quote from: EthanR on February 27, 2023, 03:13:19 PMJust to confirm, the only settings available for the recent topics are the ones on the 9 dot button?
Yep, and the button to switch between boards and categories filter
Thanks :)
Would you mind enabling the avatars on mobile view as well? (On mobile the thread icon is displayed, I think avatars would be nicer).
@Pipke Nice mod. Thanks a lot.
Great work!
+1 for adding the avatar on mobile view if possible?
A user of mine complained that the avatars are smaller now (and indeed they are). I'm not sure if it's this mod (or the Avatar integration one) causing this?
[EDIT] ah found it, it's in the AvatarsDisplayIntegration.css .
updated mod, because it had a huge issue/bug, cant believe no one reported that yet ;)
Version 1.2 - Mar 15, 2023
- Fixed the constructpages
edit
@Bugo, i've forgot to add your translation, i'll do it in next update.
I'm using 1.2 version on my test forum. Hidden boards are visible for guests:
Click => (https://i.postimg.cc/vDZYqC8B/2023-03-16.png) (https://postimg.cc/vDZYqC8B)
When guest click on "Recycle Bin", a message that board is restricted is appeared, but guests shouldn't see such boards at all.
Latest version works fine.
One question: after installing the mod, I installed a new theme. Seems like the mod tries to apply to that theme too, with disastrous results. Is it possible to disable it for a single theme? Again, I installed the theme *after* the mod, if it's got any significance...
Quote from: Speed King on March 16, 2023, 12:46:21 AMI'm using 1.2 version on my test forum. Hidden boards are visible for guests:
Click => (https://i.postimg.cc/vDZYqC8B/2023-03-16.png) (https://postimg.cc/vDZYqC8B)
When guest click on "Recycle Bin", a message that board is restricted is appeared, but guests shouldn't see such boards at all.
That is a smf default setting and has nothing todo with this mod, you should uncheck the checkbox for that board the guest access in the admin center: Administration Centerâ–º Boards and Categoriesâ–º Modify Boards, then settings Allowed Groups: Groups allowed to access this board.
Quote from: Gryzor on March 16, 2023, 04:54:09 AMLatest version works fine.
One question: after installing the mod, I installed a new theme. Seems like the mod tries to apply to that theme too, with disastrous results. Is it possible to disable it for a single theme? Again, I installed the theme *after* the mod, if it's got any significance...
if you have the theme already installed try to uninstall mod then install it agian (after the new theme) and see if that helps.
Quote from: Pipke on March 16, 2023, 07:08:20 AMQuote from: Gryzor on March 16, 2023, 04:54:09 AMLatest version works fine.
One question: after installing the mod, I installed a new theme. Seems like the mod tries to apply to that theme too, with disastrous results. Is it possible to disable it for a single theme? Again, I installed the theme *after* the mod, if it's got any significance...
if you have the theme already installed try to uninstall mod then install it agian (after the new theme) and see if that helps.
Hmm ok I'll try! So it isn't possible to not use the mod for a specific theme?
Quote from: Gryzor on March 16, 2023, 07:41:29 AMQuote from: Pipke on March 16, 2023, 07:08:20 AMQuote from: Gryzor on March 16, 2023, 04:54:09 AMLatest version works fine.
One question: after installing the mod, I installed a new theme. Seems like the mod tries to apply to that theme too, with disastrous results. Is it possible to disable it for a single theme? Again, I installed the theme *after* the mod, if it's got any significance...
if you have the theme already installed try to uninstall mod then install it agian (after the new theme) and see if that helps.
Hmm ok I'll try! So it isn't possible to not use the mod for a specific theme?
This mod will work on other themes that are based of the smf default theme, so infact is the answer yes it does. However if themes have different setup on the default templates it can have strange behavior and it needs tweaks then.
Hi pipke, how can I remove the area codes I marked in the picture?
checkboxes
cehekbox.png
Quote from: webtiryaki on March 17, 2023, 02:30:17 AMHi pipke, how can I remove the area codes I marked in the picture?
checkboxes
cehekbox.png
// Remove empty values
$ids = array_filter($ids);
return '<a href="' . $scripturl . '?'.$filter.'=' .(!empty($ids) ? implode(',', $ids) : 'clear'). ';'.$context['session_var'] . '=' . $context['session_id'] . '"><i class="rtbi-'.$icon.'" title="'.$txt['rtbi_forum_filter'].'"></i></a>';
@webtiryaki if you want to remove the checkboxes, the user can no longer filter the boards, are you sure you want that??
Thanks a lot for your great mod !
Is there a special reason why you've limited it to 10 entries ?
I would like to have more :)
I will provide german language later.
Regards
Helmut
Quote from: HelAu007 on May 11, 2023, 03:22:27 PMThanks a lot for your great mod !
Is there a special reason why you've limited it to 10 entries ?
I would like to have more :)
I will provide german language later.
Regards
Helmut
glad you like it, you can easily change the number of topics
find in file Sources/RecentTopicsBoardIndex.php
$rtbi['options']['per_page'] = $rtbi['options']['per_page'] == 5 ? 10 : 5;
replace the 10 with another number, note that the higher you set it... the more cpu the server has to load to fetch the data, this also depends on how many topics you have on your site, I would recommend not higher than 20
Here are the german translations.
Hello
Is there a chance to go to the last topic in a thread when pressing on the recent posts , on a mobile i dont see the last posts column
Hello
It's possible to move these checkbox for setup display topic categories to separate page? Main page looks very overloaded.
Hey just noticed that I get this error every so often.
/forum/Themes/default/RecentTopicsBoardIndex.template.php (Line 88)
Backtrace information
Type of error: General
Error message Select
2: foreach() argument must be of type array|object, null given
&
2: Undefined array key "categories"
Quote from: TwitchisMental on December 05, 2023, 06:15:04 PMHey just noticed that I get this error every so often.
/forum/Themes/default/RecentTopicsBoardIndex.template.php (Line 88)
Backtrace information
Type of error: General
Error message Select
2: foreach() argument must be of type array|object, null given
&
2: Undefined array key "categories"
I can't reproduce that error, but I made some changes and I hope this will fix your error. Download the file in the attachment and overwrite it in your theme folder. Can you please respond if it is resolved.
So far so good Pipke, no more errors to report.
How to set default style?
Quote from: Dark Wizard on January 14, 2024, 08:28:28 AMHow to set default style?
click the second button from left (ps. if you hover it... the title says "align top, board default")
Quote from: Pipke on January 15, 2024, 02:57:24 PMclick the second button from left (ps. if you hover it... the title says "align top, board default")
I mean, for all new visitors I want to set specific style by default
Quote from: Dark Wizard on January 16, 2024, 01:57:36 PMI mean, for all new visitors I want to set specific style by default
in file RecentTopicsBoardIndex.php
change this line:
'align' => isset( $_COOKIE['rtbi_align'] ) ? $_COOKIE['rtbi_align'] : 'left',
to this:
'align' => isset( $_COOKIE['rtbi_align'] ) ? $_COOKIE['rtbi_align'] : 'top',
Quote from: Pipke on March 15, 2023, 05:42:13 PMupdated mod, because it had a huge issue/bug, cant believe no one reported that yet ;)
Version 1.2 - Mar 15, 2023
- Fixed the constructpages
edit @Bugo, i've forgot to add your translation, i'll do it in next update.
Wouldn't want to wait until next year :)
How can I set it to top authomacally for all user I mean it will be rtbi=top
Quote from: Thomas057 on March 17, 2024, 11:44:18 AMHow can I set it to top authomacally for all user I mean it will be rtbi=top
you can do that in admin... but if the user itself changes their own user setting, your admin setting will be overwritten, so the user setting will overwrite your admin setting, that's how I built it and think it's fair enough and user friendly.