• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: SOLVED Show File Description On Listing Page

SOLVED Show File Description On Listing Page 10 years 7 months ago #24558

  • contact2926
  • contact2926's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 1
I was able to successfully modify the default.php file to have direct download when you click in the link in the list. I would like to show the file description under the title of the file. This would give a very nice compact layout thus not needing a detail page at all.

Thank you
Last Edit: 10 years 6 months ago by contact2926.
The administrator has disabled public write access.

Show File Description On Listing Page 10 years 7 months ago #24561

  • silviup
  • silviup's Avatar
  • OFFLINE
  • Moderator
  • Posts: 309
  • Thank you received: 49
There's no default feature that would enable you to display the descriptions in the file listing. This can be achieved using template overrides though, the process is explained here:

www.rsjoomla.com/support/documentation/v...plate-overrides.html

The files listing's layout is controlled in the following file:

/components/com_rsfiles/views/rsfiles/tmpl/default.php
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Show File Description On Listing Page 10 years 7 months ago #24573

  • contact2926
  • contact2926's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 1
I have done some overriding (remove unwanted columns) but I don't know the PHP code to pull in the description. I tried
<?php echo $this->file->filedescription; ?>
But it shows nothing :(
Last Edit: 10 years 7 months ago by contact2926. Reason: update
The administrator has disabled public write access.

Show File Description On Listing Page 10 years 7 months ago #24583

It's not safe to assume that a simple modification like changing "$file->fileversion" to "file->filedescription" will actually display the file's description instead of the file's version.

If you would like to receive a list of all the available file information, please add the following PHP statement at the end of your template override file:

<?php
print_r($this->file);
die();
?>

Accessing the page again will produce a list of all the information that is available to you to use with $this->file ("fileversion" and "type" will also be present in the list).

Please remember to remove copy the output from the above PHP statement, and afterwards to remove it from the override file.
Please remember that my responses aren't considered customer support, to receive customer support please submit a new customer support ticket, and we will gladly assist you.

Best Regards,
Cristian Nicolae.
The administrator has disabled public write access.

Show File Description On Listing Page 10 years 7 months ago #24666

  • contact2926
  • contact2926's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 1
I added that code at the end in the default.php file and uploaded it to
/templates/main/html/com_rsfiles/rsfiles
But it strips my template away and shows the same list without descriptions?

Please help. I simply need the file description shown under each file title on the listing page.
Thank you
The administrator has disabled public write access.

Show File Description On Listing Page 10 years 6 months ago #24675

  • contact2926
  • contact2926's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 1
The great people of RSJoomla helped me! I wanted to share the answer for others who need this as well.

You are correct, this can be achieved through template overrides. The file you need to perform the override for can be found under the following path:

\components\com_rsfiles\views\rsfiles\tmpl\default.php

Please look for the following code:
<a href="<?php echo JRoute::_('index.php?option=com_rsfiles&layout=download&path='.$item->fullpath.$this->itemid); ?>" class="<?php echo $thumbnail->class; ?>" title="<?php echo $thumbnail->image; ?>">
<?php } ?>
<i class="icon-file"></i> <?php echo (!empty($item->filename) ? $item->filename : $item->name); ?>
</a> 
 
<?php echo $item->isnew.' '.$item->popular; ?>
<?php } else { ?>
<a href="<?php echo JRoute::_('index.php?option=com_rsfiles&folder='.$item->fullpath.$this->itemid); ?>" class="<?php echo $thumbnail->class; ?>" title="<?php echo $thumbnail->image; ?>">
<i class="icon-folder"></i> <?php echo (!empty($item->filename) ? $item->filename : $item->name); ?>
</a>

around lines 57-66

and replace it with this one:
<a href="<?php echo JRoute::_('index.php?option=com_rsfiles&layout=download&path='.$item->fullpath.$this->itemid); ?>" class="<?php echo $thumbnail->class; ?>" title="<?php echo $thumbnail->image; ?>">
<?php } ?>
<i class="icon-file"></i> <?php echo (!empty($item->filename) ? $item->filename : $item->name); ?>
</a> 
<p><?php echo($item->filedescription);?></p>
<?php echo $item->isnew.' '.$item->popular; ?>
<?php } else { ?>
<a href="<?php echo JRoute::_('index.php?option=com_rsfiles&folder='.$item->fullpath.$this->itemid); ?>" class="<?php echo $thumbnail->class; ?>" title="<?php echo $thumbnail->image; ?>">
<i class="icon-folder"></i> <?php echo (!empty($item->filename) ? $item->filename : $item->name); ?>
</a>

The variable used to get the file description is the following:


$item->filedescription
The administrator has disabled public write access.
The following user(s) said Thank You: tomoe
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!