Commit 3483245d authored by jcnventura's avatar jcnventura

Updated all translations

Misc fixes from the coder module
parent 105210f5
July 16, 2008
Updated all translations
Misc fixes from the coder module
July 15, 2008
Fix #282385: Remove whitespace between icon and text, use margin instead
July 9, 2008
To make the job easier for themers, added access to the $node var inside the template
Fix #278922: Add support to the RTL languages
Fix #276627: Accept paths of the form node/nnn/args
June 17, 2008
Self configure TCPDF
June 16, 2008
With the new agreement between the major search engines, robots=nocache is obsolete
Set PDF version to 1.6 (Acrobat 7.x)
Use own panel in node type edit form, instead of workflow and comment panels.
June 13, 2008
Fix #270095 by suit4: prevent validation error when the class field is empty
June 6, 2008
Add path-based visibility options to all modules
Minor code documentation fixes
......
......@@ -16,7 +16,7 @@
*/
function print_main_settings() {
$print_settings = variable_get('print_settings', print_settings_default());
$form['print_settings'] = array(
'#type' => 'fieldset',
'#tree' => TRUE,
......@@ -146,7 +146,7 @@ function print_html_settings() {
'#type' => 'textarea',
'#default_value' => $print_html_settings['sys_link_pages'],
'#rows' => 3,
'#description' => t("Setting this option will add a printer-friendly version page link on pages created by Drupal or the enabled modules.") .'<br />'.
'#description' => t("Setting this option will add a printer-friendly version page link on pages created by Drupal or the enabled modules.") .'<br />'.
t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>')),
);
......
<?php
// $Id$
/**
* @file
* Install file of the print module
*/
/**
* Implementation of hook_install().
*/
......
......@@ -143,7 +143,7 @@ function print_link($type, $node = NULL, $teaser = FALSE) {
if ( !($teaser) && ($node_type != 'book') && (!isset($node->book)) &&
($print_html_settings['show_link']) && user_access('access print') &&
!(($print_html_settings['node_link_visibility']) xor
(drupal_match_path("node/". $node->nid, $print_html_settings['node_link_pages']))) &&
(drupal_match_path("node/". $node->nid, $print_html_settings['node_link_pages']))) &&
(($type == 'comment' && $print_display_comment) ||
($type == 'node' && $print_display))) {
$links = array();
......@@ -162,7 +162,7 @@ function print_link($type, $node = NULL, $teaser = FALSE) {
'attributes' => $format['attributes'],
'html' => $format['html'],
'query' => $query,
);
);
return $links;
}
......@@ -203,14 +203,14 @@ function print_help($path, $arg) {
$print_html_settings = variable_get('print_html_settings', print_html_settings_default());
if (($print_html_settings['show_link']) && user_access('access print') &&
!(($print_html_settings['sys_link_visibility']) xor
(drupal_match_path($path, $print_html_settings['sys_link_pages']))) &&
!(($print_html_settings['sys_link_visibility']) xor
(drupal_match_path($path, $print_html_settings['sys_link_pages']))) &&
(preg_match("/^node\//i", $path) == 0)) {
static $output = FALSE;
if ($output === FALSE) {
$output = TRUE;
return print_insert_link();
}
}
......@@ -311,7 +311,7 @@ function _print_format_link_aux($type = 0, $text = '', $img = '') {
else {
$html = FALSE;
}
return array('text' => $text,
'html' => $html,
);
......@@ -363,7 +363,7 @@ function theme_print_text() {
* their defined pages/blocks.
*
* @param $path
* path of the original page (optional). If not specified, the current URL
* path of the original page (optional). If not specified, the current URL
* is used
* @return
* string with the HTML link to the printer-friendly page
......
......@@ -79,7 +79,7 @@ function print_controller($path, $cid, $teaser = FALSE, $message = NULL) {
* Generates a robots meta tag to tell them what they may index
*
* @return
* string with the meta robots tag
* string with the meta robots tag
*/
function _print_robots_meta_generator() {
$robots_settings = variable_get('print_robot_settings', print_robot_settings_default());
......@@ -114,7 +114,7 @@ function _print_robots_meta_generator() {
* @param $message
* optional sender's message (used by the send e-mail module)
* @param $cid
* id of current comment being generated (NULL when not generating
* id of current comment being generated (NULL when not generating
* an individual comment)
* @return
* array with the fields to be used in the template
......@@ -174,7 +174,7 @@ function _print_var_generator($node, $message = NULL, $cid = NULL) {
}
$print["sendtoprinter"] = $print_html_settings['sendtoprinter'] ? " onload=\"window.print();\"" : "";
$logo_url = !empty($print_settings['logo_url']) ? strip_tags($print_settings['logo_url']) : theme_get_setting('logo');
$print["logo"] = $logo_url ? "<img class=\"print-logo\" src=\"". $logo_url ."\" alt=\"\" />\n" : "";
......@@ -274,13 +274,13 @@ function _print_var_generator($node, $message = NULL, $cid = NULL) {
/**
* Callback function for the preg_replace_callback for URL-capable patterns
*
* Manipulate URLs to make them absolute in the URLs list, and to add a
* Manipulate URLs to make them absolute in the URLs list, and to add a
* [n] footnote marker.
*
*
* @param $matches
* array with the matched tag patterns, usually <a...>+text+</a>
* @return
* tag with re-written URL and when appropriate the [n] index to the
* tag with re-written URL and when appropriate the [n] index to the
* URL list
*/
function _print_rewrite_urls($matches) {
......@@ -371,8 +371,8 @@ function _print_rewrite_urls($matches) {
*
* @param $url
* absolute URL to be inserted in the list
* @return
* list of URLs previously stored if $url is 0, or the current count
* @return
* list of URLs previously stored if $url is 0, or the current count
* otherwise.
*/
function _print_friendly_urls($url = 0) {
......@@ -392,7 +392,7 @@ function _print_friendly_urls($url = 0) {
/**
* Choose most appropriate template
*
*
* Auxiliary function to resolve the most appropriate template trying to find
* a content specific template in the theme or module dir before falling back
* on a generic template also in those dirs.
......@@ -437,7 +437,7 @@ function _print_get_template($format = NULL, $type = NULL) {
/**
* Prepare a Printer-friendly-ready node body for content nodes
*
*
* @param $nid
* node ID of the node to be rendered into a printer-friendly page
* @param $cid
......@@ -479,7 +479,7 @@ function _print_generate_node($nid, $cid = NULL, $teaser = FALSE, $message = NUL
unset($node->content["fivestar_widget"]);
// Disable service links module output
unset($node->content["service_links"]);
$node->body = drupal_render($node->content);
//TODO the following was part of the fix for http://drupal.org/node/254863
//check if it is reproducible and find the exact condition which
......@@ -492,7 +492,7 @@ function _print_generate_node($nid, $cid = NULL, $teaser = FALSE, $message = NUL
if (function_exists('comment_render') && (($cid != NULL) || ($print_settings['comments']))) {
//Print only the requested comment (or if $cid is NULL, all of them)
$comments = comment_render($node, $cid);
//Remove the comment forms
$comments = preg_replace("/<form.*?id=\"comment-.*?\">.*?<\/form>/sim", "", $comments);
//Remove the 'Post new comment' title
......@@ -528,7 +528,7 @@ function _print_generate_node($nid, $cid = NULL, $teaser = FALSE, $message = NUL
/**
* Prepare a Printer-friendly-ready node body for non-content pages
*
*
* @param $path
* path of the node to be rendered into a printer-friendly page
* @param $teaser
......@@ -579,7 +579,7 @@ function _print_generate_path($path, $teaser = FALSE, $message = NULL) {
/**
* Prepare a Printer-friendly-ready node body for book pages
*
*
* @param $nid
* node ID of the node to be rendered into a printer-friendly page
* @param $teaser
......
<?php
/* $Id$ */
// $Id$
/**
* @file
* Generates the PDF versions of the pages
*
* This file is included by the print_pdf module and includes the
* functions that interface with the PDF generation packages.
*/
require_once(drupal_get_path('module', 'print') .'/print.pages.inc');
......@@ -40,9 +48,9 @@ function _print_pdf_dompdf($print, $html, $filename) {
$url_array = parse_url($print['url']);
$protocol = $url_array['scheme'] . "://";
$protocol = $url_array['scheme'] .'://';
$host = $url_array['host'];
$path = dirname($url_array['path']) . "/";
$path = dirname($url_array['path']) .'/';
$dompdf = new DOMPDF();
$dompdf->set_base_path($path);
......@@ -51,7 +59,7 @@ function _print_pdf_dompdf($print, $html, $filename) {
$dompdf->set_protocol($protocol);
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream($filename, array("Attachment" => ($print_pdf_settings['content_disposition'] == 2)));
}
......@@ -99,7 +107,7 @@ function _print_pdf_tcpdf($print, $html, $filename) {
$pdf->SetMargins(15, 27, 15);
$pdf->SetHeaderMargin(5);
$pdf->SetFooterMargin(10);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, 25);
......@@ -108,7 +116,7 @@ function _print_pdf_tcpdf($print, $html, $filename) {
//initialize document
$pdf->AliasNbPages();
// add a page
$pdf->AddPage();
......@@ -129,7 +137,7 @@ function _print_pdf_tcpdf($print, $html, $filename) {
$pdf->SetFont($font_name, '', $font_size);
$pdf->writeHTML($matches[1]);
//Close and output PDF document
//Close and output PDF document
$output_dest = ($print_pdf_settings['content_disposition'] == 2) ? 'D' : 'I';
$pdf->Output($filename, $output_dest);
}
<?php
/* $Id$ */
// $Id$
/**
* @file
......@@ -64,7 +64,7 @@ function print_mail_settings() {
'#type' => 'textarea',
'#default_value' => $print_mail_settings['sys_link_pages'],
'#rows' => 3,
'#description' => t("Setting this option will add a send by-email link on pages created by Drupal or the enabled modules.") .'<br />'.
'#description' => t("Setting this option will add a send by-email link on pages created by Drupal or the enabled modules.") .'<br />'.
t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>')),
);
......
<?php
/* $Id$ */
// $Id$
/**
* @file
* Displays and processes the mail send form.
*
* This file is included by the print_mail module and includes the
* mail form display, validation and submit hooks.
*/
require_once(drupal_get_path('module', 'print') .'/print.pages.inc');
......@@ -88,8 +96,8 @@ function print_mail_form($form_state) {
$user_name = t('Someone');
}
$site_name = variable_get('site_name', t('an interesting site'));
$form['fld_subject']['#default_value'] = t('!user has sent you a message from !site',
array('!user' => $user_name, '!site' => $site_name));
$form['fld_subject']['#default_value'] = t('!user has sent you a message from !site',
array('!user' => $user_name, '!site' => $site_name));
return $form;
}
......@@ -233,7 +241,6 @@ function print_mail_form_reset($form, &$form_state) {
drupal_set_message(t('The form has been reset to the default values.'));
}
/**
* Process the send by-email form cancel submission.
*
......
<?php
// $Id$
/**
* @file
* Install file of the print_mail module
*/
/**
* Implementation of hook_uninstall().
*/
......
<?php
/* $Id$ */
// $Id$
/**
* @file
......@@ -77,7 +77,7 @@ function print_pdf_settings() {
'#type' => 'textarea',
'#default_value' => $print_pdf_settings['sys_link_pages'],
'#rows' => 3,
'#description' => t("Setting this option will add a PDF version page link on pages created by Drupal or the enabled modules.") .'<br />'.
'#description' => t("Setting this option will add a PDF version page link on pages created by Drupal or the enabled modules.") .'<br />'.
t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>')),
);
......@@ -112,8 +112,8 @@ function print_pdf_settings() {
'RA3' => 'RA3', 'RA4' => 'RA4', 'SRA0' => 'SRA0',
'SRA1' => 'SRA1', 'SRA2' => 'SRA2', 'SRA3' => 'SRA3',
'SRA4' => 'SRA4', 'LETTER' => 'Letter', 'LEGAL' => 'Legal',
'EXECUTIVE' => 'Executive', 'FOLIO'=> 'Folio',
),
'EXECUTIVE' => 'Executive', 'FOLIO' => 'Folio',
),
'#default_value' => $print_pdf_settings['paper_size'],
'#description' => t("Choose the paper size of the generated PDF."),
);
......
<?php
// $Id$
/**
* @file
* Install file of the print_pdf module
*/
/**
* Implementation of hook_uninstall().
*/
......
......@@ -67,6 +67,28 @@ function print_pdf_menu() {
return $items;
}
/**
* Implementation of hook_requirements().
*/
function print_pdf_requirements($phase) {
$requirements = array();
$t = get_t();
switch ($phase) {
// At runtime, make sure that a PDF generation tool is selected
case 'runtime':
$print_pdf_settings = variable_get('print_pdf_settings', print_pdf_settings_default());
if (empty($print_pdf_settings['pdf_tool'])) {
$requirements['print_pdf_tool'] = array(
'title' => $t('Print PDF'),
'value' => $t('No PDF tool selected. Please configure it in the <a href="@url">PDF settings page</a>.', array('@url' => url('admin/settings/print/pdf'))),
'severity' => REQUIREMENT_ERROR,
);
}
break;
}
return $requirements;
}
/**
* Implementation of hook_link().
*/
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment