inherit
regardingmatt@outlook.com
196648
0
Aug 5, 2013 1:02:15 GMT -8
woofyhugger
7
July 2013
woofyhugger
|
Post by woofyhugger on Jul 8, 2013 20:23:17 GMT -8
Hi Guys.
For version 5, Is there a template or edit to show the forum name that a particular post/thread is from when viewing the Recent Posts/Recent Threads list.
At the moment, doing recent posts/threads literally just lists the recent posts/threads, but I would also like to be able to see what particular forum on my board they were posted in.
For example: "Hello Everyone" posted in "Introductions Forum" by username.
Can it done?
Cheers! Woofy
|
|
inherit
regardingmatt@outlook.com
196648
0
Aug 5, 2013 1:02:15 GMT -8
woofyhugger
7
July 2013
woofyhugger
|
Post by woofyhugger on Jul 23, 2013 18:48:38 GMT -8
Hey guys,
Just letting you know I am still looking if this can be done? Haven't had a reply in a few weeks, so thought I would just see if I need to give up on this or not if it's not possible.
Cheers! Woofy
|
|
inherit
58740
0
Aug 20, 2024 7:29:21 GMT -8
®i©hie
I'm not very active here anymore thanks to my full-time job. - 12/27/23
14,036
September 2005
soe
|
Post by ®i©hie on Jul 24, 2013 12:50:15 GMT -8
Hi Guys. For version 5, Is there a template or edit to show the forum name that a particular post/thread is from when viewing the Recent Posts/Recent Threads list. At the moment, doing recent posts/threads literally just lists the recent posts/threads, but I would also like to be able to see what particular forum on my board they were posted in. For example: "Hello Everyone" posted in "Introductions Forum" by username. Can it done? Cheers! Woofy where do you want that to show? above/below the post/thread?
|
|
inherit
regardingmatt@outlook.com
196648
0
Aug 5, 2013 1:02:15 GMT -8
woofyhugger
7
July 2013
woofyhugger
|
Post by woofyhugger on Jul 24, 2013 22:24:23 GMT -8
Hi Richie.
Above.
Ideally, I would like a "Posted in" column in the "recent threads" list. To show what forum the thread was posted in.
And additionally, in the "recent posts" list, I would like to see the forum name the post is located in next to the post title. For example "Hi All" posted in "Introductions forum".
Cheers! Woofy
|
|
inherit
The Great Cinnamon Roll
191518
0
Oct 19, 2016 22:17:44 GMT -8
David Clark
Care for some tai chi with your chai tea?
17,602
March 2013
davidlinc1
|
Post by David Clark on Jul 27, 2013 15:08:39 GMT -8
Hey woofyhugger, It's a bit tricky to add in new columns on this page, but you can easily fit this modification into the "Created by" cell. It fits nicely, and displays as shown below. To make this modification, head to Admin > Structure > Layout Templates > Board, and click on the Thread List tab. On about line 17, locate this code: <td class="created-by clickable">$[thread.created_by_user]</td> Replace that code with: <td class="created-by clickable">$[thread.created_by_user]<br />{if $[route.name] == "recent_threads"} <b>in</b> $[thread.board]{/if}</td> This modification will only appear on the Recent Threads page. If you'd like it elsewhere, we can do that too.
|
|
inherit
regardingmatt@outlook.com
196648
0
Aug 5, 2013 1:02:15 GMT -8
woofyhugger
7
July 2013
woofyhugger
|
Post by woofyhugger on Jul 27, 2013 15:59:43 GMT -8
This is awesome and will do very nicely, thank you so much David.
Is there any way to have it also appear in the recent posts list, next to the post title?
|
|
Former Member
inherit
guest@proboards.com
195316
0
Dec 4, 2024 16:13:36 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Jul 28, 2013 1:01:16 GMT -8
David Clark I noticed if click on pages 2/3 etc on the recent thread page it will not display which board until you click to refresh the page? You could also use the code below if don't want the word in to show bold To be replaced with the text In the board<td class="created-by clickable">$[thread.created_by_user]{if $[route.name] == "recent_threads"}<br><i>In the board</i><br>$[thread.board]{/if}</td> Here's how I have it displaying on my forum Steve
|
|
Former Member
inherit
guest@proboards.com
195316
0
Dec 4, 2024 16:13:36 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Aug 2, 2013 6:07:15 GMT -8
Hi, David Clark Just wanted to say thanks for this - It's really a big help I wonder if there is anyway so displays when clicking on pages 2 - 3 - 4 etc Without having to click on the refresh button to see what board the thread was posted in Steve
|
|
inherit
The Great Cinnamon Roll
191518
0
Oct 19, 2016 22:17:44 GMT -8
David Clark
Care for some tai chi with your chai tea?
17,602
March 2013
davidlinc1
|
Post by David Clark on Aug 2, 2013 7:43:17 GMT -8
Sorry, this totally slipped my mind. Since our developers just put in template operators, a quick OR statement will take care of this bug. Replace the aforementioned code with:
<td class="created-by clickable">$[thread.created_by_user]<br />{if $[route.name] == "recent_threads" || ($[route.name] == "list_threads")} <b>in</b> $[thread.board]{/if}</td>
|
|
Former Member
inherit
guest@proboards.com
195316
0
Dec 4, 2024 16:13:36 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Aug 2, 2013 8:08:51 GMT -8
Sorry, this totally slipped my mind. Since our developers just put in template operators, a quick OR statement will take care of this bug. Replace the aforementioned code with: <td class="created-by clickable">$[thread.created_by_user]<br />{if $[route.name] == "recent_threads" || ($[route.name] == "list_threads")} <b>in</b> $[thread.board]{/if}</td> Thank You That Fixed it Steve If you want to replace the word in with In the board
You can use the code below <td class="created-by clickable">$[thread.created_by_user]{if $[route.name] == "recent_threads" || ($[route.name] == "list_threads")}<br><i>In the board</i><br>$[thread.board]{/if}</td>
Thanks again - David
|
|
Former Member
inherit
guest@proboards.com
195316
0
Dec 4, 2024 16:13:36 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Aug 2, 2013 13:11:37 GMT -8
Hi, David ClarkI noticed on the new update of the code you posted above When viewing a board - Then clicking on the next page It shows the name of board on the created by when viewing a board It should only display on the RECENT THREADS BOARD and NOT display when clicking on ON A BOARD See screenshot below The screenshot is of a board - Not The View Recent Threads Board It does this when viewing the next page on the boards IT'S WHEN VIEWING A BOARD AND CLICK ON THE PAGE NUMBER 2 3 4 etc! Steve
|
|
inherit
The Great Cinnamon Roll
191518
0
Oct 19, 2016 22:17:44 GMT -8
David Clark
Care for some tai chi with your chai tea?
17,602
March 2013
davidlinc1
|
Post by David Clark on Aug 2, 2013 14:04:07 GMT -8
Due to the nature of Layout Templates, we're still waiting on a variable-based solution to this issue, which I've run into several times. This solution, while hacky, works. It checks to see that you're on a page other than 1 (on which the route will be correct for recent threads) and if you're not, and the current route is list_threads (which is what recent_threads turns into after page change) then it will refresh the page with JavaScript, correcting the route name and allowing the code to work as intended. Here is the updated code as formatted by you, @xsteveuk - <td class="created-by clickable">$[thread.created_by_user]{if $[route.name] == "recent_threads"}<br><i>In the board</i><br>$[thread.board]{/if}</td> And then simply add this to the bottom of the same template. {if $[page] != 1 && ($[route.name] == "list_threads")} <script> if(document.URL.indexOf("recent") >= 0){ window.history.go(0)} </script> {/if}
|
|
Former Member
inherit
guest@proboards.com
195316
0
Dec 4, 2024 16:13:36 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Aug 2, 2013 14:19:57 GMT -8
It's not working!
Am I adding it correctly? Adding the code to bottom of of thread list templateIT'S WORKING I NEVER ADDED THE UPDATE YOU DONE - OF THE CODE I DID ALL IS WORKING OK - THANK YOU David Clark Steve YOU WAS MISSING < marked in red on the updated code <td class="created-by clickable">$[thread.created_by_user]{if $[route.name] == "recent_threads"}<br><i>In the board</i><br>$[thread.board]{/if}</td>
|
|
inherit
The Great Cinnamon Roll
191518
0
Oct 19, 2016 22:17:44 GMT -8
David Clark
Care for some tai chi with your chai tea?
17,602
March 2013
davidlinc1
|
Post by David Clark on Aug 2, 2013 14:30:16 GMT -8
It's not ideal, since every time your users change a page on a regular board they're technically refreshing the page, but it shouldn't be a noticeable slowdown.
EDIT: Also good catch on the opening <, I edited that into my post.
|
|
Former Member
inherit
guest@proboards.com
195316
0
Dec 4, 2024 16:13:36 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Aug 2, 2013 14:33:02 GMT -8
It's not ideal, since every time your users change a page on a regular board they're technically refreshing the page, but it shouldn't be a noticeable slowdown. Thanks - David
|
|