remove Most downloaded files

Phoca Download - download manager
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48581
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: remove Most downloaded files

Post 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)
If you find Phoca extensions useful, please support the project
keepitfrozen
Phoca Member
Phoca Member
Posts: 22
Joined: 13 May 2008, 01:25
Location: United States of America

Re: remove Most downloaded files

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48581
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: remove Most downloaded files

Post 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)) { ...
If you find Phoca extensions useful, please support the project
keepitfrozen
Phoca Member
Phoca Member
Posts: 22
Joined: 13 May 2008, 01:25
Location: United States of America

Re: remove Most downloaded files

Post by keepitfrozen »

Thanks Jan. Your the man. :)

Mark
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48581
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: remove Most downloaded files

Post by Jan »

:wink:
If you find Phoca extensions useful, please support the project
nocs90
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 31 Dec 2008, 15:11

Re: remove Most downloaded files

Post 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
wolwes
Phoca Member
Phoca Member
Posts: 10
Joined: 29 Dec 2008, 13:51

Re: remove Most downloaded files

Post 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">&nbsp;</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">&nbsp;</div>';
/* Beginn des Kommentars

if (!empty($this->mostvieweddocs)) {
        echo '<div class="phoca-dl-hr" style="clear:both">&nbsp;</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
nocs90
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 31 Dec 2008, 15:11

Re: remove Most downloaded files

Post 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">&nbsp;</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">&nbsp;</div>';
/* Beginn des Kommentars

if (!empty($this->mostvieweddocs)) {
        echo '<div class="phoca-dl-hr" style="clear:both">&nbsp;</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!
wolwes
Phoca Member
Phoca Member
Posts: 10
Joined: 29 Dec 2008, 13:51

Re: remove Most downloaded files

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48581
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: remove Most downloaded files

Post 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
If you find Phoca extensions useful, please support the project
Post Reply