Not logged in. · Lost password · Register
Forum: Support Ideas and suggestions RSS
Moving miscellaneous MarkUp #2
jense #1
Member since Nov 2006 · 327 posts · Location: Dortmund
Group memberships: Members
Show profile · Link to this post
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
@@ -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
@@ -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 " &#xb7; "}
 {endif}
-{if $announcelistActionShowAll}
-    {$div}{$announcelistActionShowAll}
+{if $announcelistActionShowAllLink}
+    {$div}<a href="{$announcelistActionShowAllLink}"><img {$UNBImage.announce} /> {tr "announcement.show all"}</a>
     {set $div " &#xb7; "}
 {endif}
 </div>
Alala, Alala, Gimme three wishes - CSS
Avatar
Yves (Administrator) #2
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Done. :)
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
jense #3
Member since Nov 2006 · 327 posts · Location: Dortmund
Group memberships: Members
Show profile · Link to this post
Thanks for fixing my "fucked up" first post and adding the final relevant piece that was missing.. :-)
Alala, Alala, Gimme three wishes - CSS
Avatar
Yves (Administrator) #4
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
There was a mistake? Really, I appreciate your patches very much, but still I never apply them blindly automatically, but rather try to understand what you did and re-work it in the original code. Maybe this method is transparently immune to minor typos. ;)
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20110527-dev, © 2003-2011 by Yves Goergen
Page created in 176.3 ms (85.9 ms) · 55 database queries in 142.3 ms
Current time: 2012-02-08, 09:32:24 (UTC +01:00)