Ticket #221 (assigned enhancement)

Opened 4 years ago

Last modified 2 months ago

Adding FormatUser method

Reported by: NilsLindenberg Owned by: BrianKoontz
Priority: low Milestone: 1.3
Component: core Version: 1.1.6.0
Severity: minor Keywords: user formatting
Cc:

Description

This method renders usernames as links only when needed (when the corresponding userpage exists), avoiding the creation of dozens missing page links for users without userpage. It also makes other options configurable like truncating long hostnames or disabling link formatting.

Ref

 http://wikkawiki.org/FormatUserMethod

Attachments

Wakka.class.php.patch Download (2.7 KB) - added by GeorgePetsagourakis 2 months ago.
Coding style, optimizations, etc... better FormatUser()

Change History

  Changed 4 years ago by NilsLindenberg

  • milestone changed from 1.1.7 to 1.1.7.1

  Changed 3 years ago by BrianKoontz

  • status changed from new to closed
  • resolution set to fixed

Implemented in support of #418 (nested comments).

  Changed 3 years ago by DarTar

  • status changed from closed to reopened
  • resolution fixed deleted
  • milestone changed from 1.1.7.1 to 1.1.7

reopening ticket to implement it also in other routines involving users

  Changed 3 years ago by DarTar

(In [486]) reverting [482] that inadvertently replaced tabs with spaces (Brian make sure you check your editor settings), refs #418 and #221

  Changed 3 years ago by DarTar

(In [487]) Reimplementing FormatUser() as per [482] (see [486]), refs #418 and #221

  Changed 3 years ago by DarTar

(In [495]) Adding link tail for Author profiles and starting applying FormatUser() method, refs #221 and #35

  Changed 3 years ago by DarTar

(In [496]) Actually formatting the UserName from the UserSettings is a bad idea (the userpage is no more displayed as missing!), reverting part of the previous change, refs #221 and #35

  Changed 3 years ago by DarTar

Brian, more precisely, this should be applied in any action/handler in which we make a reference to a user (including RecentChanges, RecentComments, revisions etc.). I'm planning to add another class for anonymous users.

  Changed 3 years ago by DarTar

(In [499]) Applying FormatUser() to RecentlyCommented, added phpdoc links, refs #221

  Changed 3 years ago by DarTar

(In [500]) Applying FormatUser() to RecentComments, refs #221

  Changed 3 years ago by DarTar

(In [503]) Applying FormatUser() to PageIndex, refs #221

  Changed 3 years ago by DarTar

(In [504]) Applying FormatUser() to lastedit, refs #221

  Changed 3 years ago by DarTar

(In [509]) Applying FormatUser() to revisions handler, refs #221

  Changed 3 years ago by DarTar

(In [511]) Applying FormatUser() to history + slightly improved styling for revisions and history, refs #380 and #221

  Changed 18 months ago by DarTar

  • milestone changed from 1.2 to 1.3

Retargeting to 1.3. Code for this ticket may have already been committed to trunk, from which 1.3 will be branched. Consider backporting urgent issues to 1.2.X

  Changed 11 months ago by BrianKoontz

(In [1506]) Ported #221 from trunk to 1.3. Refs #221.

  Changed 11 months ago by BrianKoontz

  • owner changed from unassigned to BrianKoontz
  • status changed from reopened to assigned

  Changed 11 months ago by BrianKoontz

  • status changed from assigned to testing

  Changed 11 months ago by DarTar

(In [1509]) Adding missing constant required by FormatUser() method, refs #221 and #911

  Changed 9 months ago by BrianKoontz

(In [1543]) Updated with FormatUser(). Refs #221, #912.

  Changed 7 months ago by DarTar

(In [1591]) Preliminary implementation of link tails in "light" theme, refs #35 and #221

  Changed 4 months ago by DotMG

  • status changed from testing to assigned

I needed to add !important to padding-left of [.user, .user:hover] to make this property applied on Chromium and Firefox.

Without !important, the icon is obscured by the text.

Changed 2 months ago by GeorgePetsagourakis

Coding style, optimizations, etc... better FormatUser()

  Changed 2 months ago by BrianKoontz

GP: I'd rather not make cosmetic changes to Wakka.class.php at this point.

follow-up: ↓ 25   Changed 2 months ago by GeorgePetsagourakis

@BrianKoontz: The patch submitted is not about cosmetic changes. It provides the same functionality with the linked page in the issue description and uses 'return' statement instead of return variable that improves the code flow. Apply the patch and read the function ;)

in reply to: ↑ 24   Changed 2 months ago by BrianKoontz

Replying to GeorgePetsagourakis:

@BrianKoontz: The patch submitted is not about cosmetic changes. It provides the same functionality with the linked page in the issue description and uses 'return' statement instead of return variable that improves the code flow. Apply the patch and read the function ;)

I'll look at it again...I just didn't see any substantial change in functionality upon initial review.

Note: See TracTickets for help on using tickets.