Adding name at "last_post_column"

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding name at "last_post_column"

Mencey Melgar
there are more options for this)("Last_post_column" under "mixed_table_columns"):
 
<td style="width:100%;padding:0 .3em;border:none;[n.style. property='white-space'][n.white_space/][/n.style.]">
                                            <n.smart_post_link.url>
                                                <text.when_created.short_format/>
                                            </n.smart_post_link.url>
                                            <span class="weak-color nowrap" style="padding-left:.2em">
                                                <t>by <t.author.owner.name truncate="20"/></t>
                                            </span>
                                        </td>
  I want to show the name of the last topic, but I couldn't find the way to edit this macro :S, i also tried with
<text.when_created.long_format/>
 But it still showing only the date
:) Helper
Reply | Threaded
Open this post in threaded view
|

Re: Adding name at "last_post_column"

GregChapman
I am confused and don't understand what you are intending to achieve.

The macro snippet you show is that which populates the "Last Post" column for any one topic shown on the page:

Line 2 defines the table cell styling
Lines 3-5 show the date
Lines 6-8 shows the author's username.

You refer to showing the "last topic", but that doesn't seem relevant to your code snippet. In this context does "last" mean previous, final, most recent or something else?

EDIT: incidentally, in lines 3-5, short_format and long_format refer to the style of the presentation of the date so I am not clear why that change would be expected to affect a name.
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Adding name at "last_post_column"

Mencey Melgar
What i want is show the title of the last topic posted at left of the date, I think that it's just add something at line 4
:) Helper
Reply | Threaded
Open this post in threaded view
|

Re: Adding name at "last_post_column"

GregChapman
Ah! I think I now understand "last topic" to mean "most recent post in the current topic" as that is the nature of the data that the "Last Post" column contains.

I think you may be highlighting something I would consider that is approaching a bug in Nabble's system and needs some more general discussion with the folk at Nabble. Here's how I read the situation...

I start from the assumption that if someone changes the subject line then they acknowledge some topic drift is taking place and their message should perhaps be posted as a new topic. That is difficult with Nabble's current facilities, if you wish to quote part of the post to which you are replying. The assumption also implies that almost always some administrator management would be needed to move any post with a changed subject so it becomes a new topic.

I also note that the Nabble default for subscribers who mail a reply with a changed subject line is to generate a new topic and NOT add the reply to an existing topic. This lack of consistency, begs the question why the same doesn't apply to posts made via a forum.

For those who are concerned about the subject line of a post, Nabble already has built in "Topics View" that presents posts in date order. It could be argued that if Nabble is to allow a change of subject within a topic, the "Topics View" screen should be renamed and should record the current post subject rather than the subject of the original post, as it does at the moment. That screen would then fulfill the need you seek to achieve with your proposed change.

I would argue that if a change the subject line is allowed when replying then, it there should either be an automatic new topic generated (as already happens with emailed replies). As a minimum, the subject change should be detected and an option be offered to create a new topic.

If we stick with the current work-around you propose, and you are simply trying to record a change in post subject, then surely it would be better to do that within the "topic_column" macro, so it would show something like:

Initial topic by user
Now: Revised topic

Obviously, the second line would need to be conditional on a change in subject being detected. With your proposal 99.9% of the time the most recent post in a topic will be the subject line of the original post in a topic, so almost always the "Last Post" column will repeat the content from the "topic_column" macro (unless you add some conditional code to ensure that it only appears when a change is made).

I'd love to see some of the Nabble team's thoughts on this!
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

Re: Adding name at "last_post_column"

Pedro
In reply to this post by Mencey Melgar
What do you mean by "last topic" ?
Do you want, for example, to show in your main page, http://forums.6326.n7.nabble.com/ , the title of the last topic next to the name of it's sub app?
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Adding name at "last_post_column"

Mencey Melgar
In reply to this post by GregChapman
Sorry, I see dat is confusing the "last topic", I mean the topic with the most recent post(the one at the top of the topic list).

