Is it possible to have access from the front-end page to the file properties?
I mean those from General Options, like Title, Author and Version, as well as Downloads from Publishing Options.
Too lazy to modify the page each time file's version changes...
Access to file properties
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Access to file properties
Hi, for now there is no such option so this needs to be customized for the frontend (add specific form inputs, etc.) 
Jan

Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 3
- Joined: 23 Feb 2017, 10:07
Re: Access to file properties
Come on, Jan. Even something as quick and dirty as that will do:
But I thought something more 'elegant' was possible, not relying on table and column names etc.
By the way: have I mentioned already that your product is really great?
Best regards,
Yuri
Code: Select all
<?php
$db = JFactory::getDBO();
...
$query = 'SELECT description, version, hits FROM #__phocadownload WHERE id=2';
$db->setQuery($query);
$std = $db->loadObject();
?>
...
<div style="margin-bottom: 1em; overflow: auto; color: #5573BC;">
<div style="width: 25%; float: left;"><?php echo $std->description; ?></div>
<div style="width: 18%; float: left;"><?php echo $std->version; ?></div>
<div style="width: 15%; float: left;"><?php echo $std->hits; ?></div>
<div style="width: 18%; float: left;">
<?php if($giveStd) { ?>
<a href="/index.php?option=com_phocadownload&view=category&download=2"><span style="color: #80B284;"><strong>Download</strong></span></a>
<?php } else { ?>
<span style="color: red;"><strong>Please <a href="/buy-now">buy</a> a license</strong></span>
<?php } ?>
</div>
</div>
By the way: have I mentioned already that your product is really great?
Best regards,
Yuri
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Access to file properties
Hi, sorry for misunderstanding, I thought, you mean a form in fronten upload view to add such data to system when uploading file in frontend.
It depends on which view you want to display the information. If e.g. in file view, then you don't need to load specific SQL query as the data (description, version, hits) are there:
https://www.phoca.cz/documents/17-phoca- ... load-theme
Jan
It depends on which view you want to display the information. If e.g. in file view, then you don't need to load specific SQL query as the data (description, version, hits) are there:
https://www.phoca.cz/documents/17-phoca- ... load-theme
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 3
- Joined: 23 Feb 2017, 10:07
Re: Access to file properties
Thanks! That's exactly what I was looking for.
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact: