Ticket #468 (closed defect: fixed)
EntryIf lacks has_comments and has_pings
Reported by: | jcdubacq | Owned by: | olivier |
---|---|---|---|
Priority: | normal | Milestone: | 2.1 |
Component: | module:core | Version: | 2.0 |
Severity: | minor | Keywords: | |
Cc: |
Description
EntryIf? has support for pings_active (timeout is not elapsed for the current post) and show_pings (there are pings/trackbacks or timeout has not elapsed for the current post). But there is no simple way to get a EntryIf? for just "there are pings".
The same holds for comments. This makes theme with comments detached from the comment form difficult to do. For example, I would like to use:
<tpl:EntryIf operator="||" has_comments="1" has_pings="1" has_attachment="1">
The simple fix is to add these to inc/public/class.dc.template.php (patch included, may need reformating). The old definitions can be left alone, even if show_pings can now be expressed as:
<tpl:EntryIf operator="||" has_pings="1" pings_active="1">
This can also be achieved by plugin, but plugins that redefine core functions of class.dc.template.php are bothersome.
Patch to implement has_pings and has_comments