Page Index Toggle Pages: 1 ReplyAdd Poll Send Topic
Normal Topic Hacking default template (Read 1581 times)
 
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
Hacking default template
Aug 17th, 2014 at 11:55am
Mark & QuoteQuote  
This is a patch against default template to adjust column widths for board images automagically...

Code
Select All
 --- 	Sat Aug 16 17:43:31 2014
 +++ C:/build/yabb/trunk/cgi-bin/yabb2/Templates/default/BoardIndex.template	Sun Aug 17 15:06:58 2014
 @@ -33,6 +33,7 @@
  $sub_extern = 'extern_sub.png';
  $tabfill = q~~;
  $topiccut = 25;
 +$brdpicwidth = ($max_brd_img_width || 50) + 20;

  $boardindex_template = qq~<!-- Default Board Graphics courtesy of http://www.shapes4free.com/ -->
  <!-- Board Index Showcase Poll start -->
 @@ -79,8 +80,8 @@
          </table>
          <table class="bordercolor pad_4px cs_thin">
              <colgroup>
 -                <col style="width:6%" />
 -                <col style="width:94%" />
 +                <col style="width:${brdpicwidth}px" />
 +                <col style="width:auto" />
              </colgroup>
              <tr>
                  <td class="windowbg center">
 @@ -124,8 +125,8 @@
          </table>
          <table class="bordercolor pad_4px cs_thin mar-bot">
              <colgroup>
 -                <col style="width:6%" />
 -                <col style="width:94%" />
 +                <col style="width:${brdpicwidth}px" />
 +                <col style="width:auto" />
              </colgroup>
              <tr>
                  <td class="windowbg info-center center">
 @@ -183,8 +184,8 @@
          </table>
          <table {yabb boardtable} class="bordercolor pad_4px cs_thin mar-bot;" style="table-layout:fixed">
              <colgroup>
 -                <col style="width:6%" />
 -                <col style="width:54%" />
 +                <col style="width:${brdpicwidth}px" />
 +                <col style="width:auto" />
                  <col style="width:8%" />
                  <col style="width:8%" />
                  <col style="width:24%" />
  

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


I love YaBB 2.7!

Posts: 2235
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: Hacking default template
Reply #1 - Aug 17th, 2014 at 2:33pm
Mark & QuoteQuote  
Sweet!  Smiley
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
ReplyAdd Poll Send Topic
Bookmarks: del.icio.us Digg Facebook Google LinkedIn reddit Twitter Yahoo
Hacking default template

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