Commit 7625e488 authored by jcnventura's avatar jcnventura

Organize everything in folders before the 1.0 release

parent b2a85b2b
<?php
// $Id$
/** @mainpage Developer Documentation
* Welcome to the module developer's documentation. The interesting functions for
* themers are those that start with 'theme_'.
*
* - Components of Drupal
* - @link print.module Printer-friendly version module @endlink
* - @link print_mail.module Send by e-mail module @endlink
* - @link print_pdf.module PDF version module @endlink
*/
......@@ -2,4 +2,4 @@
name = "Printer-friendly pages (core)"
description = "Adds a printer-friendly version link to content and administrative pages."
core=6.x
package = "Printer-friendly pages"
package = "Printer, e-mail and PDF versions"
......@@ -110,7 +110,7 @@ function print_link($type, $node = NULL, $teaser = FALSE) {
$print_html_link_pos = variable_get('print_html_link_pos', array(PRINT_HTML_LINK_POS_DEFAULT => PRINT_HTML_LINK_POS_DEFAULT));
$allowed_type = print_link_allowed(array('type' => $type, 'node' => $node, 'teaser' => $teaser));
if (($allowed_type === PRINT_ALLOW_NORMAL_LINK) && !empty($print_html_link_pos['link'])) {
drupal_add_css(drupal_get_path('module', 'print') .'/printlinks.css');
drupal_add_css(drupal_get_path('module', 'print') .'/css/printlinks.css');
$links = array();
$format = theme('print_format_link');
......@@ -170,7 +170,7 @@ function print_help($path, $arg) {
static $output = FALSE;
if ($output === FALSE) {
drupal_add_css(drupal_get_path('module', 'print') .'/printlinks.css');
drupal_add_css(drupal_get_path('module', 'print') .'/css/printlinks.css');
$output = TRUE;
return '<span class="print-syslink">'. print_insert_link() .'</span>';
......@@ -188,7 +188,7 @@ function print_nodeapi(&$node, $op = 'view', $teaser, $page) {
$allowed_type = print_link_allowed(array('node' => $node, 'teaser' => $teaser));
if (($allowed_type != FALSE) && !empty($print_html_link_pos['corner']) &&
(preg_match('!^print!i', $_GET['q']) == 0)) {
drupal_add_css(drupal_get_path('module', 'print') .'/printlinks.css');
drupal_add_css(drupal_get_path('module', 'print') .'/css/printlinks.css');
if ($allowed_type === PRINT_ALLOW_BOOK_LINK) {
$path = PRINT_PATH .'/book/export/html/'. $node->nid;
}
......@@ -209,7 +209,7 @@ function print_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'node_type_form') {
$form['print'] = array(
'#type' => 'fieldset',
'#title' => t('Printer-friendly pages'),
'#title' => t('Printer, e-mail and PDF versions'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
......
......@@ -154,11 +154,11 @@ function _print_var_generator($node, $message = NULL, $cid = NULL) {
$css_files[] = strip_tags(strtr($print_css, $replace_pairs));
}
else {
$css_files[] = base_path() . drupal_get_path('module', 'print') .'/print.css';
$css_files[] = base_path() . drupal_get_path('module', 'print') .'/css/print.css';
}
// If the current language is RTL add the RTL stylesheet.
if (defined('LANGUAGE_RTL') && $language->direction == LANGUAGE_RTL) {
$css_files[] = base_path() . drupal_get_path('module', 'print') .'/print-rtl.css';
$css_files[] = base_path() . drupal_get_path('module', 'print') .'/css/print-rtl.css';
}
// Add CCK's CSS file to properly display the fields
if (module_exists('content')) {
......
......@@ -125,7 +125,7 @@ function print_mail_form($form_state) {
* @ingroup forms
*/
function theme_print_mail_form($form) {
drupal_add_css(drupal_get_path('module', 'print') .'/printlinks.css');
drupal_add_css(drupal_get_path('module', 'print') .'/css/printlinks.css');
$content = '';
foreach (element_children($form) as $key) {
$tmp = drupal_render($form[$key]);
......
......@@ -3,4 +3,4 @@ name = "Send by e-mail"
description = "Provides the capability to send the web page by e-mail"
dependencies[] = print
core=6.x
package = "Printer-friendly pages"
package = "Printer, e-mail and PDF versions"
......@@ -20,10 +20,6 @@ define('PRINT_MAIL_HOURLY_THRESHOLD', 3);
define('PRINT_MAIL_TEASER_DEFAULT_DEFAULT', 1);
define('PRINT_MAIL_TEASER_CHOICE_DEFAULT', 1);
//*******************************************************************
// Drupal Hooks
//*******************************************************************
/**
* Implementation of hook_theme().
*/
......@@ -73,7 +69,7 @@ function print_mail_link($type, $node = NULL, $teaser = FALSE) {
$print_mail_link_pos = variable_get('print_mail_link_pos', array(PRINT_MAIL_LINK_POS_DEFAULT => PRINT_MAIL_LINK_POS_DEFAULT));
$allowed_type = print_mail_link_allowed(array('type' => $type, 'node' => $node, 'teaser' => $teaser));
if (($allowed_type) && !empty($print_mail_link_pos['link'])) {
drupal_add_css(drupal_get_path('module', 'print') .'/printlinks.css');
drupal_add_css(drupal_get_path('module', 'print') .'/css/printlinks.css');
$links = array();
$format = theme('print_mail_format_link');
......@@ -117,7 +113,7 @@ function print_mail_help($path, $arg) {
static $output = FALSE;
if ($output === FALSE) {
drupal_add_css(drupal_get_path('module', 'print') .'/printlinks.css');
drupal_add_css(drupal_get_path('module', 'print') .'/css/printlinks.css');
$output = TRUE;
return '<span class="print-syslink">'. print_mail_insert_link() .'</span>';
......@@ -135,7 +131,7 @@ function print_mail_nodeapi(&$node, $op = 'view', $teaser, $page) {
$allowed_type = print_mail_link_allowed(array('node' => $node, 'teaser' => $teaser));
if (($allowed_type != FALSE) && !empty($print_mail_link_pos['corner']) &&
(preg_match('!^print!i', $_GET['q']) == 0)) {
drupal_add_css(drupal_get_path('module', 'print') .'/printlinks.css');
drupal_add_css(drupal_get_path('module', 'print') .'/css/printlinks.css');
if ($allowed_type === PRINT_ALLOW_BOOK_LINK) {
$path = PRINTMAIL_PATH .'/book/export/html/'. $node->nid;
}
......
......@@ -3,4 +3,4 @@ name = "PDF version"
description = "Adds the capability to export pages as PDF."
dependencies[] = print
core=6.x
package = "Printer-friendly pages"
package = "Printer, e-mail and PDF versions"
......@@ -23,10 +23,6 @@ define('PRINT_PDF_PAGE_ORIENTATION_DEFAULT', 'portrait');
define('PRINT_PDF_FONT_FAMILY_DEFAULT', 'dejavusans');
define('PRINT_PDF_FONT_SIZE_DEFAULT', 10);
//*******************************************************************
// Drupal Hooks
//*******************************************************************
/**
* Implementation of hook_theme().
*/
......@@ -64,7 +60,7 @@ function print_pdf_menu() {
'page callback' => 'print_pdf_controller',
'access arguments' => array('access print'),
'type' => MENU_CALLBACK,
'file' => 'print.pdf.inc',
'file' => 'print_pdf.pages.inc',
);
$items['admin/settings/print/pdf'] = array(
'title' => 'PDF',
......@@ -108,7 +104,7 @@ function print_pdf_link($type, $node = NULL, $teaser = FALSE) {
$print_pdf_link_pos = variable_get('print_pdf_link_pos', array(PRINT_PDF_LINK_POS_DEFAULT => PRINT_PDF_LINK_POS_DEFAULT));
$allowed_type = print_pdf_link_allowed(array('type' => $type, 'node' => $node, 'teaser' => $teaser));
if (($allowed_type) && !empty($print_pdf_link_pos['link'])) {
drupal_add_css(drupal_get_path('module', 'print') .'/printlinks.css');
drupal_add_css(drupal_get_path('module', 'print') .'/css/printlinks.css');
$links = array();
$format = theme('print_pdf_format_link');
......@@ -152,7 +148,7 @@ function print_pdf_help($path, $arg) {
static $output = FALSE;
if ($output === FALSE) {
drupal_add_css(drupal_get_path('module', 'print') .'/printlinks.css');
drupal_add_css(drupal_get_path('module', 'print') .'/css/printlinks.css');
$output = TRUE;
return '<span class="print-syslink">'. print_pdf_insert_link() .'</span>';
......@@ -170,7 +166,7 @@ function print_pdf_nodeapi(&$node, $op = 'view', $teaser, $page) {
$allowed_type = print_pdf_link_allowed(array('node' => $node, 'teaser' => $teaser));
if (($allowed_type != FALSE) && !empty($print_pdf_link_pos['corner']) &&
(preg_match('!^print!i', $_GET['q']) == 0)) {
drupal_add_css(drupal_get_path('module', 'print') .'/printlinks.css');
drupal_add_css(drupal_get_path('module', 'print') .'/css/printlinks.css');
if ($allowed_type === PRINT_ALLOW_BOOK_LINK) {
$path = PRINTPDF_PATH .'/book/export/html/'. $node->nid;
}
......
......@@ -5,8 +5,7 @@
* @file
* print module simpletest tests
*
* This file includes the defined tests for the Printer-friendly pages
* module.
* This file includes the defined tests for the print module.
*/
class PrintBasicTest extends DrupalWebTestCase {
......@@ -18,9 +17,9 @@ class PrintBasicTest extends DrupalWebTestCase {
*/
public function getInfo() {
return array(
'name' => t('Printer-friendly pages basic tests'),
'description' => t('Test basic Printer-friendly pages module functionality.'),
'group' => t('Printer-friendly pages'),
'name' => t('Printer, e-mail and PDF versions tests'),
'description' => t('Unit tests for the print, print_mail and print_pdf modules.'),
'group' => t('Printer, e-mail and PDF versions'),
);
}
......
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