Changeset 1409 in ExiteCMS


Ignore:
Timestamp:
05/15/08 22:46:07 (4 years ago)
Author:
hverton
Message:

cleaned up the download bar code
updated the image generation code. font2image now creates new images in the files cache, which are included in the header as normal .png files (makes them cachable by browsers)

Location:
themes/PLi-Fusion/PLiTheme/php-files/themes/PLiTheme
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • themes/PLi-Fusion/PLiTheme/php-files/themes/PLiTheme/templates/templates/_header.tpl

    r1346 r1409  
    204204        <td class='sub-cap-right'><img src='{$smarty.const.THEME}images/blank.gif' width='5' height='21' alt='' style='display:block' /></td> 
    205205    </tr> 
    206     <tr> 
    207         <td colspan='3'> 
    208             <div id='bars' style='float:right;height:100px;margin-top:-121px;'> 
    209                 <table class='bargraph'> 
    210                     <tr> 
    211                         <td> 
    212                         </td> 
    213                         {section name=index loop=$downloadbars} 
    214                             <td width='40'> 
    215                                 <img src='/themes/PLiThemeCentered/images/bar-{$smarty.section.index.rownum}.gif' style='width:16px;height:{$downloadbars[index].value}px;' alt='{$downloadbars[index].download_count}' title='{$downloadbars[index].download_count}'/> 
    216                             </td> 
    217                         {/section} 
    218                     </tr> 
    219                     <tr> 
    220                         <th> 
    221                             <img src='{$bartitle}' alt='' /> 
    222                         </th> 
    223                         {section name=index loop=$downloadbars} 
    224                             <th width='40'> 
    225                                 <a href='/downloads.php?cat_id={$downloadbars[index].download_cat}&download_id={$downloadbars[index].download_id}' title=''><img src='{$downloadbars[index].image_url}' alt='' /></a> 
    226                             </th> 
    227                         {/section} 
    228                     </tr> 
    229                 </table> 
    230             </div> 
    231         </td> 
    232     </tr> 
    233206</table> 
     207<div style='margin-left:auto;margin-right:auto;width:{$smarty.const.THEME_WIDTH}px;height:120px;margin-top:-121px;'> 
     208    <div id='bars' style='float:right;height:100px;'> 
     209        <table class='bargraph'> 
     210            <tr> 
     211                <td> 
     212                </td> 
     213                {section name=index loop=$downloadbars} 
     214                    <td width='40'> 
     215                        <img src='/themes/PLiThemeCentered/images/bar-{$smarty.section.index.rownum}.gif' style='width:16px;height:{$downloadbars[index].value}px;' alt='{$downloadbars[index].download_count}' title='{$downloadbars[index].download_count} {$locale.087}'/> 
     216                    </td> 
     217                {/section} 
     218            </tr> 
     219            <tr style=''> 
     220                <th> 
     221                    <img src='{$bartitle}' height='{$bartitle_height}' width='{$bartitle_width}' alt='' style='vertical-align:top;' /> 
     222                </th> 
     223                {section name=index loop=$downloadbars} 
     224                    <th width='40'> 
     225                        <a href='/downloads.php?cat_id={$downloadbars[index].download_cat}&amp;download_id={$downloadbars[index].download_id}' title=''><img src='{$downloadbars[index].image_url}' height='{$downloadbars[index].image_height}' src='{$downloadbars[index].image_url}' width='{$downloadbars[index].image_width}' alt='' style='vertical-align:top;' /></a> 
     226                    </th> 
     227                {/section} 
     228            </tr> 
     229        </table> 
     230    </div> 
     231</div> 
    234232{***************************************************************************} 
    235233{* End of Template                                                         *} 
  • themes/PLi-Fusion/PLiTheme/php-files/themes/PLiTheme/templates/templates/_stylesheets.tpl

    r1346 r1409  
    3232 
    3333                        /* wiki links */ 
    34 a.wiki_link:link,a.wiki_link:visited { color:#000; text-decoration:none; border-width:0px 0px 2px 0px; border-style:dotted; border-color:#ff0000; } 
     34a.wiki_link:link,a.wiki_link:visited { color:#000; text-decoration:none; border-width:0px 0px 1px 0px; border-style:dotted; border-color:#ff0000; } 
    3535 
    3636                        /* image anchors */ 
  • themes/PLi-Fusion/PLiTheme/php-files/themes/PLiTheme/theme.php

    r1346 r1409  
    7070$variables['downloadbars'] = downloadbars(); 
    7171 
    72 // create download titles and link information 
    73 // (in opposite order, bar div's are shown from right to left!) 
    74 $barcount = count($variables['downloadbars']); 
    75 $variables['downloadtitles'] = array(); 
    76 foreach($variables['downloadbars'] as $bar) { 
    77     $variables['downloadtitles'][--$barcount] = array('download_id' => $bar['download_id'], 'download_title' => $bar['download_title'], 'download_count' => $bar['download_count']); 
    78 } 
    79  
    8072// bar counter title 
    8173$variables['bartitle'] = bartitle($variables['downloadbars']); 
     74$size = getimagesize(PATH_ROOT.$variables['bartitle']); 
     75$variables['bartitle_height'] =$size[1]; 
     76$variables['bartitle_width'] = $size[0]; 
    8277 
    8378// unread forum post indicator 
  • themes/PLi-Fusion/PLiTheme/php-files/themes/PLiTheme/theme_functions.php

    r1346 r1409  
    8686    // get the download statistics for the required download records 
    8787    $total = 0; 
    88     $result = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_bar > '0' ORDER BY download_bar DESC"); 
     88    $result = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_bar > '0' ORDER BY download_bar ASC"); 
    8989    while ($data = dbarray($result)) { 
    9090        $access = true; 
     
    109109            $font2png['font_text'] = $data['download_title']; 
    110110            $data['image_url'] = font2image($font2png); 
     111            $size = getimagesize(PATH_ROOT.$data['image_url']); 
     112            $data['image_height'] =$size[1]; 
     113            $data['image_width'] = $size[0]; 
    111114            $download[] = $data; 
    112115            $total += $data['download_count']; 
Note: See TracChangeset for help on using the changeset viewer.