Categories list "Description"
Posted: 10 Mar 2013, 18:31
Where is the value set for the "description" field that shows at the top in the users Categories??? The code I am talking about is in components/com_phocadownloads/views/categories/tmpl/default.php
The value is stored as $this->tmpl['description']
When I do a php var_dump, the value for $this->tmpl['description'] is "<div> </div>";
WHERE did THAT come from and where can I change it ???
To further explain... I am using Phoca Downloads at 2 websites.
On one website, I want to add a short description at the top of this categories list that is shown to users. I have been searching for hours (literally) trying to find where that value is set. (Without always having to tweak the code)
On the other website, I want to remove the blank line that shows there (because the value is set to "<div> </div>")
It took me another few hours to figure out how to do that - BECAUSE YOUR trim() FUNCTION DOES NOT WORK. From looking at your code it looks like you think you are checking for a blank description, when in fact it is not blank - because the value assigned to $this->tmpl['description'] always contains the div tags and the non-breaking space entity.
Here is a FIX for that...
Please correct this in the next version so I don't have to keep tweaking the code.
Now if someone could just tell me where I CAN edit this 'description' parameter, if I do want to add a description there????
Thank You.
The value is stored as $this->tmpl['description']
When I do a php var_dump, the value for $this->tmpl['description'] is "<div> </div>";
WHERE did THAT come from and where can I change it ???
To further explain... I am using Phoca Downloads at 2 websites.
On one website, I want to add a short description at the top of this categories list that is shown to users. I have been searching for hours (literally) trying to find where that value is set. (Without always having to tweak the code)
On the other website, I want to remove the blank line that shows there (because the value is set to "<div> </div>")
It took me another few hours to figure out how to do that - BECAUSE YOUR trim() FUNCTION DOES NOT WORK. From looking at your code it looks like you think you are checking for a blank description, when in fact it is not blank - because the value assigned to $this->tmpl['description'] always contains the div tags and the non-breaking space entity.
Here is a FIX for that...
Code: Select all
//if ( $this->tmpl['description'] != '') {
$desc = trim(strip_tags($this->tmpl['description']),chr(0xC2).chr(0xA0));
if (!empty($desc)) {
Now if someone could just tell me where I CAN edit this 'description' parameter, if I do want to add a description there????
Thank You.