Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Hacking default template (Read 11122 times)
Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 1759
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Re: Hacking default template
Reply #1 - Aug 17th, 2014 at 2:33pm
Print Post  
Sweet!  Smiley
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Monni
Senior Member
****
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Hacking default template
Aug 17th, 2014 at 11:55am
Print Post  
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
 
Page Index Toggle Pages: 1
Send TopicPrint