Code: Select all
$content->pdf_name = $pluginP->get('pdf_name', 'Phoca PDF');An additional parameter of 'Use Article Title for File Name' could be included in the backed if that sort of default behavior is not to Phoca's liking. FWIW, I was able to implement this behavior with a simple code change (use at your own risk):
File: \libraries\joomla\document\phocapdf\phocapdf.php
Line: 142
Change:
Code: Select all
switch ($option) {
  case 'com_content':
    $results = $dispatcher->trigger('onBeforeDisplayPDFContent', array (&$pdf, &$content, &$this));
    break;Code: Select all
switch ($option) {
  case 'com_content':
    $results = $dispatcher->trigger('onBeforeDisplayPDFContent', array (&$pdf, &$content, &$this));
    if($content->pdf_name == 'Phoca PDF') $content->pdf_name = $this->getName();
    break;Code: Select all
function setName($name = 'Phoca') {
  $this->_name = JString::strtolower(JFile::makeSafe(JString::str_ireplace(' ', '-', $name)));
}While this may not be the absolute best way to go about it (you guys know your code much better than I do) I think implementing something like this would be quite easy and potentially improve the product. Thanks for listening.
PS: Almost forget: Sticking on a '.pdf' file extension to the $content->pdf_name probably wouldn't hurt as well but not sure it's absolutely necessary.

