From: <txm...@us...> - 2012-03-15 19:35:04
|
Revision: 9143 http://xoops.svn.sourceforge.net/xoops/?rev=9143&view=rev Author: txmodxoops Date: 2012-03-15 19:34:57 +0000 (Thu, 15 Mar 2012) Log Message: ----------- Updated Used TCPDF Libraries Delete FPDF Libraries Modified Paths: -------------- XoopsModules/xpdf/releases/1.0/xpdf/admin/documents.php XoopsModules/xpdf/releases/1.0/xpdf/class/xpdf_doc.php XoopsModules/xpdf/releases/1.0/xpdf/docs/changelog.txt XoopsModules/xpdf/releases/1.0/xpdf/header.php XoopsModules/xpdf/releases/1.0/xpdf/include/functions.php XoopsModules/xpdf/releases/1.0/xpdf/include/install.php XoopsModules/xpdf/releases/1.0/xpdf/index.php XoopsModules/xpdf/releases/1.0/xpdf/makepdf.php XoopsModules/xpdf/releases/1.0/xpdf/sql/mysql.sql XoopsModules/xpdf/releases/1.0/xpdf/templates/xpdf_index.html XoopsModules/xpdf/releases/1.0/xpdf/xoops_version.php Modified: XoopsModules/xpdf/releases/1.0/xpdf/admin/documents.php =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/admin/documents.php 2012-03-15 18:29:14 UTC (rev 9142) +++ XoopsModules/xpdf/releases/1.0/xpdf/admin/documents.php 2012-03-15 19:34:57 UTC (rev 9143) @@ -150,10 +150,14 @@ //Form doc_cid $obj->setVar("doc_cid", $_REQUEST["doc_cid"]); + //Form doc_filename + $obj->setVar("doc_filename", strtolower($_REQUEST["doc_filename"])); //Form doc_title $obj->setVar("doc_title", $_REQUEST["doc_title"]); //Form doc_description $obj->setVar("doc_description", $_REQUEST["doc_description"]); + //Form doc_image + $obj->setVar("doc_image", $_REQUEST["doc_image"]); //Form doc_subject $obj->setVar("doc_subject", $_REQUEST["doc_subject"]); //Form doc_description @@ -237,7 +241,7 @@ // --------------------------------------------------------- // Close and output PDF document // This method has several options, check the source code documentation for more information. - $pdf_file = XOOPS_UPLOAD_PATH."/xpdf/doc/".str_replace(" ", "_", strtolower($obj->getVar("doc_title"))).".pdf"; + $pdf_file = XOOPS_UPLOAD_PATH."/xpdf/doc/".strtolower($obj->getVar("doc_filename")).".pdf"; $pdf->Output($pdf_file, 'F'); break; Modified: XoopsModules/xpdf/releases/1.0/xpdf/class/xpdf_doc.php =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/class/xpdf_doc.php 2012-03-15 18:29:14 UTC (rev 9142) +++ XoopsModules/xpdf/releases/1.0/xpdf/class/xpdf_doc.php 2012-03-15 19:34:57 UTC (rev 9143) @@ -53,8 +53,10 @@ $this->XoopsObject(); $this->initVar("doc_id", XOBJ_DTYPE_INT, null, false, 5); $this->initVar("doc_cid", XOBJ_DTYPE_INT, null, false, 5); + $this->initVar("doc_filename", XOBJ_DTYPE_TXTBOX, null, false, 50); $this->initVar("doc_title", XOBJ_DTYPE_TXTBOX, null, false, 255); $this->initVar("doc_description", XOBJ_DTYPE_TXTAREA, null, false); + $this->initVar("doc_image", XOBJ_DTYPE_TXTBOX, null, false, 30); $this->initVar("doc_subject", XOBJ_DTYPE_TXTBOX, null, false, 100); $this->initVar("doc_keywords", XOBJ_DTYPE_TXTBOX, null, false, 255); $this->initVar("doc_submitter", XOBJ_DTYPE_INT, null, false, 10); @@ -86,6 +88,8 @@ $form = new XoopsThemeForm($title, "form", $action, "post", true); $form->setExtra('enctype="multipart/form-data"'); // + $form->addElement(new XoopsFormText(_FILENAME, "doc_filrname", 50, 255, $this->getVar("doc_filrname")), true); + // $form->addElement(new XoopsFormText(_TITLE, "doc_title", 50, 255, $this->getVar("doc_title")), true); // include_once(XOOPS_ROOT_PATH."/class/tree.php"); @@ -108,6 +112,8 @@ $editor_configs["height"] = "400px"; $editor_configs["editor"] = $GLOBALS['xoopsModuleConfig']['xpdf_editor']; $form->addElement( new XoopsFormEditor(_DESCRIPTION, "doc_description", $editor_configs), true); + // + $form->addElement(new XoopsFormText(_IMAGE, "doc_image", 50, 255, $this->getVar("doc_image")), true); // submitter $form->addElement(new XoopsFormSelectUser(_SUBMITTER, "doc_submitter", false, $this->getVar("doc_submitter"), 1, false), true); // keywords Modified: XoopsModules/xpdf/releases/1.0/xpdf/docs/changelog.txt =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/docs/changelog.txt 2012-03-15 18:29:14 UTC (rev 9142) +++ XoopsModules/xpdf/releases/1.0/xpdf/docs/changelog.txt 2012-03-15 19:34:57 UTC (rev 9143) @@ -1,5 +1,10 @@ +==================================== + 2012/03/15 19:54:55 Version 1.01 alpha 2 +==================================== +- Added makefile.php from tcpdf library (Timgno) +- More code in file index.php and template (Timgno) ==================================== - 2012/02/05 1:04:25 Version 1.01 alpha + 2012/02/05 1:04:25 Version 1.01 alpha 1 ==================================== - Original release xpdf (TXMod Xoops) Modified: XoopsModules/xpdf/releases/1.0/xpdf/header.php =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/header.php 2012-03-15 18:29:14 UTC (rev 9142) +++ XoopsModules/xpdf/releases/1.0/xpdf/header.php 2012-03-15 19:34:57 UTC (rev 9143) @@ -55,17 +55,11 @@ $groups = XOOPS_GROUP_ANONYMOUS; } xoops_loadLanguage("admin", $xoopsModule->getVar("dirname", "e")); -/* -$perm_approve = ($gperm_handler->checkRight('xpdf_ac', 4, $groups, $xoopsModule->getVar('mid'))) ? true : false ; -$perm_submit = ($gperm_handler->checkRight('xpdf_ac', 8, $groups, $xoopsModule->getVar('mid'))) ? true : false ; -$perm_view = ($gperm_handler->checkRight('xpdf_ac', 16, $groups, $xoopsModule->getVar('mid'))) ? true : false ; -$perm_down = ($gperm_handler->checkRight('xpdf_ac', 32, $groups, $xoopsModule->getVar('mid'))) ? true : false ; -$perm_autoapprove = ($gperm_handler->checkRight('xpdf_ac', 64, $groups, $xoopsModule->getVar('mid'))) ? true : false ;*/ $perm_submit = ($gperm_handler->checkRight('xpdf_ac', 4, $groups, $xoopsModule->getVar('mid'))) ? true : false ; $perm_modif = ($gperm_handler->checkRight('xpdf_ac', 8, $groups, $xoopsModule->getVar('mid'))) ? true : false ; $perm_vote = ($gperm_handler->checkRight('xpdf_ac', 16, $groups, $xoopsModule->getVar('mid'))) ? true : false ; -$perm_upload = ($gperm_handler->checkRight('xpdf_ac', 32, $groups, $xoopsModule->getVar('mid'))) ? true : false ; +$perm_down = ($gperm_handler->checkRight('xpdf_ac', 32, $groups, $xoopsModule->getVar('mid'))) ? true : false ; $perm_autoapprove = ($gperm_handler->checkRight('xpdf_ac', 64, $groups, $xoopsModule->getVar('mid'))) ? true : false ; // For the files Modified: XoopsModules/xpdf/releases/1.0/xpdf/include/functions.php =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/include/functions.php 2012-03-15 18:29:14 UTC (rev 9142) +++ XoopsModules/xpdf/releases/1.0/xpdf/include/functions.php 2012-03-15 19:34:57 UTC (rev 9143) @@ -63,6 +63,21 @@ } } +function xpdf_MygetItemIds($permtype,$dirname) +{ + global $xoopsUser; + static $permissions = array(); + if(is_array($permissions) && array_key_exists($permtype, $permissions)) { + return $permissions[$permtype]; + } + $module_handler =& xoops_gethandler('module'); + $xpdfModule =& $module_handler->getByDirname($dirname); + $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS; + $gperm_handler =& xoops_gethandler('groupperm'); + $categories = $gperm_handler->getItemIds($permtype, $groups, $xpdfModule->getVar('mid')); + return $categories; +} + function xpdf_CleanVars( &$global, $key, $default = '', $type = 'int' ) { switch ( $type ) { case 'string': Modified: XoopsModules/xpdf/releases/1.0/xpdf/include/install.php =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/include/install.php 2012-03-15 18:29:14 UTC (rev 9142) +++ XoopsModules/xpdf/releases/1.0/xpdf/include/install.php 2012-03-15 19:34:57 UTC (rev 9143) @@ -36,44 +36,44 @@ * **************************************************************************** */ -$indexFile = XOOPS_ROOT_PATH."/modules/TDMCreate/include/index.html"; -$blankFile = XOOPS_ROOT_PATH."/modules/TDMCreate/images/deco/blank.gif"; +$indexFile = XOOPS_UPLOAD_PATH."/index.html"; +$blankFile = XOOPS_UPLOAD_PATH."/blank.gif"; //Creation du dossier "uploads" pour le module à la racine du site -$module_uploads = XOOPS_ROOT_PATH."/uploads/xpdf"; +$module_uploads = XOOPS_UPLOAD_PATH."/xpdf"; if(!is_dir($module_uploads)) mkdir($module_uploads, 0777); chmod($module_uploads, 0777); -copy($indexFile, XOOPS_ROOT_PATH."/uploads/xpdf/index.html"); +copy($indexFile, XOOPS_UPLOAD_PATH."/xpdf/index.html"); //Creation du fichier cat dans uploads -$module_uploads = XOOPS_ROOT_PATH."/uploads/xpdf/images"; +$module_uploads = XOOPS_UPLOAD_PATH."/xpdf/images"; if(!is_dir($module_uploads)) mkdir($module_uploads, 0777); chmod($module_uploads, 0777); -copy($indexFile, XOOPS_ROOT_PATH."/uploads/xpdf/images/index.html"); +copy($indexFile, XOOPS_UPLOAD_PATH."/xpdf/images/index.html"); //Creation du fichier cat dans uploads -$module_uploads = XOOPS_ROOT_PATH."/uploads/xpdf/images/cat"; +$module_uploads = XOOPS_UPLOAD_PATH."/xpdf/images/cat"; if(!is_dir($module_uploads)) mkdir($module_uploads, 0777); chmod($module_uploads, 0777); -copy($indexFile, XOOPS_ROOT_PATH."/uploads/xpdf/images/cat/index.html"); -copy($blankFile, XOOPS_ROOT_PATH."/uploads/xpdf/images/cat/blank.gif"); +copy($indexFile, XOOPS_UPLOAD_PATH."/xpdf/images/cat/index.html"); +copy($blankFile, XOOPS_UPLOAD_PATH."/xpdf/images/cat/blank.gif"); //Creation du dossier "uploads" pour le module à la racine du site -$module_uploads = XOOPS_ROOT_PATH."/uploads/xpdf/images/doc"; +$module_uploads = XOOPS_UPLOAD_PATH."/xpdf/images/doc"; if(!is_dir($module_uploads)) mkdir($module_uploads, 0777); chmod($module_uploads, 0777); -copy($indexFile, XOOPS_ROOT_PATH."/uploads/xpdf/images/doc/index.html"); -copy($blankFile, XOOPS_ROOT_PATH."/uploads/xpdf/images/doc/blank.gif"); +copy($indexFile, XOOPS_UPLOAD_PATH."/xpdf/images/doc/index.html"); +copy($blankFile, XOOPS_UPLOAD_PATH."/xpdf/images/doc/blank.gif"); //Creation du fichier doc dans uploads -$module_uploads = XOOPS_ROOT_PATH."/uploads/xpdf/files"; +$module_uploads = XOOPS_UPLOAD_PATH."/xpdf/files"; if(!is_dir($module_uploads)) mkdir($module_uploads, 0777); chmod($module_uploads, 0777); -copy($indexFile, XOOPS_ROOT_PATH."/uploads/xpdf/files/index.html"); +copy($indexFile, XOOPS_UPLOAD_PATH."/xpdf/files/index.html"); ?> \ No newline at end of file Modified: XoopsModules/xpdf/releases/1.0/xpdf/index.php =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/index.php 2012-03-15 18:29:14 UTC (rev 9142) +++ XoopsModules/xpdf/releases/1.0/xpdf/index.php 2012-03-15 19:34:57 UTC (rev 9143) @@ -37,17 +37,62 @@ */ include "header.php"; - $xoopsOption['template_main'] = 'xpdf_index.html'; include_once XOOPS_ROOT_PATH."/header.php"; //keywords -$keywords = $xoopsModuleConfig['keywords']; +$keywords = ''; $keywords .= substr($keywords, 0); $xoTheme->addMeta('meta', 'keywords', $keywords); //description $xoTheme->addMeta('meta', 'description', _MD_XPDF_DESC); $xoopsTpl->assign('adv', $xoopsModuleConfig['advertise']); +$docHandler =& xoops_getModuleHandler("xpdf_doc", "xpdf"); +// Variables +$criteria = new CriteriaCompo(); +$criteria->add(new CriteriaCompo('doc_id', 0, '>')); +$criteria->setSort("doc_created"); +$criteria->setOrder("DESC"); +$numrows = $docHandler->getCount(); +if (isset($_REQUEST['limit'])) { + $criteria->setLimit($_REQUEST['limit']); + $limit = $_REQUEST['limit']; +} else { + $criteria->setLimit($GLOBALS['xoopsModuleConfig']['perpageuser']); + $limit = $GLOBALS['xoopsModuleConfig']['perpageuser']; +} +if (isset($_REQUEST['start'])) { + $criteria->setStart($_REQUEST['start']); + $start = $_REQUEST['start']; +} else { + $criteria->setStart(0); + $start = 0; +} +$feed_arr = $docHandler->getall($criteria); +if ( $numrows > $limit ) { + include_once XOOPS_ROOT_PATH . '/class/pagenav.php'; + $pagenav = new XoopsPageNav($numrows, $limit, $start, 'start', 'limit=' . $limit); + $pagenav = $pagenav->renderNav(4); +} else { + $pagenav = ''; +} +$GLOBALS['xoopsTpl']->assign('pagenav', $pagenav); +unset($criteria); +$count = 1; +//Affichage du tableau +if ($numrows>0) +{ + foreach (array_keys($feed_arr) as $i) + { + $doc_title = $feed_arr[$i]->getVar("doc_title"); + $doc_description = $feed_arr[$i]->getVar("doc_description"); + $doc_img = $feed_arr[$i]->getVar("doc_img"); + $doc_online = $feed_arr[$i]->getVar("doc_online"); + $image = "<img src='".XOOPS_UPLOAD_URL."/xpdf/images/".$doc_img."' title='".$doc_title."' alt='".$doc_title."' />"; + $GLOBALS['xoopsTpl']->append('pdfs', array('title' => $doc_title, 'description' => $doc_description, 'count' => $count, 'image' => $image, 'online' => $doc_online)); + $count++; + } +} if($xoopsModuleConfig['act_socialnetworks']== 1){ $social = $xoopsModuleConfig['socialnetworks']; Modified: XoopsModules/xpdf/releases/1.0/xpdf/makepdf.php =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/makepdf.php 2012-03-15 18:29:14 UTC (rev 9142) +++ XoopsModules/xpdf/releases/1.0/xpdf/makepdf.php 2012-03-15 19:34:57 UTC (rev 9143) @@ -1,151 +1,122 @@ <?php -// $Id: makepdf.php,v 1.1.4.2 2005/01/07 05:27:34 phppp Exp $ -// ------------------------------------------------------------------------ // -// XOOPS - PHP Content Management System // -// Copyright (c) 2000 XOOPS.org // -// <http://www.xoops.org/> // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// You may not change or alter any portion of this comment or credits // -// of supporting developers from this source code or any supporting // -// source code which is considered copyrighted (c) material of the // -// original comment or credit authors. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // -// Author: Kazumi Ono (AKA onokazu) // -// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // -// Project: The XOOPS Project // -// ------------------------------------------------------------------------- // - +/** + * **************************************************************************** + * - Original Copyright (TDM) + * - TDMCreate By TDM - TEAM DEV MODULE FOR XOOPS + * - Licence GPL Copyright (c) (http://www.tdmxoops.net) + * - Developers TEAM TDMCreate Xoops - (http://www.xoops.org) + * **************************************************************************** + * XPDF - MODULE FOR XOOPS + * Copyright (c) 2007 - 2012 + * TXMod Xoops (http://www.txmodxoops.org) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting + * source code which is considered copyrighted (c) material of the + * original comment or credit authors. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * ------------------------------------------------------------------------ + * + * @copyright TXMod Xoops (http://www.txmodxoops.org) + * @license GPL see LICENSE + * @package xpdf + * @author TXMod Xoops (in...@tx...) + * + * Version : 1.01 Sun 2012/02/05 1:04:25 : Timgno Exp $ + * **************************************************************************** + */ error_reporting(0); -include_once 'header.php'; +include 'header.php'; -$lid = isset($_GET['doc_id']) ? intval($_GET['doc_id']) : 0; -$cid = isset($_GET['doc_cid']) ? intval($_GET['doc_cid']) : 0; -if ( empty($lid) ) { - die("No lid!"); -} elseif ( empty($cid) ) { - die("No cid!"); -} +$lid = xpdf_CleanVars( $_REQUEST, 'doc_id', 0, 'int' ); +$cid = xpdf_CleanVars( $_REQUEST, 'doc_cid', 0, 'int' ); +$docHandler =& xoops_getModuleHandler("xpdf_doc", "xpdf"); +$criteria = new CriteriaCompo(); +$criteria->add(new Criteria('doc_id', $lid, 'AND')); +$criteria->add(new Criteria('doc_cid', $cid)); +$criteria->add(new Criteria('doc_status', 0, '>')); +$doc_all = $docHandler->getall($criteria); -$result = $xoopsDB->query("select doc_id, doc_cid, doc_title, doc_description, doc_status, doc_published, doc_created from ".$xoopsDB->prefix("xpdf_doc")." where doc_id=$lid and doc_status>0"); +require_once XOOPS_ROOT_PATH.'/Frameworks/tcpdf/config/lang/eng.php'; +require_once XOOPS_ROOT_PATH.'/Frameworks/tcpdf/tcpdf.php'; -list($doc_id, $doc_cid, $doc_title, $doc_description, $doc_status, $doc_published, $doc_created) = $xoopsDB->fetchRow($result); - -if ( empty($doc_id) ) { - die("No data! Please check its doc_cid and doc_id!"); +foreach($doc_all as $doc) { + $pdf_data['title'] = $doc->getVar('doc_title'); + $pdf_data['filename'] = $doc->getVar('doc_filename'); + $pdf_data['subject'] = $doc->getVar('doc_subject'); + $pdf_data['published'] = formatTimestamp($doc->getVar('doc_published')); + $pdf_data['creator'] = $xoopsConfig['sitename']; + $pdf_data['content'] = $doc->getVar('doc_description', 'n'); + $pdf_data['author'] = $doc->getVar('doc_submitter'); } -$can_pdf = 0; -if ( $mylinks_can_pdf == 0 ) { - $can_pdf = 0; -} -else if ( $mylinks_can_pdf == 1) { - $can_pdf = 1; -} -else if ( $mylinks_can_pdf == 2) { - if ( $xoopsUser ) { - $can_pdf =1; - } - else { - $can_pdf =0; - } -} -else { - $can_pdf = 0; -} +// create new PDF document +$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, _CHARSET, false); -if ( empty($can_pdf) ) { - die("Not allowed now!"); -} +$pdf->SetCreator($pdf_data['creator']); +$pdf->SetTitle($pdf_data['title']); +$pdf->SetAuthor($pdf_data['author']); +$pdf->SetSubject($pdf_data['subject']); +$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); -$myts =& MyTextSanitizer::getInstance(); -require_once XOOPSMYLINKPATH.'/fpdf/fpdf.inc.php'; +// set default header data +$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 001', PDF_HEADER_STRING); -$pdf_data['title'] = $myts->makeTboxData4Show($ltitle); -$pdf_data['subtitle'] = ""; +// set header and footer fonts +$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); +$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); -$pdf_data['subsubtitle'] = $myts->makeTboxData4Show($url); -$pdf_data['date'] = formatTimestamp($time); -$pdf_data['filename'] = ''; -$pdf_data['content'] = $myts->makeTareaData4Show($description,0); +// set default monospaced font +$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); -$pdf_data['author'] = ""; +//set margins +$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); +$pdf->SetHeaderMargin(PDF_MARGIN_HEADER); +$pdf->SetFooterMargin(PDF_MARGIN_FOOTER); -//Other stuff -$puff='<br />'; -$puffer='<br /><br /><br />'; +//set auto page breaks +$pdf->SetAutoPageBreak(true, PDF_MARGIN_BOTTOM); -//create the A4-PDF... -$pdf_config['slogan']=$xoopsConfig['sitename'].' - '.$xoopsConfig['slogan']; +//set image scale factor +$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); +//set some language-dependent strings +$pdf->setLanguageArray($l); -$pdf=new PDF(); -if(method_exists($pdf, "encoding")){ - $pdf->encoding($pdf_data, _CHARSET); -} -$pdf->SetCreator($pdf_config['creator']); -$pdf->SetTitle($pdf_data['title']); -$pdf->SetAuthor($pdf_config['url']); -$pdf->SetSubject($pdf_data['author']); -$out=$pdf_config['url'].', '.$pdf_data['author'].', '.$pdf_data['title'].', '.$pdf_data['subtitle'].', '.$pdf_data['subsubtitle']; -$pdf->SetKeywords($out); -$pdf->SetAutoPageBreak(true,25); -$pdf->SetMargins($pdf_config['margin']['left'],$pdf_config['margin']['top'],$pdf_config['margin']['right']); -$pdf->Open(); +// --------------------------------------------------------- -//First page -$pdf->AddPage(); -$pdf->SetXY(24,25); -$pdf->SetTextColor(10,60,160); -$pdf->SetFont($pdf_config['font']['slogan']['family'],$pdf_config['font']['slogan']['style'],$pdf_config['font']['slogan']['size']); -$pdf->WriteHTML($pdf_config['slogan'], $pdf_config['scale']); -//$pdf->Image($pdf_config['logo']['path'],$pdf_config['logo']['left'],$pdf_config['logo']['top'],$pdf_config['logo']['width'],$pdf_config['logo']['height'],'',$pdf_config['url']); -$pdf->Line(25,30,190,30); -$pdf->SetXY(25,35); -$pdf->SetFont($pdf_config['font']['title']['family'],$pdf_config['font']['title']['style'],$pdf_config['font']['title']['size']); -$pdf->WriteHTML($pdf_data['title'],$pdf_config['scale']); +// set default font subsetting mode +$pdf->setFontSubsetting(true); -if ($pdf_data['subtitle']<>''){ - $pdf->WriteHTML($puff,$pdf_config['scale']); - $pdf->SetFont($pdf_config['font']['subtitle']['family'],$pdf_config['font']['subtitle']['style'],$pdf_config['font']['subtitle']['size']); - $pdf->WriteHTML($pdf_data['subtitle'],$pdf_config['scale']); -} -if ($pdf_data['subsubtitle']<>'') { - $pdf->WriteHTML($puff,$pdf_config['scale']); - $pdf->SetFont($pdf_config['font']['subsubtitle']['family'],$pdf_config['font']['subsubtitle']['style'],$pdf_config['font']['subsubtitle']['size']); - $pdf->WriteHTML($pdf_data['subsubtitle'],$pdf_config['scale']); -} +// Set font +// dejavusans is a UTF-8 Unicode font, if you only need to +// print standard ASCII chars, you can use core fonts like +// helvetica or times to reduce file size. +$pdf->SetFont('dejavusans', '', 14, '', true); -$pdf->WriteHTML($puff,$pdf_config['scale']); -$pdf->SetFont($pdf_config['font']['author']['family'],$pdf_config['font']['author']['style'],$pdf_config['font']['author']['size']); -$out=''; -$out.=$pdf_data['author']; -$pdf->WriteHTML($out,$pdf_config['scale']); -$pdf->WriteHTML($puff,$pdf_config['scale']); -$out='Date:'; -$out.=$pdf_data['date']; -$pdf->WriteHTML($out,$pdf_config['scale']); -$pdf->WriteHTML($puff,$pdf_config['scale']); +// Add a page +// This method has several options, check the source code documentation for more information. +$pdf->AddPage(); -$pdf->SetTextColor(0,0,0); -$pdf->WriteHTML($puffer,$pdf_config['scale']); +// Set some content to print +$html = $pdf_data['content']; -$pdf->SetFont($pdf_config['font']['content']['family'],$pdf_config['font']['content']['style'],$pdf_config['font']['content']['size']); -$pdf->WriteHTML($pdf_data['content'],$pdf_config['scale']); +// Print text using writeHTMLCell() +$pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true); -//$pdf->Output($pdf_data['filename'],''); -$pdf->Output(); +// --------------------------------------------------------- + +// Close and output PDF document +// This method has several options, check the source code documentation for more information. +$pdf->Output($pdf_data['filename'].'.pdf', 'I'); ?> \ No newline at end of file Modified: XoopsModules/xpdf/releases/1.0/xpdf/sql/mysql.sql =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/sql/mysql.sql 2012-03-15 18:29:14 UTC (rev 9142) +++ XoopsModules/xpdf/releases/1.0/xpdf/sql/mysql.sql 2012-03-15 19:34:57 UTC (rev 9143) @@ -6,31 +6,33 @@ CREATE TABLE `xpdf_cat` ( `cat_id` int (5) unsigned NOT NULL auto_increment, `cat_pid` int (5) unsigned NOT NULL default '0', -`cat_title` varchar (255) NOT NULL default ' ', -`cat_imgurl` varchar (255) NOT NULL default ' ', -`cat_description` text NOT NULL , -`cat_weight` int (11) NOT NULL default '0', +`cat_title` varchar (255) NOT NULL default ' ', +`cat_imgurl` varchar (255) NOT NULL default ' ', +`cat_description` text NOT NULL , +`cat_weight` int (11) NOT NULL default '0', PRIMARY KEY (`cat_id`), KEY `cat_pid` (`cat_pid`) ) ENGINE=MyISAM; # -# Table structure for table `xpdf_doc` 10 +# Table structure for table `xpdf_doc` 15 # CREATE TABLE `xpdf_doc` ( `doc_id` int (5) unsigned NOT NULL auto_increment, -`doc_cid` int (5) NOT NULL default '0', -`doc_title` varchar (255) NOT NULL default ' ', -`doc_description` text NOT NULL , -`doc_subject` varchar (255) NOT NULL default ' ', -`doc_keywords` varchar (255) NOT NULL default ' ', -`doc_submitter` int (10) NOT NULL default '0', -`doc_created` int (10) NOT NULL default '0000-00-00', -`doc_published` int (10) NOT NULL default '0000-00-00', -`doc_weight` int (11) NOT NULL default '0', -`doc_status` tinyint (1) NOT NULL default '0', -`doc_waiting` tinyint (1) NOT NULL default '0', -`doc_online` tinyint (1) NOT NULL default '0', +`doc_cid` int (5) NOT NULL default '0', +`doc_filename` varchar (50) NOT NULL default '', +`doc_title` varchar (255) NOT NULL default '', +`doc_description` text NOT NULL , +`doc_image` varchar (30) NOT NULL default '', +`doc_subject` varchar (255) NOT NULL default '', +`doc_keywords` varchar (255) NOT NULL default '', +`doc_submitter` int (10) NOT NULL default '0', +`doc_created` int (10) NOT NULL default '0', +`doc_published` int (10) NOT NULL default '0', +`doc_weight` int (11) NOT NULL default '0', +`doc_status` tinyint (1) NOT NULL default '0', +`doc_waiting` tinyint (1) NOT NULL default '0', +`doc_online` tinyint (1) NOT NULL default '0', PRIMARY KEY (`doc_id`), KEY `doc_cid` (`doc_cid`) ) ENGINE=MyISAM; \ No newline at end of file Modified: XoopsModules/xpdf/releases/1.0/xpdf/templates/xpdf_index.html =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/templates/xpdf_index.html 2012-03-15 18:29:14 UTC (rev 9142) +++ XoopsModules/xpdf/releases/1.0/xpdf/templates/xpdf_index.html 2012-03-15 19:34:57 UTC (rev 9143) @@ -1,9 +1,33 @@ <{include file="db:xpdf_header.html"}> <div class="outer"> - <div class = "center">XPDF</div> +<{if count($pdfs) gt 0}> + <table border="0" cellpadding="2" cellspacing="2"> + <tr> + <!-- Start pdfs loop --> + <{foreach item=pdf from=$pdfs }> + <{if $pdf.online == 1 }> + <td> + <table border="0" cellpadding="2" cellspacing="2"> + <tr class="even center"> + <th class="title" colspan="2"><span><{$pdf.title}></span></th> + </tr> + <tr class="odd center"> + <td class="image" valign="middle"><{$pdf.image}></td> + <td class="image" valign="top"><{$pdf.description}></td> + </tr> + <tr class="even"> + <td class="view" colspan="2"><a href="<{$xoops_url}>/modules/xpdf/index.php?doc_title=<{$pdf.doc_title}>"> </a></td> + </tr> + </table> + </td> + <{/if}> + <{if $pdf.count is div by $divideby}> + </tr><tr> + <{/if}> + <{/foreach}> + <!-- End pdfs loop --> + </tr> +</table> +<{/if}> </div> -<div class="outer"> - <div class = "center">Xpdf</div> - <br /> -</div> <{include file="db:xpdf_footer.html"}> Modified: XoopsModules/xpdf/releases/1.0/xpdf/xoops_version.php =================================================================== --- XoopsModules/xpdf/releases/1.0/xpdf/xoops_version.php 2012-03-15 18:29:14 UTC (rev 9142) +++ XoopsModules/xpdf/releases/1.0/xpdf/xoops_version.php 2012-03-15 19:34:57 UTC (rev 9143) @@ -48,13 +48,13 @@ $modversion['author_website_url'] = "http://www.txmodxoops.org"; $modversion['author_website_name'] = "TXMod Xoops"; $modversion['credits'] = "Timgno"; -$modversion['license'] = "Only personal usage"; +$modversion['license'] = "Only for personal use"; $modversion['help'] = "page=help"; $modversion['license_url'] = "http://www.txmodxoops.org"; -$modversion['release_info'] = "Alpha 1 05/02/2012"; +$modversion['release_info'] = "Alpha 2 15/03/2012"; $modversion['release_file'] = XOOPS_URL."/modules/".$dirname."/docs/readme.txt"; -$modversion['release_date'] = "2012/02/05"; +$modversion['release_date'] = "2012/03/01"; $modversion['manual'] = "Install Manual"; $modversion['manual_file'] = XOOPS_URL."/modules/".$dirname."/docs/install.txt"; @@ -76,8 +76,8 @@ $modversion['forum_site_name'] = "TXMod Xoops Community"; $modversion['module_website_url'] = "http://www.txmodxoops.org/"; $modversion['module_website_name'] = "TXMod Xoops"; -$modversion['release'] = "05-02-2012"; -$modversion['module_status'] = "Alpha 1"; +$modversion['release'] = "15-03-2012"; +$modversion['module_status'] = "Alpha 2"; // Admin things $modversion['hasAdmin'] = 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |