Code style changes(make coder happy with lightbox)

parent 524bd0ce
......@@ -20,7 +20,7 @@ function lightbox2_settings_page($op = NULL) {
function lightbox2_general_settings_form() {
// Add the javascript which disables / enables form elements.
drupal_add_js(drupal_get_path('module', 'lightbox2') .'/js/lightbox2.js', 'module');
drupal_add_js(drupal_get_path('module', 'lightbox2') . '/js/lightbox2.js', 'module');
// Enable translation of default strings for potx.
$default_strings = array(t('View Image Details'), t('Image !current of !total'), t('Page !current of !total'), t('Video !current of !total'), t('Download Original'));
......@@ -455,7 +455,7 @@ function lightbox2_general_settings_form() {
);
// Set animation help text.
$form['advanced_options']['animation_settings']['animation_options_help'] = array(
'#value' => '<p>'. t("These options aren't available when using Lightbox2 Lite.") .'</p>',
'#value' => '<p>' . t("These options aren't available when using Lightbox2 Lite.") . '</p>',
);
$resize_sequence_options = array(
t('Simultaneous'),
......@@ -575,7 +575,7 @@ function lightbox2_general_settings_form_submit($form, &$form_state) {
function lightbox2_slideshow_settings_form() {
// Add the javascript which disables / enables form elements.
drupal_add_js(drupal_get_path('module', 'lightbox2') .'/js/lightbox2.js', 'module');
drupal_add_js(drupal_get_path('module', 'lightbox2') . '/js/lightbox2.js', 'module');
// Set up a hidden variable.
$form['lightbox2_lite'] = array(
......@@ -661,7 +661,7 @@ function lightbox2_slideshow_settings_form_validate($form, &$form_state) {
function lightbox2_iframe_settings_form() {
// Add the javascript which disables / enables form elements.
drupal_add_js(drupal_get_path('module', 'lightbox2') .'/js/lightbox2.js', 'module');
drupal_add_js(drupal_get_path('module', 'lightbox2') . '/js/lightbox2.js', 'module');
// Set up a hidden variable.
$form['lightbox2_lite'] = array(
......@@ -720,7 +720,7 @@ function lightbox2_iframe_settings_form_validate($form, &$form_state) {
function lightbox2_auto_image_handling_settings_form() {
// Add the javascript which disables / enables form elements.
drupal_add_js(drupal_get_path('module', 'lightbox2') .'/js/lightbox2.js', 'module');
drupal_add_js(drupal_get_path('module', 'lightbox2') . '/js/lightbox2.js', 'module');
// Set up a hidden variable.
$form['lightbox2_lite'] = array(
......
......@@ -28,9 +28,10 @@ function theme_lightbox2_image($variables) {
$node_id = $variables['node_id'];
$field_name = $variables['field_name'];
if(!$variables["lightbox_style"]) {
if (!$variables["lightbox_style"]) {
$path['path'] = file_create_url($item['uri']);
} else {
}
else {
$path['path'] = image_style_url($variables["lightbox_style"], $item['uri']);
}
......@@ -41,7 +42,7 @@ function theme_lightbox2_image($variables) {
$rel .= '[';
$group = variable_get('lightbox2_image_group_node_id', 1);
switch($group) {
switch ($group) {
// No groups
case '0':
break;
......
This diff is collapsed.
<?php
// $Id: lightbox2_handler_field_lightbox2.inc,v 1.1.2.4 2010/03/07 21:38:39 snpower Exp $
/**
* @file
* Contain the integration with views
* A handler to provide a field that is completely custom by the administrator.
*
* @ingroup views_field_handlers
......@@ -142,7 +142,7 @@ class lightbox2_handler_field_lightbox2 extends views_handler_field {
// div is hidden it won't show up as a lightbox. We also specify a group
// in the rel attribute in order to link the whole View together for paging.
$group_name = !empty($this->options['custom_group']) ? $this->options['custom_group'] : ($this->options['rel_group'] ? 'lightbox-popup-' . $this->view->name . '-' . implode('/', $this->view->args) : '');
return "<a href='$link #lightbox-popup-{$i}' rel='lightmodal[{$group_name}|width:" . ($this->options['width'] ? $this->options['width'] : '600px') . ';height:' . ($this->options['height'] ? $this->options['height'] : '600px') . "][" . $caption . "]'>". $tokens["[{$this->options['trigger_field']}]"] ."</a>
return "<a href='$link #lightbox-popup-{$i}' rel='lightmodal[{$group_name}|width:" . ($this->options['width'] ? $this->options['width'] : '600px') . ';height:' . ($this->options['height'] ? $this->options['height'] : '600px') . "][" . $caption . "]'>" . $tokens["[{$this->options['trigger_field']}]"] . "</a>
<div style='display: none;'><div id='lightbox-popup-{$i}' class='lightbox-popup'>$popup</div></div>";
}
else {
......
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