Page Index Toggle Pages: [1] 2 3 4 ReplyAdd Poll Send Topic
Very Hot Topic (More than 25 Replies) Re: Looking toward 2.6.1 (Read 30025 times)
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Looking toward 2.6.1
Aug 24th, 2014 at 7:24pm
Mark & QuoteQuote  
XTC wrote on Aug 24th, 2014 at 7:17pm:
Slimbrowser!


In PostBox.pm find
Code (Perl)
Select All
    $ubbc_box_w = $boxlist1_w + $mods_w; 


That's the section that sets the px width of the UBBC box overall. See if adding 1 or 2 to it helps.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Looking toward 2.6.1
Reply #1 - Aug 24th, 2014 at 7:41pm
Mark & QuoteQuote  
Revising my previous patch...

Code
Select All
 --- C:/Users/Mika/AppData/Local/Temp/PostBox.pm-revBASE.svn001.tmp.pm	Fri Aug 22 16:41:00 2014
 +++ C:/build/yabb/trunk/cgi-bin/yabb2/Sources/PostBox.pm	Mon Aug 25 00:41:31 2014
 @@ -20,6 +20,8 @@
  $postboxpmver = 'YaBB 2.6.0 $Revision: 1545 $';
  if ( defined $actions && $action eq 'detailedversion' ) { return 1; }
  get_micon();
 +$ubbcbak = 'ubbc2.png';
 +
  #InstantMessage.pm and Post.pl use the same code for the posting box - why have two copies? #

  sub postbox {
 @@ -912,7 +914,7 @@
          $boxlist .= qq~<span class="ubbcbutton" style="background-image: url($imagesdir/UBBC/$ubbcbak);"><img src='$imagesdir/UBBC/$img' onclick='$click;' $hand alt='$alt' title='$alt' /></span>\n~;
          $w++
      }
 -    $boxlist_w = $w * 23;
 +    $boxlist_w = $w * 24;
      return ($boxlist, $boxlist_w);
  }

 @@ -933,7 +935,7 @@
      else {
          $mod_w = 1 + int $w/2;
      }
 -    $boxlist_w = $mod_w * 23;
 +    $boxlist_w = $mod_w * 24;
      return ($boxlist, $boxlist_w);
  }

  

« Last Edit: Aug 24th, 2014 at 9:42pm by Monni » 
Reason: Revise patch 
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box XTC
Global Moderator
*****
Offline


YaBB 2.6.0/1/11 Mods

Posts: 174
Location: @ustria
Joined: Feb 12th, 2014
Gender: Male
Mood: Freaky
Zodiac sign: Aquarius
Re: Looking toward 2.6.1
Reply #2 - Aug 24th, 2014 at 8:05pm
Mark & QuoteQuote  
@Monni

Code (Perl)
Select All
    $boxlist_w = $w * 23; 



....is present twice (sub ubbc_boxlist & sub ubbc_modlist)

lg XTC
  

Back to top
 
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Looking toward 2.6.1
Reply #3 - Aug 24th, 2014 at 9:43pm
Mark & QuoteQuote  
XTC wrote on Aug 24th, 2014 at 8:05pm:
@Monni

Code (Perl)
Select All
    $boxlist_w = $w * 23; 



....is present twice (sub ubbc_boxlist & sub ubbc_modlist)

lg XTC


Thanks, updated the patch in previous post...
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Looking toward 2.6.1
Reply #4 - Aug 24th, 2014 at 11:58pm
Mark & QuoteQuote  
When I look at it in Slimbrowser setting the width to *24 makes the lower line wider than the upper one. *23 wide makes them line up again. I think adding a few pixels to $boxlist1_w should widen the entire enclosing box enough to keep the parse box on the same line as the rest of the upper line. (The graphics are 23px wide.)
Code (Perl)
Select All
$ubbc_box_w = $boxlist1_w + $mods_w + 2; 

  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Looking toward 2.6.1
Reply #5 - Aug 25th, 2014 at 7:18am
Mark & QuoteQuote  
Dandello wrote on Aug 24th, 2014 at 11:58pm:
When I look at it in Slimbrowser setting the width to *24 makes the lower line wider than the upper one. *23 wide makes them line up again. I think adding a few pixels to $boxlist1_w should widen the entire enclosing box enough to keep the parse box on the same line as the rest of the upper line. (The graphics are 23px wide.)
Code (Perl)
Select All
$ubbc_box_w = $boxlist1_w + $mods_w + 2; 



I tried to widen it and I had to add 15 pixels before it looked normal. The difference is that in other forums with custom templates there is actually 1 pixel padding between the UBBC buttons... You can adjust .ubbcbutton's margin-left and margin-right (default is -2px for both) to realign the two lines.
« Last Edit: Aug 25th, 2014 at 8:31am by Monni »  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box XTC
Global Moderator
*****
Offline


YaBB 2.6.0/1/11 Mods

Posts: 174
Location: @ustria
Joined: Feb 12th, 2014
Gender: Male
Mood: Freaky
Zodiac sign: Aquarius
Re: Looking toward 2.6.1
Reply #6 - Aug 25th, 2014 at 10:03am
Mark & QuoteQuote  
Hello

Ok... what is the best to do now ... ?

PostBox.pm or css edit ... or both  Huh

lg XTC
  

Back to top
 
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Looking toward 2.6.1
Reply #7 - Aug 25th, 2014 at 10:22am
Mark & QuoteQuote  
XTC wrote on Aug 25th, 2014 at 10:03am:
Hello

Ok... what is the best to do now ... ?

PostBox.pm or css edit ... or both  Huh

lg XTC


It is obvious one fix doesn't work for all templates... I edited only PostBox.pm to align the css buttons. I haven't figured out yet what is the difference that adds the 1 pixel padding to custom templates on Chrome here, but not default template.
I also tested with IE, but it seems it looks even worse as the padding isn't even constant and varies between 0 and 1 pixels... When I did set "float: left" and cleared left and right margins for CSS buttons, the gap disappeared when using Chrome, but as the button spacing was still hardcoded to 24 in sources, the two rows were not same width yet.
« Last Edit: Aug 25th, 2014 at 6:07pm by Monni » 
Reason: Update with more tests 
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Looking toward 2.6.1
Reply #8 - Aug 25th, 2014 at 11:05am
Mark & QuoteQuote  
This is how it looks here with 24px per button and 2px left and right margin.

« Last Edit: Aug 25th, 2014 at 12:05pm by Monni »  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Looking toward 2.6.1
Reply #9 - Aug 25th, 2014 at 6:03pm
Mark & QuoteQuote  
I couldn't find where the padding/margin on the span/images was coming from either - that's why the ubbcbutton css has the
Code (CSS)
Select All
margin: 0 -2px 

  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Looking toward 2.6.1
Reply #10 - Aug 25th, 2014 at 6:06pm
Mark & QuoteQuote  
Monni wrote on Aug 24th, 2014 at 5:48pm:
Code
Select All
 $ubbcbak = 'ubbc2.png';
  


is missing from top of PostBox.pm



Actually, it was missing from MyCenter.template.  Embarrassed
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Looking toward 2.6.1
Reply #11 - Aug 25th, 2014 at 6:12pm
Mark & QuoteQuote  
Dandello wrote on Aug 25th, 2014 at 6:06pm:
Monni wrote on Aug 24th, 2014 at 5:48pm:
Code
Select All
 $ubbcbak = 'ubbc2.png';
  


is missing from top of PostBox.pm



Actually, it was missing from MyCenter.template.  Embarrassed


I pretty much rewrote the PostBox.pm last night to cleanup things... I strongly think we should hardcode this filename instead of spreading the variable all around the files... There is some other fixes I need to diff, but currently my tree is pretty much based on assumptions what will become 2.6.2 or beyond, and not 2.6.1... I need to clean it up before I can make a usable diff.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Looking toward 2.6.1
Reply #12 - Aug 25th, 2014 at 6:21pm
Mark & QuoteQuote  
Dandello wrote on Aug 25th, 2014 at 6:03pm:
I couldn't find where the padding/margin on the span/images was coming from either - that's why the ubbcbutton css has the
Code (CSS)
Select All
margin: 0 -2px 



Try replacing the "margin: 0 -2px;" css line with "float: left;" ... That worked for me... No more padding/margin.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: Looking toward 2.6.1
Reply #13 - Aug 25th, 2014 at 7:13pm
Mark & QuoteQuote  
This is the version I have now... Looks good with both Chrome and IE with constant 1 pixel padding...

Code
Select All
 Index: cgi-bin/yabb2/Sources/PostBox.pm
 ===================================================================
 --- cgi-bin/yabb2/Sources/PostBox.pm	(revision 1550)
 +++ cgi-bin/yabb2/Sources/PostBox.pm	(working copy)
 @@ -66,21 +66,20 @@
      ( $boxlist1, $boxlist1_w )   = ubbc_boxlist(%boxlist1);
      ( $textdecor, $textdecor_w ) = ubbc_boxlist(%textdecor);
      ( $txtalgn, $txtalgn_w )     = ubbc_boxlist(%txtalgn);
 -    $fntcolor_w = 91;
 +    $fntcolor_w = 93;
      $font_w = $boxlist1_w - ( $textdecor_w + $txtalgn_w + $fntcolor_w );
      $ubbc_box_w = $boxlist1_w + $mods_w;
 -    $px = 'px';
 -    $box = qq~            <div style="float:left; width:$ubbc_box_w$px">
 -            <div style="float:right; width:$mods_w$px">
 +    $box = qq~            <div style="float:left; width:${ubbc_box_w}px">
 +            <div style="float:right; width:${mods_w}px">
              $mods
              </div>
 -            <div style="float:left; width:$boxlist1_w$px">
 +            <div style="float:left; width:${boxlist1_w}px">
              $boxlist1
              <br /></div>
 -            <div style="float:left; width:$textdecor_w$px">
 +            <div style="float:left; width:${textdecor_w}px">
              $textdecor
              </div>
 -            <div style="float:left; text-align:center; width:$font_w$px">
 +            <div style="float:left; text-align:center; width:${font_w}px">
              <select name="fontface" id="fontface" onchange="if(this.options[this.selectedIndex].value) fontfce(this.options[this.selectedIndex].value);">
                  <option value="Verdana">Verdana</option>
                  <option value="">-\\-\\-\\-\\-\\-\\-\\-\\-</option>
 @@ -132,7 +131,7 @@
                  if(thistask == "templ") previewColor(newcolor);
              }
              </script>
 -            <div style="float:left; height:22px; width:$fntcolor_w$px">
 +            <div style="float:left; height:22px; width:${fntcolor_w}px">
                  <div class="palettebox">
                      <span class="deftpal" style="background-color: #000000;" onclick="ConvShowcolor('#000000')">&nbsp;</span>
                      <span class="deftpal" style="background-color: #333333;" onclick="ConvShowcolor('#333333')">&nbsp;</span>
 @@ -147,11 +146,11 @@
                      <span id="defaultpal5" class="deftpal" style="background-color: $pallist[4];" onclick="ConvShowcolor(this.style.backgroundColor)">&nbsp;</span>
                      <span id="defaultpal6" class="deftpal" style="background-color: $pallist[5];" onclick="ConvShowcolor(this.style.backgroundColor)">&nbsp;</span>
                   </div>
 -                 <div style="float:right; height:22px; padding-left: 1px; width: 23px;">
 +                 <div style="float:right; height:22px; padding-left: 1px; padding-right: 1px; width: 23px;">
                       <span class="ubbcbutton" style="background-image: url($imagesdir/UBBC/$ubbcbak);"><img src="$imagesdir/UBBC/palette1.png" class="cursor" onclick="window.open('$scripturl?action=palette;task=post', '', 'height=308,width=302,menubar=no,toolbar=no,scrollbars=no')" alt="" /></span>
                    </div>
              </div>
 -            <div style="float:left; width:$txtalgn_w$px">
 +            <div style="float:left; width:${txtalgn_w}px">
              $txtalgn
              </div>
          </div>
 @@ -912,7 +911,7 @@
          $boxlist .= qq~<span class="ubbcbutton" style="background-image: url($imagesdir/UBBC/$ubbcbak);"><img src='$imagesdir/UBBC/$img' onclick='$click;' $hand alt='$alt' title='$alt' /></span>\n~;
          $w++
      }
 -    $boxlist_w = $w * 23;
 +    $boxlist_w = $w * 24;
      return ($boxlist, $boxlist_w);
  }

 @@ -933,7 +932,7 @@
      else {
          $mod_w = 1 + int $w/2;
      }
 -    $boxlist_w = $mod_w * 23;
 +    $boxlist_w = $mod_w * 24;
      return ($boxlist, $boxlist_w);
  }

 Index: public_html/yabbfiles/Templates/Forum/default.css
 ===================================================================
 --- public_html/yabbfiles/Templates/Forum/default.css	(revision 1550)
 +++ public_html/yabbfiles/Templates/Forum/default.css	(working copy)
 @@ -1293,7 +1293,7 @@
      height: 22px;
      width: 23px;
      border: 0;
 -    margin: 0 -2px;
 +    margin: 0 1px 1px 0;
      background-position: top right;
      background-repeat: no-repeat;
      text-decoration: none;
 @@ -1300,6 +1300,7 @@
      font-size: 18px;
      vertical-align: top;
      display: inline-block;
 +    float: left;
  }

  .tt { font-family: Courier, monospace; }
  

  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 2234
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Looking toward 2.6.1
Reply #14 - Aug 25th, 2014 at 8:16pm
Mark & QuoteQuote  
And this is what I'm seeing in Firefox on my testbed:

Edited:
Now, there may be some minor differences in the default.css file between what's on the test bed and what's in the SVN and I'll double check those in a bit.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: [1] 2 3 4
ReplyAdd Poll Send Topic
Bookmarks: del.icio.us Digg Facebook Google LinkedIn reddit Twitter Yahoo
Re: Looking toward 2.6.1

Please type the characters exactly as they appear in the image,
without the first 2 and last 2 characters.
The characters must be typed in the same order,
and they are case-sensitive.
Open Preview Preview

You can resize the textbox by dragging the right or bottom border.
Off Topic Comment Insert Spoiler
Insert Hyperlink Insert FTP Link Insert Image Insert E-mail Insert Media Insert Table Insert Table Row Insert Table Column Insert Horizontal Rule Insert Teletype Insert Code Insert Quote Edited Superscript Subscript Insert List /me - my name Insert Marquee Insert Timestamp No Parse
Bold Italicized Underline Insert Strikethrough Highlight
                       
Change Text Color
Insert Preformatted Text Left Align Centered Right Align
resize_wb
resize_hb







Max 5000 characters. Remaining characters:
Text size: %
More Smilies
View All Smilies
Collapse additional features Collapse/Expand additional features Smiley Wink Cheesy Grin Angry Sad Shocked Cool Huh Roll Eyes Tongue Embarrassed Lips Sealed Undecided Kiss Cry