If I am using the Download Module and I list a series of files and allow the descriptions to be shown, would it be possible to have a clickable hyperlink in the description displayed?
Currently, when I place a description with a hyperlink, it does not actually show as clickable.
Is it possible to have a hyperlink in the file description?
- buxster07
- Phoca Member
- Posts: 24
- Joined: 21 May 2018, 16:44
- Benno
- Phoca Hero
- Posts: 9451
- Joined: 04 Dec 2008, 11:58
- Location: Germany
- Contact:
Re: Is it possible to have a hyperlink in the file description?
Hi,
from which Phoca Download Module are you talking?
Kind regards,
Benno
from which Phoca Download Module are you talking?
Kind regards,
Benno
- buxster07
- Phoca Member
- Posts: 24
- Joined: 21 May 2018, 16:44
Re: Is it possible to have a hyperlink in the file description?
Hi Benno,
In this case, I am using the Phoca Download Module. I have a module loaded onto a web page and the module pulls in a file list from a category. This works wonderfully as it has a list of files and their respective descriptions.
Now when I go to Components > Phoca Download > Files, and then I go to a certain file, and edit the description, I attempted to put a hyperlink in the description. But when I go to the web page where the file module resides, the hyperlink is not clickable. Is there a way for the Phoca Download Module to have a hyperlink within a file's description line?
In this case, I am using the Phoca Download Module. I have a module loaded onto a web page and the module pulls in a file list from a category. This works wonderfully as it has a list of files and their respective descriptions.
Now when I go to Components > Phoca Download > Files, and then I go to a certain file, and edit the description, I attempted to put a hyperlink in the description. But when I go to the web page where the file module resides, the hyperlink is not clickable. Is there a way for the Phoca Download Module to have a hyperlink within a file's description line?
- Benno
- Phoca Hero
- Posts: 9451
- Joined: 04 Dec 2008, 11:58
- Location: Germany
- Contact:
Re: Is it possible to have a hyperlink in the file description?
Hi,
Confirmed! Hyperlinks & BBCode not working. I will ask Jan.
Confirmed! Hyperlinks & BBCode not working. I will ask Jan.
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Is it possible to have a hyperlink in the file description?
Hi, which module version do you use?
The description does not include HTML, it is text only. E.g. because when you want to short it and the count of characters is applied:
So the solution can be to remove the strip_tags function:
mod_phocadownload_file.php line cca 280
From:
To:
The description does not include HTML, it is text only. E.g. because when you want to short it and the count of characters is applied:
So the solution can be to remove the strip_tags function:
mod_phocadownload_file.php line cca 280
From:
Code: Select all
if ( $displayDesc == 1 ) {
$desc = PhocaDownloadUtils::strTrimAll($v->description);
$desc = strip_tags( $desc );
if (StringHelper::strlen($desc) < $descCharacters || StringHelper::strlen($desc) == $descCharacters) {
} else {
$desc = StringHelper::substr($desc, 0, $descCharacters) . '...';
}
$output .= '<div class="pd-mf-desc">'.$desc. '</div>';
}
Code: Select all
if ( $displayDesc == 1 ) {
//$desc = PhocaDownloadUtils::strTrimAll($v->description);
//$desc = strip_tags( $desc );
//if (StringHelper::strlen($desc) < $descCharacters || StringHelper::strlen($desc) == $descCharacters) {
//} else {
// $desc = StringHelper::substr($desc, 0, $descCharacters) . '...';
//}
$output .= '<div class="pd-mf-desc">'.$v->description. '</div>';
}
If you find Phoca extensions useful, please support the project
- buxster07
- Phoca Member
- Posts: 24
- Joined: 21 May 2018, 16:44
Re: Is it possible to have a hyperlink in the file description?
Hello Jan,
I am using this extension version:
Phoca Download File Module 3.1.8
I am using this extension version:
Phoca Download File Module 3.1.8
- Benno
- Phoca Hero
- Posts: 9451
- Joined: 04 Dec 2008, 11:58
- Location: Germany
- Contact:
Re: Is it possible to have a hyperlink in the file description?
Hi,
Jans solution works perfectly with v3.1.8
Kind regards,
Benno
Jans solution works perfectly with v3.1.8
Kind regards,
Benno
- buxster07
- Phoca Member
- Posts: 24
- Joined: 21 May 2018, 16:44
Re: Is it possible to have a hyperlink in the file description?
Thank you much for the quick response! The script works wonderfully!!!!!
- Benno
- Phoca Hero
- Posts: 9451
- Joined: 04 Dec 2008, 11:58
- Location: Germany
- Contact:
Re: Is it possible to have a hyperlink in the file description?
Thanks for feedback --> Solved!
Kind regards,
Benno
Kind regards,
Benno