Monni Language Offline Min izāmō Posts: 413 Location: Kaarina, Finland Joined: Jul 16th, 2014 Gender: Mood: Frustrated Zodiac sign: 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 --- 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%" /> GTalk Skype/VoIP Facebook Twitter YouTube ICQ IP Logged
Dandello Forum AdministratorYaBB Modder Offline I love YaBB 2.7! Posts: 2235 Location: The Land of YaBB Joined: Feb 12th, 2014 Gender: Mood: Annoyed Zodiac sign: Re: Hacking default template Reply #1 - Aug 17th, 2014 at 2:33pm Mark & QuoteQuote Sweet! Perfection is not possible. Excellence, however, is excellent. WWW IP Logged