Beispiel #1
0
     $number = "{$num}. ";
 }
 // add description in tooltip
 if ($view_tooltip && $files[$i]->description != '') {
     $link_text = '<a href="' . $link . '">' . JHtml::tooltip(strip_tags(substr($files[$i]->description, 0, $view_tooltip_length)) . $short_char, JText::_('MOD_JDOWNLOADS_RELATED_DESCRIPTION_TITLE'), $files[$i]->file_title . ' ' . $version . $files[$i]->release, $files[$i]->file_title . ' ' . $version . $files[$i]->release) . '</a>';
 } else {
     $link_text = '<a href="' . $link . '">' . $files[$i]->file_title . ' ' . $version . $files[$i]->release . '</a>';
 }
 $html .= '<tr style="vertical-align:top;"><td style="text-align:' . $alignment . '">' . $number . $files_pic . $link_text . '</td>';
 // add the hits
 if ($view_hits) {
     if ($files[$i]->downloads) {
         if ($view_hits_same_line) {
             $html .= '<td style="text-align:' . $hits_alignment . ';">' . $hits_label . '&nbsp;' . modJdownloadsRelatedHelper::strToNumber($files[$i]->downloads) . '</td>';
         } else {
             $html .= '<tr style="vertical-align:top;"><td style="text-align:' . $hits_alignment . ';">' . $hits_label . '&nbsp;' . modJdownloadsRelatedHelper::strToNumber($files[$i]->downloads) . '</td>';
         }
     }
 }
 // add the hits
 if ($view_date) {
     if ($files[$i]->date_added) {
         if ($view_date_same_line) {
             $html .= '<td style="text-align:' . $date_alignment . ';"><small>' . substr(JHTML::Date($files[$i]->date_added, $date_format), 0, 10) . '</small></td>';
         } else {
             $html .= '</tr><tr><td style="text-align:' . $date_alignment . ';"><small>' . substr(JHTML::Date($files[$i]->date_added, $date_format), 0, 10) . '</small></td>';
         }
     }
 }
 $html .= '</tr>';
 // add the first download screenshot when exists and activated in options
$view_numerical_list = $params->get('view_numerical_list');
$view_thumbnails = $params->get('view_thumbnails');
$view_thumbnails_size = $params->get('view_thumbnails_size');
$view_thumbnails_dummy = $params->get('view_thumbnails_dummy');
$hits_alignment = $params->get('hits_alignment');
$cat_show = $params->get('cat_show');
$cat_show_type = $params->get('cat_show_type');
$cat_show_text = $params->get('cat_show_text');
$cat_show_text = modJdownloadsRelatedHelper::getOnlyLanguageSubstring($cat_show_text);
$cat_show_text_color = $params->get('cat_show_text_color');
$cat_show_text_size = $params->get('cat_show_text_size');
$cat_show_as_link = $params->get('cat_show_as_link');
$view_tooltip = $params->get('view_tooltip');
$view_tooltip_length = intval($params->get('view_tooltip_length'));
$alignment = $params->get('alignment');
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'));
$thumbfolder = JUri::base() . 'images/jdownloads/screenshots/thumbnails/';
$thumbnail = '';
$border = '';
$cat_show_text = trim($cat_show_text);
if ($cat_show_text) {
    $cat_show_text = ' ' . $cat_show_text . ' ';
}
if ($sum_view == 0) {
    $sum_view = 5;
}
$files = modJdownloadsRelatedHelper::getList($params, $catids, $id);
if (count($files) < 2 && !$view_not_found) {
    return;
}
require JModuleHelper::getLayoutPath('mod_jdownloads_related', $params->get('layout', 'default'));