$extern_url_pic = '<img src="' . JURI::base() . 'components/com_jdownloads/assets/images/link_extern.gif" alt="external" />'; // =========================================== // display now the categories files (downloads) for ($i = 0; $i < count($files); $i++) { // build the categories path for the file if ($files[$i]->category_cat_dir_parent) { $category_dir = $files[$i]->category_cat_dir_parent . '/' . $files[$i]->category_cat_dir; } elseif ($files[$i]->category_cat_dir) { $category_dir = $files[$i]->category_cat_dir; } else { // we have an uncategorised download so we must add the defined folder for this $category_dir = $jlistConfig['uncategorised.files.folder.name']; } // When user has access: get data to publish the edit icon and publish data as tooltip if ($files[$i]->params->get('access-edit')) { $editIcon = JDHelper::getEditIcon($files[$i]); } else { $editIcon = ''; } $has_no_file = false; $file_id = $files[$i]->file_id; // when we have not a menu item to the singel download, we need a menu item from the assigned category, or at lates the root itemid if ($files[$i]->menuf_itemid) { $file_itemid = (int) $files[$i]->menuf_itemid; } else { $file_itemid = $category_menu_itemid; } if (!$files[$i]->url_download && !$files[$i]->other_file_id && !$files[$i]->extern_file) { // only a document without file //$userinfo = JText::_('COM_JDOWNLOADS_FRONTEND_ONLY_DOCUMENT_USER_INFO'); $has_no_file = true;
} else { $body = str_replace("{custom_value_{$x}}", $custom_fields_arr[2][$x - 1][$row_custom_values[$x]], $body); } } else { // remove placeholders if ($jlistConfig['remove.field.title.when.empty']) { $body = str_replace("{custom_title_{$x}}", '', $body); } else { $body = str_replace("{custom_title_{$x}}", $custom_fields_arr[1][$x - 1], $body); } $body = str_replace("{custom_value_{$x}}", '', $body); } } // get data to publish the edit icon and publish data as tooltip if ($canEdit) { $editIcon = JDHelper::getEditIcon($this->item); } else { $editIcon = ''; } $body = str_replace('{price_value}', $this->item->price, $body); $body = str_replace('{views_value}', JDHelper::strToNumber((int) $this->item->views), $body); $body = str_replace('{details_block_title}', JText::_('COM_JDOWNLOADS_FE_DETAILS_DATA_BLOCK_TITLE'), $body); if ($this->item->url_download) { $body = str_replace('{file_name}', JDHelper::getShorterFilename($this->item->url_download), $body); } elseif (isset($this->item->filename_from_other_download) && $this->item->filename_from_other_download != '') { $body = str_replace('{file_name}', JDHelper::getShorterFilename($this->item->filename_from_other_download), $body); } else { $body = str_replace('{file_name}', '', $body); } $body = str_replace('{file_title}', $this->item->file_title . ' ' . $editIcon, $body); $body = str_replace('{filesize_value}', $this->item->size, $body);