Not logged in. · Lost password · Register
Forum: Support Ideas and suggestions RSS
Moving miscellaneous MarkUp
jense #1
Member since Nov 2006 · 327 posts · Location: Dortmund
Group memberships: Members
Show profile · Link to this post
Subject: Moving miscellaneous MarkUp
Is there any chance to include fixes such as
[ in unb_lib/common_post.lib.php ]
  1. @@ -220,7 +220,7 @@
  2.         {
  3.                 if ($user->Load($post->GetUser()))
  4.                 {
  5. -                       $tpitem['authorStatus'] = UnbGetUserStatusText($user->GetID(), '<i>(%s)</i>', true, false);
  6. +                       $tpitem['authorStatus'] = UnbGetUserStatusText($user->GetID(), '%s', true, false);
  7.                         $tpitem['authorTitle'] = t2h($user->GetTitle());
  8.                         $tpitem['authorMemberSince'] = UnbFriendlyDate($user->GetRegDate(), 2, 1, true, 1);
  9.  
  10. @@ -251,11 +251,11 @@
  11.         }
  12.         elseif ($post->GetUser() == 0)
  13.         {
  14. -               $tpitem['authorStatus'] = UnbGetUserStatusText(0, '<i>(%s)</i>', true, true);
  15. +               $tpitem['authorStatus'] = UnbGetUserStatusText(0, '%s', true, true);
  16.         }
  17.         elseif ($post->GetUser() == -1)
  18.         {
  19. -               $tpitem['authorStatus'] = UnbGetUserStatusText(-1, '<i>(%s)</i>', true, true);
  20. +               $tpitem['authorStatus'] = UnbGetUserStatusText(-1, '%s', true, true);
  21.         }
  22.  
  23.         if ($show_thread)
[ and unb_lib/designs/modern/tpl/post.html ]
  1. @@ -51,7 +51,7 @@
  2.         <img id="post_{$post.num}_moreimg" src="{imgurl}arrow_down.png" alt="" />
  3.         {$post.authorName}
  4.  </span>
  5. -<span class="post_userinfo">{--$post.authorOnlineImg}{if $post.authorThreadStarter} <img {$UNBImage.starter} title="{tr "post.thread starter"}" />{endif} {$post.authorStatus}</span>
  6. +<span class="post_userinfo">{--$post.authorOnlineImg}{if $post.authorThreadStarter} <img {$UNBImage.starter} title="{tr "post.thread starter"}" />{endif} {if $post.authorStatus}<i>({$post.authorStatus})</i>{endif}</span>
  7.  <span class="post_date">{$post.date}</span>
  8.  {if $post.numAll}
  9.  <span class="post_num"><a href="{$post.hereLink}">#{$post.numAll}</a></span>
in order to improve the customizability of  UNB?
Alala, Alala, Gimme three wishes - CSS
This post was edited on 2007-10-09, 19:05 by jense.
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
Yes, why not. Consider it changed, as it seems you've already done it in your board.
♪ ...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
Okok, let me phrase it differently: is there any chance that such fixes are included in mainline UNB?  I'd imagine template changes as a con...
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
"Consider it changed" in the official UNB version already. :) I have done it but I just don't want to pack a new release for this change...
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
jense #5
Member since Nov 2006 · 327 posts · Location: Dortmund
Group memberships: Members
Show profile · Link to this post
Oh, fine, thanks!  Apparently, miscellaneous misunderstandings... ;)
Alala, Alala, Gimme three wishes - CSS
jense #6
Member since Nov 2006 · 327 posts · Location: Dortmund
Group memberships: Members
Show profile · Link to this post
And now for some adjustments in the postlist template:
@@ -18,7 +18,7 @@
                        {set $div ""}
                        {if $postlistActionNewThread}{$div}{$postlistActionNewThread}{set $div " &middot; "}{endif}
                        {if $postlistActionReply}{$div}{$postlistActionReply}{set $div " &middot; "}{endif}
-                       {if $postlistPages}{$div}{$postlistPages}{set $div " &middot; "}{endif}
+                       {if $postlistPages}{$div}<img {$UNBImage.page} /> {$postlistPages}{set $div " &middot; "}{endif}
                </div>
        {endif}
 
@@ -167,7 +167,7 @@
                        {endif}
                        {if $postlistActionNewThread}{$div}{$postlistActionNewThread}{set $div " &middot; "}{endif}
                        {if $postlistActionReply}{$div}{$postlistActionReply}{set $div " &middot; "}{endif}
-                       {if $postlistPages}{$div}{$postlistPages}{set $div " &middot; "}{endif}
+                       {if $postlistPages}{$div}<img {$UNBImage.page} /> {$postlistPages}{set $div " &middot; "}{endif}
                </div>
        {endif}
 
@@ -178,8 +178,11 @@
                <h1>{tr "thread.advanced options"}</h1>
                <div class="advanced_options_container">
                <div class="advanced_options_content">
-               {$postlistAdvanced}
-              
+{if sizeof $postlistAdvanced}
+{foreach $option in $postlistAdvanced}
+<div class="advanced_option{if $option.newgroup} new_group{endif}">{$option.option}{if $option.subtitle}<div class="advanced_subtitle">{$option.subtitle}</div>{endif}</
div>
+{endforeach}
+{endif}
                {--<div class="advanced_option new_group">
                        <a href="javascript:nothing()" onclick="toggleLineNos();">{tr "post.show/hide code line numbers"}{--</a>
                </div>}
The relevant changes in unb_lib/common_out.lib.php can be found from the attached file.  They seem to be huge, however, it's mostly generating an array rather than a string $postlistAdvanced...

I've checked as an administrator that the markup remains the same apart from a few irrelevant white space.

One final thing is left in the function UnbPageSelection:
<b>&lsaquo;</b>&nbsp; and &nbsp;<b>&rsaquo;</b> need to be moved into something along the lines of $UNB['Design']['ForumSeparator'], say, $UNB['Design']['next|prev page']?

I'd appreciate if this could be become mainline.
Alala, Alala, Gimme three wishes - CSS
The author has attached one file to this post:
common_out.lib.php 94.7 kBytes
You have no permission to open this file.
Avatar
Yves (Administrator) #7
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
All accepted. This is going to break some of the customised designs out there, but I believe it's okay, because this is a development version and after all it improves the customisation possibilities for designs. Thanks for your contribution!
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
jense #8
Member since Nov 2006 · 327 posts · Location: Dortmund
Group memberships: Members
Show profile · Link to this post
thanks**3, once and for all three threads... ;-)
Alala, Alala, Gimme three wishes - CSS
Avatar
Yves (Administrator) #9
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Yeah, got work done today. I always collect a bit for it pays. ;)
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
NFG #10
Member since Sep 2006 · 120 posts
Group memberships: Members
Show profile · Link to this post
There has been no mention of what this code change actually does.  Would anyone mind filling us in?
jense #11
Member since Nov 2006 · 327 posts · Location: Dortmund
Group memberships: Members
Show profile · Link to this post
The changes move markup from the PHP source to the template (*.html). 
The first patch moves '<i>', '</i>', and parentheses of the author
title.  The second patch moves the small page icon in front of the page
selector.  Furthermore, the advanced options below a postlist are now
generated by an array, so that quite a number of '<[/]div ...>'s can be
eliminated in the PHP source...

HTH and IIRC
Alala, Alala, Gimme three wishes - CSS
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 244.2 ms (157.3 ms) · 101 database queries in 146.8 ms
Current time: 2012-02-08, 09:15:47 (UTC +01:00)