59
Do the following:
in modules\publisher\language\english\modinfo.php add:
define("_MI_PUBLISHER_DISPLAY_PDF","Display PDF Icon");
define("_MI_PUBLISHER_DISPLAY_PDF_DSC","Select Yes to show PDF icon and allow users to create PDF files");
in modules\publisher\xoops_version.php add around line 1011, after the the 'display_breadcrumb' part following:
++$i;
$modversion['config'][$i]['name'] = 'display_pdf';
$modversion['config'][$i]['title'] = '_MI_PUBLISHER_DISPLAY_PDF';
$modversion['config'][$i]['description'] = '_MI_PUBLISHER_DISPLAY_PDF_DSC';
$modversion['config'][$i]['formtype'] = 'yesno';
$modversion['config'][$i]['valuetype'] = 'int';
$modversion['config'][$i]['default'] = 1;
In \modules\publisher\class\item.php around line 450 find and add the first line above the //PDF button, and and the closing bracket, so it looks like this:
if ($this->publisher->getConfig('display_pdf')) {
// PDF button
$adminLinks .= "<a href='" . PUBLISHER_URL . "/makepdf.php?itemid=" . $this->itemid() . "' rel='nofollow' target='_blank'><img src='" . PUBLISHER_URL . "/assets/images/links/pdf.gif' title='" . _CO_PUBLISHER_PDF . "' alt='" . _CO_PUBLISHER_PDF . "' /></a>";
$adminLinks .= " ";
}
You'll need to do the same in the \modules\publisher\blocks\latest_news.php file around line 198:
$item['pdf'] = '';
if ($this->publisher->getConfig('display_pdf')) {
if ($options[25] == 1) {
$item['pdf'] = "<a href='" . PUBLISHER_URL . "/makepdf.php?itemid=" . $itemObj->itemid() . "' rel='nofollow'><img src='" . PUBLISHER_URL . "/assets/images/links/pdf.gif' title='"
. _CO_PUBLISHER_PDF . "' alt='" . _CO_PUBLISHER_PDF . "' /></a> ";
}
}
Let us know if it works, and we'll add it to SVN.
Bleekk, feel free to modify/change it as needed.