Subject: Moving miscellaneous MarkUp #2
This time the following patch moves hardcoded markup into the announcelist template. This does not affect any generated markup.
unb_lib/common_out.lib.php
unb_lib/common_out.lib.php
@@ -77,13 +77,13 @@
!$readonly &&
UnbCheckRights('editannounce', $forumid))
{
- $TP['announcelistActionNew'] = '<a href="' . UnbLink('@post', 'announce=-1&forum=' . $forumid, true) . '"><img ' . $UNB['Image']['add'] . ' /> ' . $UNB_T['announcement.new'] . '</a>';
+ $TP['announcelistActionNewLink'] = UnbLink('@post', 'announce=-1&forum=' . $forumid, true);
}
if (!$threadid &&
!$readonly &&
$announce->Count($forumid, $threadid > 0) > $count)
{
- $TP['announcelistActionShowAll'] = '<a href="' . UnbLink('@main', array('id' => $forumid, 'allannounces' => true), true) . '"><img ' . $UNB['Image']['announce'] . ' /> ' . $UNB_T['announcement.show all'] . '</a>';
+ $TP['announcelistActionShowAllLink'] = UnbLink('@main', array('id' => $forumid, 'allannounces' => true), true);
}
}
unb_lib/designs/modern/tpl/announcelist.html!$readonly &&
UnbCheckRights('editannounce', $forumid))
{
- $TP['announcelistActionNew'] = '<a href="' . UnbLink('@post', 'announce=-1&forum=' . $forumid, true) . '"><img ' . $UNB['Image']['add'] . ' /> ' . $UNB_T['announcement.new'] . '</a>';
+ $TP['announcelistActionNewLink'] = UnbLink('@post', 'announce=-1&forum=' . $forumid, true);
}
if (!$threadid &&
!$readonly &&
$announce->Count($forumid, $threadid > 0) > $count)
{
- $TP['announcelistActionShowAll'] = '<a href="' . UnbLink('@main', array('id' => $forumid, 'allannounces' => true), true) . '"><img ' . $UNB['Image']['announce'] . ' /> ' . $UNB_T['announcement.show all'] . '</a>';
+ $TP['announcelistActionShowAllLink'] = UnbLink('@main', array('id' => $forumid, 'allannounces' => true), true);
}
}
@@ -44,12 +44,12 @@
{if or $announcelistActionNew $announcelistActionShowAll}
<div class="all_announcement_actions_bottom {if not sizeof $announcelist}alone{endif}">
{set $div ""}
-{if $announcelistActionNew}
- {$div}{$announcelistActionNew}
+{if $announcelistActionNewLink}
+ {$div}<a href="{$announcelistActionNewLink}"><img {$UNBImage.add} /> {tr "announcement.new"}</a>
{set $div " · "}
{endif}
-{if $announcelistActionShowAll}
- {$div}{$announcelistActionShowAll}
+{if $announcelistActionShowAllLink}
+ {$div}<a href="{$announcelistActionShowAllLink}"><img {$UNBImage.announce} /> {tr "announcement.show all"}</a>
{set $div " · "}
{endif}
</div>
{if or $announcelistActionNew $announcelistActionShowAll}
<div class="all_announcement_actions_bottom {if not sizeof $announcelist}alone{endif}">
{set $div ""}
-{if $announcelistActionNew}
- {$div}{$announcelistActionNew}
+{if $announcelistActionNewLink}
+ {$div}<a href="{$announcelistActionNewLink}"><img {$UNBImage.add} /> {tr "announcement.new"}</a>
{set $div " · "}
{endif}
-{if $announcelistActionShowAll}
- {$div}{$announcelistActionShowAll}
+{if $announcelistActionShowAllLink}
+ {$div}<a href="{$announcelistActionShowAllLink}"><img {$UNBImage.announce} /> {tr "announcement.show all"}</a>
{set $div " · "}
{endif}
</div>
Alala, Alala, Gimme three wishes - CSS

jense
Show profile
Link to this post