the old thread requesting token support #318443: Integration with token (new branch request) became too long
and I missed a couple of requests that are still missing

[comment-parent-user] @#5, #6
User1 posts a topic: "Here's my topic"
User2 replies: "Re:[User1] Here's my topic"
User3 replies to User 2: "Re:[User2] Here's my topic"
User4 replies to User 1: "Re:[User1] Here's my topic"

[comment-parent-auto-numbering] @#17, #23
#17 Re:#14     (when replying to #14)
#18 Re:#17     (when replying to #17)
#19                (or #19 Re: Node Title , in response to original post)
#20 Re:#12     (when replying to #12)

Comments

arhak’s picture

I'm marking this as postponed to wait for more votes in favor
besides, haven't got much feedback about the new "token support" feature

in the old thread the above use cases were brought by mpaler & skizzo respectively

PS:
mpaler seems to be using Drupal 5.x, but haven't requested backporting token support
skizzo seems to be using 6.x-2.0-alpha2 and haven't asked for any new feature

arhak’s picture

Component: Code » Token support
skizzo’s picture

Subscribing. Btw, could [comment-parent-auto-numbering] be linked to parent URL?
If so, one could easily backtrack the comments chains, reducing the need for quotations.
I mean, having a flat comments list (much easier for generic user) but still be able to trace "subthreads"
within the list. Also, if/when implemented, it may be better to use "Re:#0" for replies to original post.

arhak’s picture

@#3 interesting..

arhak’s picture

@#3

Btw, could [comment-parent-auto-numbering] be linked to parent URL?

that would be a nice touch (for those who might like it)
but.. how?
comment's subjects are already a link (sort of permalink)
moreover, subjects have to be sanitized, which implies check_plain

unless... implementing comment_subject_preprocess_comment to override $variables['title'] (with a manual sanitized version),

but including a link to its parent will drop the permalink (link anchors can't be nested)
would that be desirable at all?

and yet.. on preprocess time there is just the resulting subject, with token already replaced
how to recognize what was fragment of a token?
it would have to be all the subject linking to its parent or to itself
(I implemented it and test it)
again: would that be desirable at all?
can you figure an algorithm to accomplish such task?
recognizing what previously was a token (to wrap its fragment with a link) would require the reverse evaluation from a given string to the token which generated fragment values, wow

arhak’s picture

[comment-parent-auto-numbering] is already available for testing at #675376: support [comment-parent-auto-numbering] token

skizzo’s picture

I see the patch failing on 6.x-2.0-alpha1 (and 6.x-2.x-dev)
Is it intended for 6.x-1.5 ? Thank you!

patching file comment_subject.module
patching file comment_subject.token.inc
Hunk #1 FAILED at 9.
Hunk #2 FAILED at 13.
Hunk #3 succeeded at 31 with fuzz 2.
Hunk #4 FAILED at 37.
Hunk #5 succeeded at 39 with fuzz 1.

avpaderno’s picture

would that be desirable at all?

Not, it would not. If it would break a Drupal functionality, then I think that is not desirable at all. As arhak pointed out, it is not possible to add a link anchor inside another link anchor.

arhak’s picture

@#7 remember 6.x-2.0-alpha1 missed comment_subject.token.inc, I hope you manually added, otherwise use 6.x-2.0-alpha2 or 6.x-2.x-dev

PS: was the wrong patch, now should work

arhak’s picture

@#8 well, actually it wouldn't "break a Drupal functionality" since ultimately it would be an optional configuration (disabled by default)

nevertheless, I still vote it -1, and will take #8 as another -1

skizzo’s picture

The latest patch runs smoothly on my test site, thx. Re linking to parent comment, I see your point... Maybe that would better fit the custom_links module, which is already supporting a bunch of tokens (but none related to comments).

[edit] I take that back: custom_links adds links to nodes, not comments...

arhak’s picture

@#11 skizzo, comment_subject shouldn't attempt to link the comment's subject to parent comments
but if you have another module which provides node links using tokens, then this module could provide a token to link the parent which shouldn't be used to generate subjects, since they will pass through check_plain, but, in that case, what should be the text of such link?
did I explain myself?

PS: BTW, the feedback for [comment-parent-auto-numbering] should be reported at #675376, since it got its separated issue

arhak’s picture

Status: Postponed » Active

lets set this back to "active" now that 6.x-2.x-alpha4 is out ([comment-parent-auto-numbering] got in it)
but I didn't find useful [comment-parent-author-*] (rather misleading)
and I haven't received any other request regarding parent's tokens

arhak’s picture

Status: Active » Closed (fixed)

feel free to reopen for more requests