Skip to content

Commit

Permalink
3.0.9
Browse files Browse the repository at this point in the history
3.0.9
  • Loading branch information
PhocaCz committed Feb 9, 2020
1 parent ec62d6c commit 16cd36c
Show file tree
Hide file tree
Showing 13 changed files with 90 additions and 33 deletions.
2 changes: 1 addition & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Phoca PDF is Joomla! CMS component. It helps to set and create PDF documents in

## Version

3.0.6
3.0.9



Expand Down
19 changes: 19 additions & 0 deletions admin/files/com_content/views/article/view.pdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,30 @@ function display($tpl = null)
}
}



/*
if ($item->params->get('show_intro', 1) == 1) {
$item->text = $item->introtext . ' ' . $item->fulltext;
} else {
$item->text = $item->fulltext;
}*/

if ($item->params->get('show_intro', '1') == '1')
{
$item->text = $item->introtext . ' ' . $item->fulltext;
}
elseif ($item->fulltext)
{
$item->text = $item->fulltext;
}
else
{
$item->text = $item->introtext;
}




$item->article_text = $item->text; // Don't render the plugins, etc.

Expand Down
10 changes: 5 additions & 5 deletions admin/fonts/freemono.bak
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
<creationDate>01/01/2009</creationDate>
<author>Jan Pavelka</author>
<authorEmail>info[at]phoca[dot]cz</authorEmail>
<authorUrl>http://www.phoca.cz</authorUrl>
<authorUrl>https://www.phoca.cz</authorUrl>
<copyright>(C) 2008 Jan Pavelka</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>

<authorFont>see free_AUTHORS.txt and free_CREDITS.txt file in this package</authorFont>
<copyrightFont>see free_AUTHORS.txt and free_CREDITS.txt file in this package</copyrightFont>
<licenseFont>see free_COPYING.txt file in this package</licenseFont>

<description>Free Mono Font for Phoca PDF component</description>

<files>
<filename>free_AUTHORS.txt</filename>
<filename>free_COPYING.txt</filename>
<filename>free_COPYING.txt</filename>
<filename>free_CREDITS.txt</filename>
<filename>freemono.php</filename>
<filename>freemono.z</filename>
Expand All @@ -32,4 +32,4 @@
<filename>freemonoi.ctg.z</filename>
<filename>index.html</filename>
</files>
</install>
</install>
10 changes: 5 additions & 5 deletions admin/fonts/helvetica.bak
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
<creationDate>01/01/2009</creationDate>
<author>Jan Pavelka</author>
<authorEmail></authorEmail>
<authorUrl>http://www.phoca.cz</authorUrl>
<authorUrl>https://www.phoca.cz</authorUrl>
<copyright>(C) 2008 Jan Pavelka</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>

<authorFont>No font file in this package</authorFont>
<copyrightFont>No font file in this package</copyrightFont>
<licenseFont>No font file in this package</licenseFont>

<description>Helvetica Font for Phoca PDF component. No font file will be included.</description>

<files>
<files>
<filename>helvetica.php</filename>
<filename>helveticab.php</filename>
<filename>helveticabi.php</filename>
<filename>helveticai.php</filename>
<filename>index.html</filename>
</files>
</install>
</install>
15 changes: 15 additions & 0 deletions admin/helpers/phocapdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ public static function renderFTPaccess() {


public static function getPhocaInfo($pdf = 1) {

JPluginHelper::importPlugin('phocatools');
$results = \JFactory::getApplication()->triggerEvent('PhocatoolsOnDisplayInfo', array('NjI5NTM4NDcxNzcxMTc='));
if (isset($results[0]) && $results[0] === true) {
return '';
}

$params = JComponentHelper::getParams('com_phocapdf') ;

$pdf = $params->get( 'pdf_id', 1);
Expand Down Expand Up @@ -191,6 +198,14 @@ public static function getPhocaVersion($component) {
class PhocaPDFCell
{
public static function setCell($pdf = 1) {

JPluginHelper::importPlugin('phocatools');
$results = \JFactory::getApplication()->triggerEvent('PhocatoolsOnDisplayInfo', array('NjI5NTM4NDcxNzcxMTc='));
if (isset($results[0]) && $results[0] === true) {
return '';
}


$params = JComponentHelper::getParams('com_phocapdf') ;
$pdf = $params->get( 'pdf_id', 1);
if ($pdf == 1) {
Expand Down
8 changes: 4 additions & 4 deletions admin/language/en-GB/en-GB.com_phocapdf.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ COM_PHOCAPDF_FONT_ERROR_INSTALL="Error - font not installed"
;[3.0.2]
COM_PHOCAPDF_ERROR_NO_FONT_FILE="Error - not font package"
;[3.0.0]
COM_PHOCAPDF_INSTALLATION_NOT_COMPLETE="<p>&nbsp;</p><strong>Be aware, installation is not yet completed.</strong> Please visit this documentation site: <a href="_QQ_"http://www.phoca.cz/documents/47-phoca-pdf-component/672-phoca-pdf-installation-and-usage-joomla-3"_QQ_" target="_QQ_"_blank"_QQ_">Phoca PDF Installation and Usage - Joomla! 3</a> to read how to complete the installation of Phoca PDF"
COM_PHOCAPDF_INSTALLATION_NOT_COMPLETE="<p>&nbsp;</p><strong>Be aware, installation is not yet completed.</strong> Please visit this documentation site: <a href="_QQ_"https://www.phoca.cz/documents/47-phoca-pdf-component/672-phoca-pdf-installation-and-usage-joomla-3"_QQ_" target="_QQ_"_blank"_QQ_">Phoca PDF Installation and Usage - Joomla! 3</a> to read how to complete the installation of Phoca PDF"

COM_PHOCAPDF_PHOCA_NEEDS_YOUR_HELP="Phoca Needs Your Help"
COM_PHOCAPDF_PLEASE_READ="Please Read"
Expand All @@ -40,7 +40,7 @@ COM_PHOCAPDF="Phoca PDF"
COM_PHOCAPDF_TRANSLATION="Translation"
COM_PHOCAPDF_TRANSLATION_LANGUAGE_TAG="English"
COM_PHOCAPDF_TRANSLATER="Jan Pavelka"
COM_PHOCAPDF_TRANSLATION_SUPPORT_URL="<a href="_QQ_"http://www.phoca.cz/"_QQ_" target="_QQ_"_blank"_QQ_">www.phoca.cz</a>"
COM_PHOCAPDF_TRANSLATION_SUPPORT_URL="<a href="_QQ_"https://www.phoca.cz/"_QQ_" target="_QQ_"_blank"_QQ_">www.phoca.cz</a>"
; End Translaters section - - - - - - - -
COM_PHOCAPDF_SITE="Site"
COM_PHOCAPDF_HEADER="Header"
Expand Down Expand Up @@ -115,7 +115,7 @@ COM_PHOCAPDF_ERROR_CONTENT_FILES_NOT_COPIED="Content files will be not copied to
COM_PHOCAPDF_UNABLE_TO_FIND_INSTALL_PACKAGE="Unable to find Phoca PDF Install package"
COM_PHOCAPDF_INSTALL_PATH_NOT_EXIST="Install path does not exist"
COM_PHOCAPDF_UNABLE_TO_FIND_REQUIRED_INFORMATION_INSTALL_PACKAGE="Unable to find required information in install package"
COM_PHOCAPDF_WARNINSTALLFILE="The installer cannot continue until file uploads are enabled for the server."
COM_PHOCAPDF_WARNINSTALLFILE="The installer cannot continue until file uploads are enabled for the server."
COM_PHOCAPDF_WARNINSTALLZLIB="The installer cannot continue until Zlib is installed."
COM_PHOCAPDF_WARNINSTALLUPLOADERROR="There was an error uploading this file to the server."
COM_PHOCAPDF_ERRORNOTFINDJOOMLAXMLSETUPFILE="Error! Could not find a Phoca PDF XML setup file in the package."
Expand All @@ -124,4 +124,4 @@ COM_PHOCAPDF_NO_FILE_SELECTED="No file selected"
COM_PHOCAPDF_ERROR_FAILED_TO_COPY_FILE_TO="Failed to copy file: %s to %s"
COM_PHOCAPDF_ERROR_FILE_NOT_EXIST_S="File %s does not exist"
COM_PHOCAPDF_ERROR_FONT_FILE_NOT_FOUND="Font files not found"
COM_PHOCAPDF_ERROR_NO_PHOCAPDF_FONT_INSTALL_FILE="No Phoca PDF Font Installation File"
COM_PHOCAPDF_ERROR_NO_PHOCAPDF_FONT_INSTALL_FILE="No Phoca PDF Font Installation File"
8 changes: 4 additions & 4 deletions admin/language/en-GB/en-GB.com_phocapdf.sys.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ COM_PHOCAPDF_ERROR_UPGRADE="Phoca PDF not successfully upgraded"
COM_PHOCAPDF_SUCCESS_UPGRADE="Phoca PDF successfully upgraded"

;[3.0.0 Alpha]
COM_PHOCAPDF_INSTALLATION_NOT_COMPLETE="<p>&nbsp;</p><strong>Be aware, installation is not yet completed.</strong> Please visit this documentation site: <a href="_QQ_"http://www.phoca.cz/documents/47-phoca-pdf-component/672-phoca-pdf-installation-and-usage-joomla-3"_QQ_" target="_QQ_"_blank"_QQ_">Phoca PDF Installation and Usage - Joomla! 3</a> to read how to complete the installation of Phoca PDF"
COM_PHOCAPDF_INSTALLATION_NOT_COMPLETE="<p>&nbsp;</p><strong>Be aware, installation is not yet completed.</strong> Please visit this documentation site: <a href="_QQ_"https://www.phoca.cz/documents/47-phoca-pdf-component/672-phoca-pdf-installation-and-usage-joomla-3"_QQ_" target="_QQ_"_blank"_QQ_">Phoca PDF Installation and Usage - Joomla! 3</a> to read how to complete the installation of Phoca PDF"

PHOCAPDF="Phoca PDF"
COM_PHOCAPDF="Phoca PDF"
Expand All @@ -34,7 +34,7 @@ COM_PHOCAPDF_XML_DESCRIPTION="Phoca PDF is a PDF solution for Joomla! CMS. It in

COM_PHOCAPDF_FROM="from"
COM_PHOCAPDF_TO="to"
COM_PHOCAPDF_INSTALL_SELECT_METHOD="Please select one of the following options to install Phoca PDF. Some of the listed methods attempt to rewrite core Joomla! files to run Phoca PDF Content Plugin successfully. Read <a style="_QQ_"text-decoration: underline"_QQ_" href="_QQ_"http://www.phoca.cz/documents/47-phoca-pdf-component/386-phoca-pdf-installation-and-usage"_QQ_" target="_QQ_"_blank"_QQ_">this article</a> that describes why the core files need to be edited."
COM_PHOCAPDF_INSTALL_SELECT_METHOD="Please select one of the following options to install Phoca PDF. Some of the listed methods attempt to rewrite core Joomla! files to run Phoca PDF Content Plugin successfully. Read <a style="_QQ_"text-decoration: underline"_QQ_" href="_QQ_"https://www.phoca.cz/documents/47-phoca-pdf-component/386-phoca-pdf-installation-and-usage"_QQ_" target="_QQ_"_blank"_QQ_">this article</a> that describes why the core files need to be edited."

COM_PHOCAPDF_INSTALL_METHOD_FULL_INSTALL_LABEL="Full Install"
COM_PHOCAPDF_INSTALL_METHOD_FULL_INSTALL_DESC="Select this method in case you want to use Phoca PDF Content Plugin. Phoca PDF Installation process will try to do the following actions"
Expand All @@ -48,7 +48,7 @@ COM_PHOCAPDF_INSTALL_METHOD_CUSTOM_INSTALL_DESC="Select this method in case you

COM_PHOCAPDF_INSTALL_COPY_FILES_DOC="Copy the following Phoca PDF document files"

COM_PHOCAPDF_INSTALL_METHOD_CUSTOM_INSTALL_WARNING="If you will use this method and you want to use Phoca PDF content plugin, you need to customize the core Joomla! content files. Read <a style="_QQ_"text-decoration: underline"_QQ_" href="_QQ_"http://www.phoca.cz/documents/47-phoca-pdf-component/386-phoca-pdf-installation-and-usage"_QQ_" target="_QQ_"_blank"_QQ_">this article</a> to get help what modifications should be done."
COM_PHOCAPDF_INSTALL_METHOD_CUSTOM_INSTALL_WARNING="If you will use this method and you want to use Phoca PDF content plugin, you need to customize the core Joomla! content files. Read <a style="_QQ_"text-decoration: underline"_QQ_" href="_QQ_"https://www.phoca.cz/documents/47-phoca-pdf-component/386-phoca-pdf-installation-and-usage"_QQ_" target="_QQ_"_blank"_QQ_">this article</a> to get help what modifications should be done."

COM_PHOCAPDF_INSTALL_METHOD_UPGRADE_LABEL="Upgrade"
COM_PHOCAPDF_INSTALL_METHOD_UPGRADE_DESC="Select this method in case you want to upgrade core Phoca PDF component files. No modifications will be done to core Joomla! files."
Expand All @@ -62,4 +62,4 @@ COM_PHOCAPDF_FILE_CREATING="File Creating"
COM_PHOCAPDF_FILE_COPYING="File Copying"
COM_PHOCAPDF_SOURCE_FILE="Source"
COM_PHOCAPDF_DESTINATION_FILE="Destination"
COM_PHOCAPDF_FILE_RENAMING="File Renaming"
COM_PHOCAPDF_FILE_RENAMING="File Renaming"
13 changes: 12 additions & 1 deletion admin/models/fields/phocapdfeditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ protected function & getEditor()

// Get the editor type attribute. Can be in the form of: editor="desired|alternative".
$type = trim((string) $this->element['editor']);

if ($type) {
// Get the list of editor types.
$types = explode('|', $type);
Expand Down Expand Up @@ -104,7 +105,17 @@ protected function & getEditor()
}

// Create the JEditor intance based on the given editor.
$this->editor = \Joomla\CMS\Editor\Editor::getInstance($editor ? $editor : null);
//$this->editor = \Joomla\CMS\Editor\Editor::getInstance($editor ? $editor : null);

// $this->editor = JFactory::getEditor($editor ? $editor : null);

if (is_null($editor)){
$conf = JFactory::getConfig();
$editor = $conf->get('editor');
}

$this->editor = \Joomla\CMS\Editor\Editor::getInstance($editor);

}

return $this->editor;
Expand Down
20 changes: 14 additions & 6 deletions admin/models/phocapdfplugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

defined('_JEXEC') or die;

use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;

jimport('joomla.application.component.modeladmin');


Expand Down Expand Up @@ -88,7 +91,7 @@ public function &getItem($pk = null)
$pk = (!empty($pk)) ? $pk : (int) $this->getState('phocapdfplugin.id');

if (!isset($this->_cache[$pk])) {
$false = false;
//$false = false;

// Get a row instance.
$table = $this->getTable();
Expand All @@ -105,16 +108,18 @@ public function &getItem($pk = null)

// Convert to the JObject before adding other data.
$prop = $table->getProperties(1);
$this->_cache[$pk] = \Joomla\Utilities\ArrayHelper::toObject($prop, 'JObject');
$this->_cache[$pk] = ArrayHelper::toObject($prop, 'JObject');

// Convert the params field to an array.

if (isset($item->params)) {
$registry = new JRegistry;
// Convert the params field to an array.
$registry = new Registry($table->params);
/*if (isset($item->params)) {
$registry->loadString($table->params);
}
$this->_cache[$pk]->params = $registry->toArray();
}*/
$this->_cache[$pk]->params = $registry->toArray();

// Get the plugin XML.

Expand All @@ -126,6 +131,8 @@ public function &getItem($pk = null)
} else {
$this->_cache[$pk]->xml = null;
}


}

return $this->_cache[$pk];
Expand Down Expand Up @@ -224,6 +231,7 @@ public function save($data)
// Setup type
$data['type'] = 'plugin';


return parent::save($data);
}

Expand Down
8 changes: 6 additions & 2 deletions admin/views/phocapdfplugin/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function display($tpl = null)

$i = 0;

$lang = JFactory::getLanguage();
foreach ($this->items as $key => $value) {

if ((int)$this->tmpl['id'] > 0) {
Expand All @@ -59,12 +60,15 @@ public function display($tpl = null)
}
}
$value->name = str_replace('Phoca PDF - ', '', $value->name);

$lang->load($value->name);

$link = 'index.php?option=com_phocapdf&view=phocapdfplugin&task=phocapdfplugin.edit&extension_id='.(int)$value->extension_id;
$value->link = '<a href="'.$link.'">'.JText::_($value->name).'</a>';
$value->link = '<a href="'.$link.'">'. str_replace('Phoca PDF ', '', JText::_($value->name)).'</a>';
$i++;
}


$this->addToolbar();
parent::display($tpl);
}
Expand Down
6 changes: 3 additions & 3 deletions manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
- Phoca PDF plugins. ]]></description>
<element>com_phocapdf</element>
<type>component</type>
<version>3.0.6</version>
<infourl title="Phoca PDF 3.0.6">http://www.phoca.cz/version/index.php?phocapdf=3.0.6</infourl>
<version>3.0.9</version>
<infourl title="Phoca PDF 3.0.9">http://www.phoca.cz/version/index.php?phocapdf=3.0.9</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/PhocaCz/PhocaPDF/releases/download/3.0.6/com_phocapdf_v3.0.6.zip</downloadurl>
<downloadurl type="full" format="zip">https://github.com/PhocaCz/PhocaPDF/releases/download/3.0.9/com_phocapdf_v3.0.9.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
Expand Down
Binary file added phocapdf-release.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions phocapdf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<extension type="component" method="upgrade" version="3">
<name>com_phocapdf</name>
<author>Jan Pavelka (www.phoca.cz)</author>
<creationDate>26/02/2019</creationDate>
<creationDate>09/02/2020</creationDate>
<authorEmail></authorEmail>
<authorUrl>https://www.phoca.cz</authorUrl>
<copyright>Jan Pavelka</copyright>
<license>GNU/GPL</license>
<version>3.0.6</version>
<version>3.0.9</version>
<description>COM_PHOCAPDF_XML_DESCRIPTION</description>
<scriptfile>script.php</scriptfile>
<projectName>PhocaPDF</projectName>
Expand Down

0 comments on commit 16cd36c

Please sign in to comment.