Page 1 of 2
Re: remove Most downloaded files
Posted: 10 Aug 2008, 17:38
by Jan
in:
components\com_phocadownload\views\sections\tmpl\default.php
line 37 -73
components\com_phocadownload\views\section\tmpl\default.php
line 27 -63
you can remove it or comment (in html/php)
Re: remove Most downloaded files
Posted: 28 Nov 2008, 02:48
by keepitfrozen
Does this still work because if i comment out lines in the :
components\com_phocadownload\views\section\tmpl\default.php
line 27 -63
breaks the link in the box for the section, if that makes sense.
thanks,
Mark
Re: remove Most downloaded files
Posted: 28 Nov 2008, 16:47
by Jan
I think it is obsolete...
42 - 80 in the section ...
you need to comment the following code:
Code: Select all
if (!empty($this->mostvieweddocs)) { ...
Re: remove Most downloaded files
Posted: 29 Nov 2008, 05:44
by keepitfrozen
Thanks Jan. Your the man.
Mark
Re: remove Most downloaded files
Posted: 02 Dec 2008, 15:07
by Jan
Re: remove Most downloaded files
Posted: 31 Dec 2008, 15:12
by nocs90
hi...i have the same problem...
i would remove ''Most downloaded files''...
what u have to done???
beacuse i have not understood..
thanks
Re: remove Most downloaded files
Posted: 05 Jan 2009, 14:03
by wolwes
Hallo,
Wer die "Most downloaded files" nicht mehr haben will, muss folgendes tun (in der Datei \Joomla\components\com_phocadownload\views\sections\tmpl\default.php):
Zunächst diese Code-Zeile in dem Code ganz unten
Code: Select all
echo '<div class="phoca-dl-hr" style="clear:both"> </div>';
nach oberhalb von if (!empty..... kopieren. Sieht schöner aus, weil dann der Abschlussstrich noch erscheint.
Dann zwischen <?php und if... ein
Kommentarzeichen setzen und ganz unten vor ?>
Der Code sieht dann so aus:
Code: Select all
<?php
echo '<div class="phoca-dl-hr" style="clear:both"> </div>';
/* Beginn des Kommentars
if (!empty($this->mostvieweddocs)) {
echo '<div class="phoca-dl-hr" style="clear:both"> </div>';
echo '<div id="phoca-dl-most-viewed-box">';
echo '<div class="documents"><h3>'. JText::_('Most downloaded files').'</h3>';
foreach ($this->mostvieweddocs as $value) {
// FILESIZE
if ($value->filename !='') {
$absFile = str_replace('/', DS, JPath::clean($this->absfilepath . $value->filename));
if (JFile::exists($absFile))
{
$fileSize = PhocaDownloadHelper::getFileSizeReadable(filesize($absFile));
} else {
$fileSize = '';
}
}
// IMAGE FILENAME
$imageFileName = '';
if ($value->image_filename !='') {
$thumbnail = false;
$thumbnail = preg_match("/phocathumbnail/i", $value->image_filename);
if ($thumbnail) {
$imageFileName = '';
} else {
$imageFileName = 'style="background: url(\''.$this->cssimagepath.$value->image_filename.'\') 0 center no-repeat;"';
}
}
echo '<p class="document" '.$imageFileName.'>';
echo '<a href="'. JRoute::_('index.php?option=com_phocadownload&view=category&id='.$value->categoryid.':'.$value->categoryalias.'&Itemid='. JRequest::getVar('Itemid', 1, 'get', 'int')).'">'. $value->title.'</a> <small>(' .$value->sectiontitle. '/'.$value->categorytitle.')</small>';
echo PhocaDownloadHelper::displayNewIcon($value->date, $this->tmpl['displaynew']);
echo PhocaDownloadHelper::displayHotIcon($value->hits, $this->tmpl['displayhot']);
echo '</p>' . "\n";
}
echo '</div></div>';
}
hier endet der Kommentar*/
?>
<?php echo PHOCA_DOWNLOAD_FOOTER; ?>
Grüße
Wolfgang
Re: remove Most downloaded files
Posted: 05 Jan 2009, 14:05
by nocs90
wolwes wrote:Hallo,
Wer die "Most downloaded files" nicht mehr haben will, muss folgendes tun (in der Datei \Joomla\components\com_phocadownload\views\sections\tmpl\default.php):
Zunächst diese Code-Zeile in dem Code ganz unten
Code: Select all
echo '<div class="phoca-dl-hr" style="clear:both"> </div>';
nach oberhalb von if (!empty..... kopieren. Sieht schöner aus, weil dann der Abschlussstrich noch erscheint.
Dann zwischen <?php und if... ein
Kommentarzeichen setzen und ganz unten vor ?>
Der Code sieht dann so aus:
Code: Select all
<?php
echo '<div class="phoca-dl-hr" style="clear:both"> </div>';
/* Beginn des Kommentars
if (!empty($this->mostvieweddocs)) {
echo '<div class="phoca-dl-hr" style="clear:both"> </div>';
echo '<div id="phoca-dl-most-viewed-box">';
echo '<div class="documents"><h3>'. JText::_('Most downloaded files').'</h3>';
foreach ($this->mostvieweddocs as $value) {
// FILESIZE
if ($value->filename !='') {
$absFile = str_replace('/', DS, JPath::clean($this->absfilepath . $value->filename));
if (JFile::exists($absFile))
{
$fileSize = PhocaDownloadHelper::getFileSizeReadable(filesize($absFile));
} else {
$fileSize = '';
}
}
// IMAGE FILENAME
$imageFileName = '';
if ($value->image_filename !='') {
$thumbnail = false;
$thumbnail = preg_match("/phocathumbnail/i", $value->image_filename);
if ($thumbnail) {
$imageFileName = '';
} else {
$imageFileName = 'style="background: url(\''.$this->cssimagepath.$value->image_filename.'\') 0 center no-repeat;"';
}
}
echo '<p class="document" '.$imageFileName.'>';
echo '<a href="'. JRoute::_('index.php?option=com_phocadownload&view=category&id='.$value->categoryid.':'.$value->categoryalias.'&Itemid='. JRequest::getVar('Itemid', 1, 'get', 'int')).'">'. $value->title.'</a> <small>(' .$value->sectiontitle. '/'.$value->categorytitle.')</small>';
echo PhocaDownloadHelper::displayNewIcon($value->date, $this->tmpl['displaynew']);
echo PhocaDownloadHelper::displayHotIcon($value->hits, $this->tmpl['displayhot']);
echo '</p>' . "\n";
}
echo '</div></div>';
}
hier endet der Kommentar*/
?>
<?php echo PHOCA_DOWNLOAD_FOOTER; ?>
Grüße
Wolfgang
Ehm...english please!
Re: remove Most downloaded files
Posted: 05 Jan 2009, 14:53
by wolwes
that's a problem. I can read english, but I cannot describe this in english. Perhaps is here someone, who can translate it?
Wolfgang
Re: remove Most downloaded files
Posted: 06 Jan 2009, 00:06
by Jan
Hallo, ich hoffe ich integriere es in die nächste Version als Parameter...
Hi, I hope I will integrate it into the next version as Parameter
Jan