"Scrims" is a subapp,
 Is it possible to show at "last topic column(mixed style)" the title of the topic which is at the top of his list instead of the date(or with it)?.

Thanks
:) Helper
Reply | Threaded
Open this post in threaded view
|

Re: Adding name at "last_post_column"

Pedro
LouK wrote
"Scrims" is a subapp,
 Is it possible to show at "last topic column(mixed style)" the title of the topic which is at the top of his list instead of the date(or with it)?.
For example, you have this subapp Scrims http://forums.6326.n7.nabble.com/Scrims-f33.html , and two subapps inside it, New Scrim and Past Scrims. Do you want to show the title of the last topic of each of these subapps in the "Last Post" column in the scrim app ?
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Adding name at "last_post_column"

Mencey Melgar
Yes, but i want that for all apps in mixed style, not just for scrims
:) Helper
Reply | Threaded
Open this post in threaded view
|

Re: Adding name at "last_post_column"

Pedro
This is  a generic solution. Go to your last_post_column macro and edit the "last_node" part like this:
<n.last_node.>
    <table class="avatar-table">
        <tr>
            <td style="padding:0;vertical-align:top;border:none;">
                <n.owner.avatar size="small" group="B"/>
            </td>
            <td style="width:100%;padding:0 .3em;border:none;[n.style. property='white-space'][n.white_space/][/n.style.]">
                <n.smart_post_link.url>
                    <text.when_created.short_format/>
                </n.smart_post_link.url>
                <span class="weak-color nowrap" style="padding-left:.2em">
                    <t>by <t.author.owner.name truncate="20"/></t>
                    <br/>
                    <n.truncate. size="5">
                        <n.node_message_as_text />
                    </n.truncate.>
                </span>
            </td>
        </tr>
    </table>
</n.last_node.>
The key here is at lines 14-16, I get the node content and set it's maximum size as 5 characters. Since you know how to coding I think you can organize it as you want. Try it and you will see that it will work on all your apps, if you want something more specific we have to surround it by some "if" blocks.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: Adding name at "last_post_column"

Mencey Melgar
That wasn't what i wanted but thanks anyway

Finally I found how to do it:

<n.last_node.>
                                <table class="avatar-table">
                                    <tr>
                                        <td style="font-size:100%;margin:.3em 0;padding:0 .3em;border:none;[n.style. property='white-space'][n.white_space/][/n.style.]">
                                            <n.cell_link_and_star/>
                                        </td>
                                        <td class="weak-color" style="font-size:80%;margin:.3em 0;font-variant: small-caps;padding:0 .3em;border:none;[n.style. property='white-space'][n.white_space/][/n.style.]">                                               <n.when_created.short_format/>
                                        </td>  
                                        <td style="width:100%;padding:0 .3em;border:none;[n.style. property='white-space'][n.white_space/][/n.style.]">    
                                            <span class="weak-color nowrap" style="padding-left:.0em;font-size:80%">
                                                <t>by <t.author.owner.name truncate="20"/></t>
                                             </span>
                                        </td>
                                    </tr>
                                </table>
                            </n.last_node.>
:) Helper
Reply | Threaded
Open this post in threaded view
|

Re: Adding name at "last_post_column"

Becool45
This post was updated on .
Nice thanks for this post. How can I reduce the text number that  <n.cell_link_and_star />   displays  because if the topic title is big it mess the layout of the board or if there is a code somewhere that limit subject text title that would be still cool for me.
Reply | Threaded
Open this post in threaded view
|

Re: Adding name at "last_post_column"

Mencey Melgar
Hey becool,

I found it better(I can't remember right now why) to use  smart_post_link instead of  n.cell_link_and_star, to make what do you want, this line should look like this:
<n.smart_post_link text="[n.truncate. size='20'][n.node_text/][/n.truncate.]" />
(the truncate size is how long do you want the name)
:) Helper
Reply | Threaded
Open this post in threaded view
|

Re: Adding name at "last_post_column"

Becool45
Wow thanks this is exactly what I want! ;))