Ticket #9672 (closed defect: fixed)
Adium won't substitute multiple instances of %message% keyword
| Reported by: | mathuaerknedam | Owned by: | Catfish_Man |
|---|---|---|---|
| Milestone: | Adium 1.4 | Component: | Message View |
| Version: | 1.2.4 | Severity: | normal |
| Keywords: | Cc: | ||
| Patch Status: |
Description
It appears that Adium will replace only the first instance of %message% in a single source file (content.html). While it makes sense that that you wouldn't think that you'd want a message displayed more than once, it means that the html file can't be loaded with alternate html or javascript treatments that are then chosen thorough the use css. I'll attach a sample messagestyle and a screenshot of the problem. Note that this *is* a simplified messagestyle -- I've removed all selection logic and simply duplicated each message (%time%, %sender%, and %message%) in order to demonstrate the problem.
Attachments
Change History
Changed 4 years ago by mathuaerknedam
-
attachment
test.AdiumMessageStyle.zip
added
messagestyle that demonstrates single keyword substitution
comment:2 Changed 4 years ago by jas8522
- Owner set to Catfish_Man
David, this seems like your kind of fun... ;)
comment:3 Changed 4 years ago by Catfish_Man
- Milestone changed from Adium X 1.2.x to Needs feedback from users
Tempting to WONTFIX this on the grounds that any legitimate use-case for it has better ways of doing the same thing... I could probably be convinced otherwise with good examples though.
comment:4 Changed 4 years ago by mathuaerknedam
You already know about one of my examples, providing two different sets of javascript, and then using groupchat.css to select which one I need to use. But you offered to provide a better way for me to do that, and I'd be happy to use a better way if it actually provides the functionality I need.
The other time I've run into this was for a messagestyle that was going to use tables to allow columns to auto-adjust while remaining consistent (yMous grew out of this). This particular style used indentation, and the tables required colspans (since there's no equivalent in CSS). I wanted to provide a non-indented variant, but, as in the first example, I had to use css to select between multiple elements containing %message%.
Personally, I have little interest in actually using multiple %message% substitutions at the same time (except maybe to put the message in a tooltip or highlighting the most recent message in a footer-like marquee :-). My current problem is that the existence of multiple %message% keywords, even when only one is displayed, seems to break all of them in some cases (but admittedly not in my test messagestyle).
I took my yMousHOVERcolor messagestyle prototype and linked groupchat.css into my header.html. (This makes it a lot easier to test the groupchat changes since I can now test things in the messages prefpane.) When I tried to use my groupchat html elements, all all messages showed only %message%" with no substition for that keyword. I don't know if this bug is the cause, but it seems unlikely that they're not related.
comment:5 Changed 4 years ago by mathuaerknedam
FWIW, this sort of loading of alternate text is also done in the Smooth Operator Beta, though not with %message%.
comment:7 Changed 4 years ago by Robby
- Milestone changed from Needs feedback from users to Needs dev review
comment:9 Changed 3 years ago by mathuaerknedam
Okay, now that I've started working on SO2, I've run into a place where I'd like this. As you may know, SO2 uses custom status/event text. as long as this is the case, I'd like to be able to put the native text into the tooltip. This works for *most* messages (since they're custom) but Date Separators need the native text, and any untrapped messages will as well.
comment:10 Changed 3 years ago by catfish_man
- Status changed from new to closed
- Resolution set to fixed
(In [26661]) Replace %message% in a loop as we do other keywords. Fixes #9672


screenshot of attached messagestyle