WhatsXFessenger

WhatsXFessenger

(Looks out the window...) Universe still seems intact.

Is it not correct? It does work reliably in my testing. I found this in conversation_view where the name of the conversation starter is listed up in the header:

<xf:username user="$conversation.Starter" defaultname="{$conversation.username}" title="{{ phrase('conversation_starter') }}" href="" />

So I went on $conversation.Starter to search for a variable I could use.
 
I still like this styling change a lot! But as I'm getting ready to deploy it on a very large/busy forum, I just realized that many users do not use avatars, so it could be confusing in some conversations if two users have the same default avatar (such as, the letter "B" but in two colors). So I think I will add the username beneath the avatar--hopefully I can make room for it.
 
I've tried to add this several times, my forum view goes to pieces and I get the following error:

  • XF\CssRenderException: Error rendering template public:extra.less: ParseError: missing opening { in public:extra.less on line 9028, column 1 (on or near line 9028)
  • src/XF/CssRenderException.php:89

Code:
Stack trace

 9025 | // End Brogan's most splendiferous messenger style conversation layout modification thingy - so say we all.file {
 9026 |     height: 170px;
 9027 |     width: 170px;
*9028*| }
 9029 | .file-insertLink { display: none; }
 9030 | .file-menuOptions { display: block; }
 9031 | .file-menuOptions > a {
------------

#0 src/XF/CssRenderer.php(418): XF\CssRenderException::createFromLessException(Object(Less_Exception_Chunk), 'public:extra.le...', '// Note that th...')
#1 src/XF/CssRenderer.php(352): XF\CssRenderer->renderToCss('public:extra.le...', '// Note that th...')
#2 src/XF/CssRenderer.php(260): XF\CssRenderer->renderTemplate('public:extra.le...', NULL)
#3 src/XF/CssRenderer.php(118): XF\CssRenderer->renderTemplates(Array, Array, Array)
#4 src/XF/CssWriter.php(55): XF\CssRenderer->render(Array)
#5 css.php(30): XF\CssWriter->run(Array, 3, 1, 'e3e8f96472fe7b4...')
#6 {main}

-------------

Previous Less_Exception_Chunk: ParseError: missing opening `{` in anonymous-file-0.less on line 9028, column 1
9026|     height: 170px;
9027|     width: 170px;
9028| }
9029| .file-insertLink { display: none; }
9030| .file-menuOptions { display: block; }
9031| .file-menuOptions > a { - src/vendor/oyejorge/less.php/lib/Less/Parser.php:677
#0 src/vendor/oyejorge/less.php/lib/Less/Parser.php(621): Less_Parser->GetRules(NULL)
#1 src/vendor/oyejorge/less.php/lib/Less/Parser.php(449): Less_Parser->_parse()
#2 src/XF/CssRenderer.php(414): Less_Parser->parse('// Note that th...')
#3 src/XF/CssRenderer.php(352): XF\CssRenderer->renderToCss('public:extra.le...', '// Note that th...')
#4 src/XF/CssRenderer.php(260): XF\CssRenderer->renderTemplate('public:extra.le...', NULL)
#5 src/XF/CssRenderer.php(118): XF\CssRenderer->renderTemplates(Array, Array, Array)
#6 src/XF/CssWriter.php(55): XF\CssRenderer->render(Array)
#7 css.php(30): XF\CssWriter->run(Array, 3, 1, 'e3e8f96472fe7b4...')
#8 {main}

Request state

array(4) {
  ["url"] => string(388) "/forums/css.php?css=public%3AEWRporta.less%2Cpublic%3AEWRporta_articles.less%2Cpublic%3Aandy_calendar_events.less%2Cpublic%3Acxf_search_widget.less%2Cpublic%3Amessage.less%2Cpublic%3Anotices.less%2Cpublic%3Anulumia_xpi.less%2Cpublic%3Asiropu_ads_manager_ad.less%2Cpublic%3Awidget_EWRporta_features.less%2Cpublic%3Aextra.less&s=3&l=1&d=1649455480&k=e3e8f96472fe7b449f9d9e38ad7531b06bf368e2"
  ["referrer"] => string(38) "https://www.maggotdrowning.com/forums/"
  ["_GET"] => array(5) {
    ["css"] => string(266) "public:EWRporta.less,public:EWRporta_articles.less,public:andy_calendar_events.less,public:cxf_search_widget.less,public:message.less,public:notices.less,public:nulumia_xpi.less,public:siropu_ads_manager_ad.less,public:widget_EWRporta_features.less,public:extra.less"
    ["s"] => string(1) "3"
    ["l"] => string(1) "1"
    ["d"] => string(10) "1649455480"
    ["k"] => string(40) "e3e8f96472fe7b449f9d9e38ad7531b06bf368e2"
  }
  ["_POST"] => array(0) {
  }
}

Is this due to my choice of style?
 
Actually, just re-reading the above I noticed the opening bracket on line 9025, whereas I presume it should be on 9026...

9025 | // End Brogan's most splendiferous messenger style conversation layout modification thingy - so say we all.file {
9026 | height: 170px;
9027 | width: 170px;
9028| }
 
I added a line break '\r\n' which did move the code down a line but still created errors.

I managed to fix it by removing: // End Brogan's most splendiferous messenger style conversation layout modification thingy - so say we all
 
A feller got to thinking to himself, "What would I have to do to add the usernames to the conversation?" I realized that in a busy forum, many don't use avatars and two or three members conversing with a "T" as the XF-generated avatar (in three different colors) could get confusing.

I am going to look into adding this to the left of the date in the bubble (which is subtle but usable), vs. plastering a large username beneath the avatar (which detracts from the "clean" look of this mod). Once I get something concrete, I'll share the code I'm using. And of course, if I get in over my head and break everything in the forum have any questions, I'll pop in
 
Actually, someone already asked.

I'm not a fan of that look.
It starts to add clutter and looks lopsided.

If I want to know the author I just hover or tap the avatar, or look at the participants list

However, edit from line 91:

Less:
&.ctaConversationMessageOther
{
    background: @__ctaMessageOtherColour;

    & .message-userDetails
    {
        display: block;
    }

    & .message-name
    {
        visibility: visible;
    }
}

Overall I prefer the layout for the smallest screen size - I may permanently switch conversations on my site to that.
 
I'll look at those, thanks! I agree adding the full username can be cluttering, so I was looking at a minimal approach. I've so far been able to accomplish this, as it only adds a little extra text without much clutter:

1679857707395.webp

I have the usernames (preserving the hover cards), and added the Font Awesome icons (using <xf:fa ...>).

I just need to tweak a few things to get it all to line up (as I had to do this a bit "hacky" temporarily just to get it working), and may add my own CSS classes to the icons to help make them easier to align. That is, if I decide to keep them.

BTW, this is a third party theme (PixelExit--Bolt theme), so I had to add a couple of very small things to the .less template to fix colors and the rounded borders. But otherwise, it was very easy to work with.
 
if it's truthful and something that is an actual thing people seem to be following it.
But as someone who's read your threads, and has been told you're kidding about a lot.
I'm going to leave this right here.
It sounds like you're trying to get two social media sites to merge in one with xf.
i don't see this happening.
Sounds like it's too big.
 
I agree adding the full username can be cluttering, so I was looking at a minimal approach. I've so far been able to accomplish this, as it only adds a little extra text without much clutter:
I didn't get a chance to work on this (been slammed with too much going on lately) and over the past couple of days, I think I really need to make this change. I was in a 3-way conversation and one of the three (who is not staff) kept referring to me as the other staff member, despite both of us having distinctly different avatars. 🤦‍♂️

If I can work up the code to do it as I attempted above, and figure out the proper spacing I'd like, I'll post it here.
 
Is there a particular trick to successfully highlighting & copying just the individual codes without also having to deal with the entire page automatically being highlighted as well?

This resource seems quite interesting and I'd really like to test it out.
 
If you are on a computer, just click into the code box and click and drag to select everything, then CTRL+C to copy to the clipboard and CTRL+V to paste to the template.
 
Back
Top Bottom