summaryrefslogtreecommitdiff
path: root/modules/digibug
diff options
context:
space:
mode:
Diffstat (limited to 'modules/digibug')
-rw-r--r--modules/digibug/controllers/admin_digibug.php50
-rw-r--r--modules/digibug/controllers/digibug.php60
-rw-r--r--modules/digibug/css/digibug.css91
-rw-r--r--modules/digibug/helpers/digibug.php57
-rw-r--r--modules/digibug/helpers/digibug_installer.php37
-rw-r--r--modules/digibug/helpers/digibug_menu.php27
-rw-r--r--modules/digibug/helpers/digibug_task.php68
-rw-r--r--modules/digibug/helpers/digibug_theme.php20
-rw-r--r--modules/digibug/images/digibug_logo.png (renamed from modules/digibug/css/logo.png)bin17296 -> 17296 bytes
-rw-r--r--modules/digibug/js/digibug.js36
-rw-r--r--modules/digibug/models/digibug_proxy.php (renamed from modules/digibug/models/proxy.php)2
-rw-r--r--modules/digibug/module.info6
-rw-r--r--modules/digibug/views/admin_digibug.html.php76
-rw-r--r--modules/digibug/views/digibug_album.html.php8
-rw-r--r--modules/digibug/views/digibug_form.html.php23
15 files changed, 118 insertions, 443 deletions
diff --git a/modules/digibug/controllers/admin_digibug.php b/modules/digibug/controllers/admin_digibug.php
index 8263fc83..7124338f 100644
--- a/modules/digibug/controllers/admin_digibug.php
+++ b/modules/digibug/controllers/admin_digibug.php
@@ -19,56 +19,8 @@
*/
class Admin_Digibug_Controller extends Admin_Controller {
public function index() {
- print $this->_get_view();
- }
-
- public function basic() {
- access::verify_csrf();
-
- module::set_var("digibug", "mode", "basic");
- message::success(t("Successfully set Digibug mode to basic"));
-
- url::redirect("admin/digibug");
- }
-
- public function advanced() {
- access::verify_csrf();
-
- $form = $this->_get_form();
- if ($form->validate()) {
- module::set_var("digibug", "company_id", $form->group->company_id->value);
- module::set_var("digibug", "event_id", $form->group->event_id->value);
- module::set_var("digibug", "mode", "advanced");
- message::success(t("Successfully set Digibug mode to advanced"));
-
- url::redirect("admin/digibug");
- }
-
- print $this->_get_view($form);
- }
-
- private function _get_view($form=null) {
$v = new Admin_View("admin.html");
$v->content = new View("admin_digibug.html");
- $v->content->mode = module::get_var("digibug", "mode", "basic");
- $v->content->form = empty($form) ? $this->_get_form() : $form;
- return $v;
- }
-
- private function _get_form() {
- $form = new Forge("admin/digibug/advanced", "", "post",
- array("id" => "gAdminForm"));
- $group = $form->group("group");
- $group->input("company_id")
- ->label(t("Company Id"))
- ->rules("required")
- ->value(module::get_var("digibug", "company_id", ""));
- $group->input("event_id")
- ->label(t("Event Id"))
- ->rules("required")
- ->value(module::get_var("digibug", "event_id", ""));
- $group->submit("submit")->value(t("Submit"));
-
- return $form;
+ print $v;
}
} \ No newline at end of file
diff --git a/modules/digibug/controllers/digibug.php b/modules/digibug/controllers/digibug.php
index 3a427149..d881db9b 100644
--- a/modules/digibug/controllers/digibug.php
+++ b/modules/digibug/controllers/digibug.php
@@ -20,55 +20,48 @@
class Digibug_Controller extends Controller {
public function print_photo($id) {
access::verify_csrf();
-
$item = ORM::factory("item", $id);
+ access::required("view_full", $item);
- $proxy = ORM::factory("proxy");
- $proxy->uuid = digibug::uuid();
- $proxy->item_id = $item->id;
- $proxy->save();
-
- $url = url::abs_site("digibug/print_proxy/{$proxy->uuid}");
- if (module::get_var("digibug", "mode", "basic")) {
- $company_id = module::get_var("digibug", "basic_company_id");
- $event_id = module::get_var("digibug", "basic_event_id");
+ if (access::group_can(group::everybody(), "view_full", $item)) {
+ $full_url = $item->file_url(true);
+ $thumb_url = $item->thumb_url(true);
} else {
- $company_id = module::get_var("digibug", "company_id");
- $event_id = module::get_var("digibug", "event_id");
+ $proxy = ORM::factory("digibug_proxy");
+ $proxy->uuid = md5(rand());
+ $proxy->item_id = $item->id;
+ $proxy->save();
+ $full_url = url::abs_site("digibug/print_proxy/full/$proxy->uuid");
+ $thumb_url = url::abs_site("digibug/print_proxy/thumb/$proxy->uuid");
}
+
$v = new View("digibug_form.html");
$v->order_parms = array(
"digibug_api_version" => "100",
- "company_id" => $company_id,
- "event_id" => $event_id,
+ "company_id" => module::get_var("digibug", "company_id"),
+ "event_id" => module::get_var("digibug", "event_id"),
"cmd" => "addimg",
+ "partner_code" => "69",
"return_url" => url::abs_site("digibug/close_window"),
"num_images" => "1",
- "image_1" => $url,
- "thumb_1" => "$url/thumb",
+ "image_1" => $full_url,
+ "thumb_1" => $thumb_url,
"image_height_1" => $item->height,
"image_width_1" => $item->width,
"thumb_height_1" => $item->thumb_height,
"thumb_width_1" => $item->thumb_width,
- "title_1" => $item->title);
+ "title_1" => p::purify($item->title));
print $v;
}
- public function print_proxy($id, $thumb=null) {
- $proxy = ORM::factory("proxy")
- ->where("uuid", $id)
- ->find();
-
- if (!$proxy->loaded) {
- Kohana::show_404();
- }
-
- if (!$proxy->item->loaded) {
+ public function print_proxy($type, $id) {
+ $proxy = ORM::factory("digibug_proxy", array("uuid" => $id));
+ if (!$proxy->loaded || !$proxy->item->loaded) {
Kohana::show_404();
}
- $file = empty($thumb) ? $proxy->item->file_path() : $proxy->item->thumb_path();
+ $file = $type == "full" ? $proxy->item->file_path() : $proxy->item->thumb_path();
if (!file_exists($file)) {
kohana::show_404();
}
@@ -84,12 +77,21 @@ class Digibug_Controller extends Controller {
fclose($fd);
// If the request was for the image and not the thumb, then delete the proxy.
- if (empty($thumb)) {
+ if ($type == "full") {
$proxy->delete();
}
+
+ $this->_clean_expired();
}
public function close_window() {
print "<script type=\"text/javascript\">window.close();</script>";
}
+
+ private function _clean_expired() {
+ Database::instance()>query(
+ "DELETE FROM {digibug_proxy} " .
+ "WHERE request_date <= (CURDATE() - INTERVAL 10 DAY) " .
+ "LIMIT 20");
+ }
} \ No newline at end of file
diff --git a/modules/digibug/css/digibug.css b/modules/digibug/css/digibug.css
deleted file mode 100644
index a09e4551..00000000
--- a/modules/digibug/css/digibug.css
+++ /dev/null
@@ -1,91 +0,0 @@
-.gAdminDigibugIntro {
- background-image: url(logo.png);
- background-repeat: no-repeat;
- padding-bottom: 20px;
- width: 820px;
-}
-
-.gAdminDigibugIntro p {
- font-family: Trebuchet MS,Arial,Verdana,Helvetica,sans-serif;
- font-size: 1.3em;
- font-weight: bold;
- padding-left: 110px;
- padding-top: 15px;
-}
-
-.gDigibugTab {
- width: 820px;
- height: 420px;
-}
-
-.gDigibugTab .gDigibugTitle {
- font-family: Georgia;
- font-size: 20px;
- font-weight: bold;
- padding-bottom: 10px;
-}
-
-.gDigibugTab .gDigibugText {
- font-size: 12px;
- font-weight: bold;
- line-height: 17px;
- padding-bottom: 15px;
-}
-
-.gDigibugListItems ul {
- list-style-type: disc;
- padding-left: 20px;
- font-size: 12px;
- font-weight: bold;
- line-height: 15px;
-}
-
-.gDigibugListItems ul li{
- padding-top: 10px;
-}
-
-.gDigibugRounded {
- background-color:#5C9CCC;
- color: white;
- width: 308px;
- height: 45px;
- text-align: center;
- line-height: 15px;
- margin-top: 10px;
- font-weight: bold;
- font-size: 12px;
- margin-left: 60px;
- margin-right: -50px;
- margin-left: 20px;
- margin-right: 0px;
-}
-
-.gDigibugRounded a {
- color: white !important;
- font-weight: bold;
- text-decoration: underline;
-}
-
-.gDigibugSignIn {
- width: 115px;
- float: left;
-}
-
-.gDigibugSignIn a {
- color: black;
- font-size: 16px;
- font-weight: bold;
- text-decoration: underline;
-}
-
-.gDigibugAdvancedForm {
- float: left;
- padding-left: 30px;
- width: 180px;
-}
-
-.gDigibugPrintButton {
- float: left;
-}
-
-
diff --git a/modules/digibug/helpers/digibug.php b/modules/digibug/helpers/digibug.php
deleted file mode 100644
index 46c9d945..00000000
--- a/modules/digibug/helpers/digibug.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php defined("SYSPATH") or die("No direct script access.");
-/**
- * Gallery - a web based photo album viewer and editor
- * Copyright (C) 2000-2009 Bharat Mediratta
- *
- * 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.
- *
- * 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
- */
-class digibug_Core {
- /**
- * Get a unique id for a print request.
- * Its a good thing we only support linux as this won't work on Windows
- */
- static function uuid() {
- $fp = @fopen("/dev/urandom", "rb");
- $bits = @fread($fp, 16);
- @fclose($fp);
-
- $time_low = bin2hex(substr($bits, 0, 4));
- $time_mid = bin2hex(substr($bits, 4, 2));
- $time_hi_and_version = bin2hex(substr($bits, 6, 2));
- $clock_seq_hi_and_reserved = bin2hex(substr($bits, 8, 2));
- $node = bin2hex ( substr ( $bits, 10, 6 ) );
-
- /**
- * Set the four most significant bits (bits 12 through 15) of the
- * time_hi_and_version field to the 4-bit version number from
- * Section 4.1.3.
- * @see http://tools.ietf.org/html/rfc4122#section-4.1.3
- */
- $time_hi_and_version = hexdec ( $time_hi_and_version );
- $time_hi_and_version = $time_hi_and_version >> 4;
- $time_hi_and_version = $time_hi_and_version | 0x4000;
-
- /**
- * Set the two most significant bits (bits 6 and 7) of the
- * clock_seq_hi_and_reserved to zero and one, respectively.
- */
- $clock_seq_hi_and_reserved = hexdec ( $clock_seq_hi_and_reserved );
- $clock_seq_hi_and_reserved = $clock_seq_hi_and_reserved >> 2;
- $clock_seq_hi_and_reserved = $clock_seq_hi_and_reserved | 0x8000;
-
- return sprintf ('%08s-%04s-%04x-%04x-%012s',
- $time_low, $time_mid, $time_hi_and_version, $clock_seq_hi_and_reserved, $node);
- }
-}
diff --git a/modules/digibug/helpers/digibug_installer.php b/modules/digibug/helpers/digibug_installer.php
index baff2075..1cd78b44 100644
--- a/modules/digibug/helpers/digibug_installer.php
+++ b/modules/digibug/helpers/digibug_installer.php
@@ -19,27 +19,34 @@
*/
class digibug_installer {
static function install() {
- $version = module::get_version("digibug");
- if ($version == 0) {
- Database::instance()
- ->query("CREATE TABLE {proxies} (
- `id` int(9) NOT NULL AUTO_INCREMENT,
- `uuid` char(36) NOT NULL,
- `request_date` TIMESTAMP NOT NULL DEFAULT current_timestamp,
- `item_id` int(9) NOT NULL,
- PRIMARY KEY (`id`))
- ENGINE=InnoDB DEFAULT CHARSET=utf8;");
+ Database::instance()
+ ->query("CREATE TABLE {digibug_proxies} (
+ `id` int(9) NOT NULL AUTO_INCREMENT,
+ `uuid` char(32) NOT NULL,
+ `request_date` TIMESTAMP NOT NULL DEFAULT current_timestamp,
+ `item_id` int(9) NOT NULL,
+ PRIMARY KEY (`id`))
+ ENGINE=InnoDB DEFAULT CHARSET=utf8;");
- module::set_var("digibug", "basic_company_id", "3153");
- module::set_var("digibug", "basic_event_id", "8491");
- module::set_var("digibug", "mode", "basic");
+ module::set_var("digibug", "company_id", "3153");
+ module::set_var("digibug", "event_id", "8491");
+ module::set_version("digibug", 2);
+ }
- module::set_version("digibug", 1);
+ static function upgrade($version) {
+ if ($version == 1) {
+ module::clear_var("digibug", "default_company_id");
+ module::clear_var("digibug", "default_event_id");
+ module::clear_var("digibug", "basic_default_company_id");
+ module::clear_var("digibug", "basic_event_id");
+ module::set_var("digibug", "company_id", "3153");
+ module::set_var("digibug", "event_id", "8491");
+ module::set_version("digibug", $version = 2);
}
}
static function uninstall() {
- Database::instance()->query("DROP TABLE IF EXISTS {proxies}");
+ Database::instance()->query("DROP TABLE IF EXISTS {digibug_proxies}");
module::delete("digibug");
}
}
diff --git a/modules/digibug/helpers/digibug_menu.php b/modules/digibug/helpers/digibug_menu.php
index 6c466031..c95cada2 100644
--- a/modules/digibug/helpers/digibug_menu.php
+++ b/modules/digibug/helpers/digibug_menu.php
@@ -22,18 +22,29 @@ class digibug_menu {
$menu->get("settings_menu")
->append(Menu::factory("link")
->id("digibug_menu")
- ->label(t("Digibug Administration"))
+ ->label(t("Digibug"))
->url(url::site("admin/digibug")));
}
static function photo($menu, $theme) {
$item = $theme->item();
- $csrf = access::csrf_token();
- $menu
- ->append(Menu::factory("link")
- ->id("digibug")
- ->label(t("Print with Digibug"))
- ->url(url::site("digibug/print_photo/{$item->id}?csrf={$csrf}"))
- ->css_id("gDigibugLink"));
+ $menu->append(
+ Menu::factory("link")
+ ->id("digibug")
+ ->label(t("Print with Digibug"))
+ ->url(url::site("digibug/print_photo/$item->id?csrf=$theme->csrf"))
+ ->css_id("gDigibugLink"));
+ }
+
+ static function thumb($menu, $theme, $item) {
+ if ($item->type == "photo" && access::can("view_full", $item)) {
+ $menu->get("options_menu")
+ ->append(
+ Menu::factory("link")
+ ->id("digibug")
+ ->label(t("Print with Digibug"))
+ ->url(url::site("digibug/print_photo/$item->id?csrf=$theme->csrf"))
+ ->css_id("gDigibugLink"));
+ }
}
}
diff --git a/modules/digibug/helpers/digibug_task.php b/modules/digibug/helpers/digibug_task.php
deleted file mode 100644
index 98f79731..00000000
--- a/modules/digibug/helpers/digibug_task.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php defined("SYSPATH") or die("No direct script access.");
-/**
- * Gallery - a web based photo album viewer and editor
- * Copyright (C) 2000-2009 Bharat Mediratta
- *
- * 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.
- *
- * 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
- */
-class digibug_task_Core {
- static function available_tasks() {
- // Delete extra exif_records
- $expired_request_count = Database::instance()->query(
- "SELECT count(*) as print_requests
- FROM {proxies}
- WHERE `request_date` <= (CURDATE() - INTERVAL 10 DAY)")->current()->print_requests;
-
- return array(Task_Definition::factory()
- ->callback("digibug_task::remove_expired")
- ->name(t("Remove Digibug print requests"))
- ->description($expired_request_count
- ? t2("1 Digibug print request has expired",
- "%count Digibug print requests have expired",
- $expired_request_count)
- : t("All print requests are current"))
- ->severity($expired_request_count ? log::WARNING : log::SUCCESS));
- }
-
- static function remove_expired($task) {
- $completed = $task->get("completed", 0);
- $expired = ORM::factory("proxy")
- ->where("request_date <= (CURDATE() - INTERVAL 10 DAY)")
- ->find_all();
- $remaining = $expired->count();
-
- $start = microtime(true);
- foreach ($expired as $proxy) {
- if (microtime(true) - $start > 1.5) {
- break;
- }
- $proxy->delete();
- $completed++;
- $remaining--;
- }
-
- if ($completed + $remaining > 0) {
- $task->percent_complete = (int)(100 * $completed / ($completed + $remaining));
- } else {
- $task->percent_complete = 100;
- }
-
- $task->set("completed", $completed);
- if ($remaining == 0) {
- $task->done = true;
- $task->state = "success";
- }
- }
-}
diff --git a/modules/digibug/helpers/digibug_theme.php b/modules/digibug/helpers/digibug_theme.php
index e52fcc7f..f94d07c6 100644
--- a/modules/digibug/helpers/digibug_theme.php
+++ b/modules/digibug/helpers/digibug_theme.php
@@ -19,24 +19,6 @@
*/
class digibug_theme_Core {
static function head($theme) {
- $head[] = "<link media=\"screen, projection\" rel=\"stylesheet\" type=\"text/css\" href=\"" .
- url::file("modules/digibug/css/digibug.css") . "\" />";
- $head[] = html::script("modules/digibug/js/digibug.js");;
- return implode("\n", $head);
- }
-
- static function admin_head($theme) {
- return "<link media=\"screen, projection\" rel=\"stylesheet\" type=\"text/css\" href=\"" .
- url::file("modules/digibug/css/digibug.css") . "\" />";
- }
-
- static function thumb_bottom($theme, $child) {
- if ($theme->page_type() == "album" && $child->type == "photo") {
- $v = new View("digibug_album.html");
- $v->id = $child->id;
- $v->title = t("Print photo with Digibug");
- return $v->render();
- }
- return "";
+ $theme->script("modules/digibug/js/digibug.js");
}
}
diff --git a/modules/digibug/css/logo.png b/modules/digibug/images/digibug_logo.png
index 5eac2c7d..5eac2c7d 100644
--- a/modules/digibug/css/logo.png
+++ b/modules/digibug/images/digibug_logo.png
Binary files differ
diff --git a/modules/digibug/js/digibug.js b/modules/digibug/js/digibug.js
index 837c8f7f..30bff47d 100644
--- a/modules/digibug/js/digibug.js
+++ b/modules/digibug/js/digibug.js
@@ -1,26 +1,28 @@
$(document).ready(function() {
$(".gDigibugPrintButton a").click(function(e) {
e.preventDefault();
- queue_print(e);
+ return digibug_popup(e.currentTarget.href, { width: 800, height: 600 } );
});
+
$("#gDigibugLink").click(function(e) {
e.preventDefault();
- return queue_print(e);
+ return digibug_popup(e.currentTarget.href, { width: 800, height: 600 } );
});
});
-function popUp(url, options) {
+function digibug_popup(url, options) {
options = $.extend({
/* default options */
- width: 400,
- height: 400,
+ width: '800',
+ height: '600',
target: 'dbPopWin',
scrollbars: 'yes',
resizable: 'no',
menuBar: 'no',
- addressBar: 'yes'}, options);
+ addressBar: 'yes'
+ }, options);
- /* center the window by default. */
+ // center the window by default.
if (!options.winY) {
options.winY = screen.height / 2 - options.height / 2;
};
@@ -32,19 +34,15 @@ function popUp(url, options) {
url,
options['target'],
'width= ' + options.width +
- ',height=' + options.height +
- ',top=' + options.winY +
- ',left=' + options.winX +
- ',scrollbars=' + options.scrollbars +
- ',resizable=' + options.resizable +
- ',menubar=' + options.menuBar +
- ',location=' + options.addressBar
- );
+ ',height=' + options.height +
+ ',top=' + options.winY +
+ ',left=' + options.winX +
+ ',scrollbars=' + options.scrollbars +
+ ',resizable=' + options.resizable +
+ ',menubar=' + options.menuBar +
+ ',location=' + options.addressBar
+ );
return false;
}
-
-function queue_print(e) {
- return popUp(e.currentTarget.href, { width: 800, height: 600 } );
-};
diff --git a/modules/digibug/models/proxy.php b/modules/digibug/models/digibug_proxy.php
index ce10c592..c76afdae 100644
--- a/modules/digibug/models/proxy.php
+++ b/modules/digibug/models/digibug_proxy.php
@@ -17,6 +17,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
-class Proxy_Model extends ORM {
+class Digibug_Proxy_Model extends ORM {
protected $has_one = array("item");
}
diff --git a/modules/digibug/module.info b/modules/digibug/module.info
index 58602c0d..be4e880a 100644
--- a/modules/digibug/module.info
+++ b/modules/digibug/module.info
@@ -1,3 +1,3 @@
-name = Digibug
-description = Digibug Photo Printing Module
-version = 1
+name = "Digibug"
+description = "Digibug Photo Printing Module"
+version = 2
diff --git a/modules/digibug/views/admin_digibug.html.php b/modules/digibug/views/admin_digibug.html.php
index 33ce5f83..7e4436ff 100644
--- a/modules/digibug/views/admin_digibug.html.php
+++ b/modules/digibug/views/admin_digibug.html.php
@@ -1,70 +1,22 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<script type="text/javascript">
- $("#gDigibugTabs").ready(function() {
- $("#gDigibugTabs").tabs({
- event: "mouseover"
- });
- });
-</script>
<div id="gAdminDigibug">
- <h2><?= t("Digibug Adminstration") ?> </h2>
<div class="gAdminDigibugIntro">
+ <img id="DigibugLogo" src="<?= url::file("modules/digibug/images/digibug_logo.png") ?>">
+ <h2> <?= t("Digibug Photo Printing") ?> </h2>
<p>
- <?= t("Digibug offers you two options for turning your photos into a wide variety of prints, gifts and games. Choose your solution and get started today!") ?>
+ <?= t("Turn your photos into a wide variety of prints, gifts and games!") ?>
</p>
- </div>
- <div id="gDigibugTabs">
- <ul>
- <li><a href="#gDigibugTabBasic"><?= t("Basic") ?></a></li>
- <li><a href="#gDigibugTabAdvanced"><?= t("Advanced") ?></a></li>
+
+ <ul id="gMessage">
+ <li class="gSuccess">
+ <?= t("You're ready to print photos!") ?>
+ </li>
</ul>
- <div id="gDigibugTabBasic" class="gDigibugTab">
- <div class="gDigibugTitle">
- <?= t("Digibug Basic") ?>
- <br/>
- <?= t("Fast Easy Photo Fulfillment") ?>
- </div>
- <div class="gDigibugText">
- <?= t("Power up your Gallery with professional level fulfillment from Kodak. Just use Digibug Basic and there's nothing else to do - no registration, no administration, no hassles.") ?>
- </div>
- <div class="gDigibugListItems">
- <ul>
- <li><?= t("Matte and Glossy prints, from 4x6 to as big as 30x40") ?></li>
- <li><?= t("Great photo gifts like canvases, apparel, bags, puzzles, mugs and sports memorabilia and more") ?></li>
- <li><?= t("Outstanding quality and customer service") ?></li>
- </ul>
- </div>
- <div class="gDigibugRounded ui-corner-all">
- <br/>
- <? if ($mode == "basic"): ?>
- <?= t("You are currently using Basic mode!") ?>
- <? else: ?>
- <a href='<?= url::site("admin/digibug/basic?csrf=$csrf") ?>'><?= t("Click Here") ?></a>
- <?= t(" to switch back to basic") ?>
- <? endif ?>
- </div>
- </div>
- <div id="gDigibugTabAdvanced" class="gDigibugTab">
- <div class="gDigibugTitle">
- <?= t("Digibug ADVANCED") ?>
- <br/>
- <?= t("The Pro\'s Solution") ?>
- </div>
- <div class="gDigibugText">
- <?= t("Digibug ADVANCED allows you to set your own price for photos and gifts. Simply provide us with your account information and we'll send you a check each month with your profits. It's the perfect online retail business solution for a photographer - no inventory, no overhead... just profits!") ?>
- </div>
- <div class="gDigibugText">
- <?= t("Enjoy the same range of professional level photo prints and gifts, but set your own price and charge what you believe your photos are worth. We'll take care of the rest.") ?>
- </div>
- <div style="width: 120px;" class="gDigibugText gDigibugSignIn">
- <?= t("New to Digibug ADVANCED?") ?>
- <br/> <br/>
- <a href="http://www.digibug.com/signup.php" style=""><?= t("Sign up") ?></a><?= t(" to get started") ?>
- </div>
- <div class="gDigibugAdvancedForm">
- <div class="gDigibugText"><?= t("Do you have a Digibug Company ID and Event ID?") ?></div>
- <?= $form ?>
- </div>
- </div>
+
+ <p>
+ <?= t("You don't need an account with Digibug, but if you <a href=\"%signup_url\">register with Digibug</a> and enter your Digibug id in the <a href=\"%advanced_settings_url\">Advanced Settings</a> page you can make money off of your photos!",
+ array("signup_url" => "http://www.digibug.com/signup.php",
+ "advanced_settings_url" => url::site("admin/advanced_settings"))) ?>
+ </p>
</div>
</div>
diff --git a/modules/digibug/views/digibug_album.html.php b/modules/digibug/views/digibug_album.html.php
deleted file mode 100644
index c3337324..00000000
--- a/modules/digibug/views/digibug_album.html.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php defined("SYSPATH") or die("No direct script access.") ?>
-<div class="gDigibugPrintButton">
- <a class="gButtonLink ui-corner-all ui-state-default ui-icon-left"
- href="<?= url::site("digibug/print_photo/$id?csrf={$csrf}") ?>"
- title="<?= $title ?>">
- <span class="ui-icon ui-icon-print"><?= $title ?></span>
- </a>
-</div> \ No newline at end of file
diff --git a/modules/digibug/views/digibug_form.html.php b/modules/digibug/views/digibug_form.html.php
index c2cd889e..c6994cbe 100644
--- a/modules/digibug/views/digibug_form.html.php
+++ b/modules/digibug/views/digibug_form.html.php
@@ -1,16 +1,11 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<html>
-<head>
- <?= html::script("lib/jquery.js") ?>
- <script type="text/javascript">
- $("body form").ready(function() {
- $("body form").submit();
- });
- </script>
-</head>
-<body>
- <?= form::open("http://www.digibug.com/dapi/order.php") ?>
- <?= form::hidden($order_parms) ?>
- <?= form::close() ?>
-</body>
-</html> \ No newline at end of file
+ <body>
+ <?= form::open("http://www.digibug.com/dapi/order.php") ?>
+ <?= form::hidden($order_parms) ?>
+ <?= form::close() ?>
+ <script type="text/javascript">
+ document.forms[0].submit();
+ </script>
+ </body>
+</html>