Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-15571

Extend "last post" links on forum index page to allow different link targets

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Won't Fix
    • 3.2.2
    • None
    • Viewing forums

    Description

      I'm developing a phpBB extension (Empty Post Subjects) which displays on the forum's index page the subject of the topic instead of the subject of the last post if that last post subject was left empty.

      Currently, if the following setting in the ACP is enabled, there are two links to the "last post" shown on the forum's index page:

      General > Board Configuration > Board Features > Display subject of last added post on forum list

      The behavior is as follows:

      • The first link is the subject of the "last post", marked yellow in the attached screenshot.
      • The second link is the small "view the latest post" icon near the post author's name, marked red.
      • Both links have the same target, which is the last post.

      I got a request from a user of my extension if it was possible to have different link targets here: the first link should target the topic, the second link should target the last post of the topic.

      This is currently not possible, as the forumlist_body.html template uses the same variable for both links.

      <!-- U_LAST_POST is the last post URL -->
      <a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}" class="lastsubject">{forumrow.LAST_POST_SUBJECT_TRUNCATED}</a> <br />
      {L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}
      <a href="{forumrow.U_LAST_POST}" title="{L_VIEW_LATEST_POST}">
      	<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{L_VIEW_LATEST_POST}</span>
      </a>
      

      Could you please consider changing this template and allowing extension authors to change the link targets independently?

      Maybe you could introduce a new variable U_LAST_POST_SUBJECT (which by default has the same value as U_LAST_POST), and is used for the first link?

      Attachments

        Activity

          People

            Unassigned Unassigned
            ___Martin ___Martin [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: