Hi,
I would like to have short intro text in Details button in category view
and full text in file view.
I think that Joomla Read More feature will be useful for this.
[Feature request] Use Read more in Details button
-
pweb
- Phoca Newbie

- Posts: 5
- Joined: 27 Aug 2010, 19:26
- Location: Poland
- Contact:
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: [Feature request] Use Read more in Details button
Hi, added into feature request list.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
pweb
- Phoca Newbie

- Posts: 5
- Joined: 27 Aug 2010, 19:26
- Location: Poland
- Contact:
Re: [Feature request] Use Read more in Details button
v1.3.7
file: components\com_phocadownload\models\file.php
method: getDocument
file: components\com_phocadownload\models\category.php
method: getDocumentList
file: components\com_phocadownload\models\file.php
method: getDocument
Code: Select all
function getDocument( $fileId, $params, $limitstartUrl) {
...
if (empty($this->_document)) {
...
// remove readmore tag
$pattern = '#<hr\s+id=("|\')system-readmore("|\')\s*\/*>#i';
$this->_document[0]->description = preg_replace($pattern, ' ', $this->_document[0]->description);
}
return $this->_document;
}
method: getDocumentList
Code: Select all
function getDocumentList($categoryId, $params) {
...
if (empty($this->_document)) {
...
// search for introtext
$pattern = '#(.+)\s*<hr\s+id=("|\')system-readmore("|\')\s*\/*>#i';
for ($i = 0; $i < count($this->_document); $i++) {
$tagPos = preg_match($pattern, $this->_document[$i]->description, $matches);
if ($tagPos > 0) {
$this->_document[$i]->description = $matches[1];
}
}
}
return $this->_document;
}
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: [Feature request] Use Read more in Details button
Hi, thank you for this info.
Jan
Jan
If you find Phoca extensions useful, please support the project