Changeset 514
- Timestamp:
- 04/22/05 19:38:48 (4 years ago)
- Files:
-
- trunk/jaws/AUTHORS (modified) (1 diff)
- trunk/jaws/html/gadgets/Phoo/Phoo.php (modified) (5 diffs)
- trunk/jaws/html/gadgets/Phoo/PhooModel.php (modified) (4 diffs)
- trunk/jaws/html/gadgets/Phoo/languages/en/Phoo.php (modified) (1 diff)
- trunk/jaws/html/gadgets/Phoo/templates/ViewImage.html (modified) (1 diff)
- trunk/jaws/html/install/stages/WriteConfig.php (modified) (1 diff)
- trunk/jaws/html/install/stages/WriteConfig/templates/JawsConfig.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/jaws/AUTHORS
r69 r514 5 5 Jorge Gallegos <kad@gulags.org> 6 6 Mirco Bauer <meebey@meebey.net> 7 Helgi �rmar �rbj�son <dufuz@php.net> trunk/jaws/html/gadgets/Phoo/Phoo.php
r505 r514 206 206 $albumid = isset ($_REQUEST["albumid"]) ? $_REQUEST["albumid"] : ""; 207 207 208 $image = $this->_Model->GetImage ($id, $albumid); 209 if (!JawsError::IsError ($image)) { 208 $image = $this->_Model->GetImage($id, $albumid); 209 $settings = $this->_Model->GetSettings(); 210 211 if (!JawsError::IsError($image)) { 210 212 $t->SetVariable("name",$image["title"]); 211 213 $t->SetVariable("albumid",$albumid); 212 214 $t->SetVariable("description",$image["description"]); 213 $t->SetVariable("image", $image["image"]);214 $t->SetVariable( "original",$image["original"]);215 215 $t->SetVariable("image", $image["image"]); 216 $t->SetVariable('original', $image["original"]); 217 216 218 // Comment stuff 217 219 if ($image["allow_comments"] == 1) { … … 255 257 $t->SetVariable ("thumbs", _t("PHOO_THUMBS")); 256 258 $t->ParseBlock ("ViewImage/navigation"); 259 260 // show if the original was kept 261 if ($settings['keep_original'] == 'true') { 262 $t->SetBlock('ViewImage/original_a'); 263 $t->SetVariable('original', $image["original"]); 264 $t->ParseBlock('ViewImage/original_a'); 265 $t->SetBlock('ViewImage/original_b'); 266 $t->ParseBlock('ViewImage/original_b'); 267 } 257 268 269 258 270 // EXIF STUFF 259 if ( isset ($image["exif"]) && count ($image["exif"]) > 0) {271 if ($settings['show_exif_info'] == 'true' && isset ($image["exif"]) && count ($image["exif"]) > 0) { 260 272 $datatext = ''; 261 273 if (!empty($image["exif"]["width"])) { … … 1443 1455 $commCombo->SetDefault($settings['allow_comments']); 1444 1456 1457 // Keep original 1458 $keepCombo =& new Combo("keep_original"); 1459 $keepCombo->SetTitle (_t("PHOO_KEEP_ORIGINAL")); 1460 $keepCombo->AddOption (_t("GLOBAL_ENABLED_UPPER"), "true"); 1461 $keepCombo->AddOption (_t("GLOBAL_DISABLED_UPPER"), "false"); 1462 $keepCombo->SetDefault($settings['keep_original']); 1463 1464 // Show EXIF info 1465 $exifCombo =& new Combo("show_exif_info"); 1466 $exifCombo->SetTitle (_t("PHOO_SHOW_EXIF_INFO")); 1467 $exifCombo->AddOption (_t("GLOBAL_ENABLED_UPPER"), "true"); 1468 $exifCombo->AddOption (_t("GLOBAL_DISABLED_UPPER"), "false"); 1469 $exifCombo->SetDefault($settings['show_exif_info']); 1470 1445 1471 // Moblog 1446 1472 $albums = $this->_Model->GetAlbumsByName(); … … 1485 1511 1486 1512 1487 $fieldset->Add ($viewCombo); 1488 $fieldset->Add ($resizeCombo); 1489 $fieldset->Add ($statusCombo); 1490 $fieldset->Add ($commCombo); 1491 $fieldset->Add ($moblogAlbumCombo); 1492 $fieldset->Add ($moblogLimitCombo); 1493 $fieldset->Add ($photoblogAlbumCombo); 1494 $fieldset->Add ($photoblogLimitCombo); 1513 $fieldset->Add($viewCombo); 1514 $fieldset->Add($resizeCombo); 1515 $fieldset->Add($statusCombo); 1516 $fieldset->Add($commCombo); 1517 $fieldset->Add($keepCombo); 1518 $fieldset->Add($exifCombo); 1519 $fieldset->Add($moblogAlbumCombo); 1520 $fieldset->Add($moblogLimitCombo); 1521 $fieldset->Add($photoblogAlbumCombo); 1522 $fieldset->Add($photoblogLimitCombo); 1495 1523 $fieldset->SetDirection ("vertical"); 1496 1524 $form->Add ($fieldset); … … 1526 1554 { 1527 1555 $GLOBALS["session"]->CheckPermission ("Phoo", "Settings"); 1528 $this->_Model->SaveSettings ( $_POST["default_action"], 1529 $_POST["resize_method"], 1530 $_POST["published"], 1531 $_POST["allow_comments"], 1532 $_POST["moblog_album"], 1533 $_POST["moblog_limit"], 1534 $_POST["photoblog_album"], 1535 $_POST["photoblog_limit"]); 1556 $this->_Model->SaveSettings ( 1557 $_POST["default_action"], 1558 $_POST["resize_method"], 1559 $_POST["published"], 1560 $_POST["allow_comments"], 1561 $_POST["moblog_album"], 1562 $_POST["moblog_limit"], 1563 $_POST["photoblog_album"], 1564 $_POST["photoblog_limit"], 1565 $_POST['show_exif_info'], 1566 $_POST['keep_original'] 1567 ); 1536 1568 JawsHeader::Location ("admin.php?gadget=Phoo&action=AdditionalSettings"); 1537 1569 } trunk/jaws/html/gadgets/Phoo/PhooModel.php
r512 r514 58 58 59 59 // Registry keys 60 $GLOBALS["app"]->Registry->NewKey ("/gadgets/Phoo/default_action", "AlbumList"); 61 $GLOBALS["app"]->Registry->NewKey ("/gadgets/Phoo/resize_method", "ImageMagick"); 62 $GLOBALS["app"]->Registry->NewKey ("/gadgets/Phoo/thumbsize", "133x100"); 63 $GLOBALS["app"]->Registry->NewKey ("/gadgets/Phoo/mediumsize", "400x300"); 64 $GLOBALS["app"]->Registry->NewKey ("/gadgets/Phoo/moblog_album", ""); 65 $GLOBALS["app"]->Registry->NewKey ("/gadgets/Phoo/moblog_limit", "10"); 66 $GLOBALS["app"]->Registry->NewKey ("/gadgets/Phoo/photoblog_album", ""); 67 $GLOBALS["app"]->Registry->NewKey ("/gadgets/Phoo/photoblog_limit", "5"); 68 $GLOBALS["app"]->Registry->NewKey ("/gadgets/Phoo/allow_comments", "true"); 69 $GLOBALS["app"]->Registry->NewKey ("/gadgets/Phoo/published", "true"); 70 $GLOBALS["app"]->Registry->NewKey ("/gadgets/Phoo/plugabble", "true"); 60 $GLOBALS["app"]->Registry->NewKey("/gadgets/Phoo/default_action", "AlbumList"); 61 $GLOBALS["app"]->Registry->NewKey("/gadgets/Phoo/resize_method", "ImageMagick"); 62 $GLOBALS["app"]->Registry->NewKey("/gadgets/Phoo/thumbsize", "133x100"); 63 $GLOBALS["app"]->Registry->NewKey("/gadgets/Phoo/mediumsize", "400x300"); 64 $GLOBALS["app"]->Registry->NewKey("/gadgets/Phoo/moblog_album", ""); 65 $GLOBALS["app"]->Registry->NewKey("/gadgets/Phoo/moblog_limit", "10"); 66 $GLOBALS["app"]->Registry->NewKey("/gadgets/Phoo/photoblog_album", ""); 67 $GLOBALS["app"]->Registry->NewKey("/gadgets/Phoo/photoblog_limit", "5"); 68 $GLOBALS["app"]->Registry->NewKey("/gadgets/Phoo/allow_comments", "true"); 69 $GLOBALS["app"]->Registry->NewKey("/gadgets/Phoo/published", "true"); 70 $GLOBALS["app"]->Registry->NewKey("/gadgets/Phoo/plugabble", "true"); 71 $GLOBALS["app"]->Registry->NewKey("/gadgets/Phoo/show_exif_info", "true"); 72 $GLOBALS["app"]->Registry->NewKey("/gadgets/Phoo/keep_original", "true"); 71 73 72 74 // ACL keys … … 1616 1618 $ret["allow_comments"] = $GLOBALS["app"]->Registry->Get ("/gadgets/Phoo/allow_comments"); 1617 1619 $ret["published"] = $GLOBALS["app"]->Registry->Get ("/gadgets/Phoo/published"); 1620 $ret['show_exif_info'] = $GLOBALS['app']->Registry->Get('/gadgets/Phoo/show_exif_info'); 1621 $ret['keep_original'] = $GLOBALS['app']->Registry->Get('/gadgets/Phoo/keep_original'); 1618 1622 return $ret; 1619 1623 } … … 1623 1627 * @access public 1624 1628 */ 1625 function SaveSettings($default_action, $resize_method, $published, $allow_comments, $moblog_album, $moblog_limit, $photoblog_album, $photoblog_limit )1629 function SaveSettings($default_action, $resize_method, $published, $allow_comments, $moblog_album, $moblog_limit, $photoblog_album, $photoblog_limit, $show_exif_info, $keep_original) 1626 1630 { 1627 1631 $rs = array (); … … 1635 1639 $rs[6] = $GLOBALS["app"]->Registry->Set ("/gadgets/Phoo/photoblog_album", $photoblog_album); 1636 1640 $rs[7] = $GLOBALS["app"]->Registry->Set ("/gadgets/Phoo/photoblog_limit", $photoblog_limit); 1641 $rs[8] = $GLOBALS['app']->Registry->Set('/gadgets/Phoo/show_exif_info', $show_exif_info); 1642 $rs[9] = $GLOBALS['app']->Registry->Set('/gadgets/Phoo/keep_original', $keep_original); 1637 1643 1638 1644 foreach ($rs as $r) { trunk/jaws/html/gadgets/Phoo/languages/en/Phoo.php
r374 r514 59 59 define ("_EN_PHOO_CREATE_NEW_ALBUM", "Create new album"); 60 60 define ("_EN_PHOO_DELETE_ALBUM", "Delete album"); 61 define('_EN_PHOO_KEEP_ORIGINAL', 'Keep original image'); 62 define('_EN_PHOO_SHOW_EXIF_INFO', 'Show EXIF info'); 61 63 62 64 define ("_EN_PHOO_SAVE_CHANGES", "Save Changes"); trunk/jaws/html/gadgets/Phoo/templates/ViewImage.html
r70 r514 11 11 <!-- END navigation --> 12 12 <div align="center"> 13 <a href="{original}"><img style="border: 1px solid #999; padding: 8px;" src="{image}" border="0" alt="" /></a> 13 <!-- BEGIN original_a --> 14 <a href="{original}"> 15 <!-- END original_a --> 16 <img style="border: 1px solid #999; padding: 8px;" src="{image}" border="0" alt="" /> 17 <!-- BEGIN original_b --> 18 </a> 19 <!-- END original_b --> 14 20 </div> 21 15 22 <p>{description}</p> 23 16 24 <!-- BEGIN exif --> 17 25 <div style="border:1px solid #ddd; padding: 4px;"> trunk/jaws/html/install/stages/WriteConfig.php
r388 r514 81 81 { 82 82 // following what the web page says (choice 1) and assume that the user has created it already 83 if (file_exists($GLOBALS["path"]."include/JawsConfig.php")) 83 if (file_exists($GLOBALS["path"]."include/JawsConfig.php")) { 84 84 return true; 85 } 85 86 86 87 // create a new one if the dir is writeable trunk/jaws/html/install/stages/WriteConfig/templates/JawsConfig.php
r224 r514 9 9 10 10 // Path where Jaws is installed 11 $GLOBALS[ "path"] = substr(dirname(__FILE__),0,-7);11 $GLOBALS['path'] = substr(dirname(__FILE__), 0, -7); 12 12 13 13 $db = array (); //DONT RENAME/DELETE THIS VARIABLE!! … … 21 21 * DB username 22 22 */ 23 $db[ "user"] = "{db_user}";23 $db['user'] = "{db_user}"; 24 24 25 25 /** 26 26 * DB Password 27 27 */ 28 $db[ "password"] = "{db_pass}";28 $db['password'] = "{db_pass}"; 29 29 30 30 /** 31 31 * DB Name 32 32 */ 33 $db[ "name"] = "{db_name}";33 $db['name'] = "{db_name}"; 34 34 35 35 /** 36 36 * DB Server host 37 37 */ 38 $db[ "host"] = "{db_host}";38 $db['host'] = "{db_host}"; 39 39 40 40 /** … … 43 43 * Currently we just support the following DB Drivers: MySQL 44 44 */ 45 $db[ "driver"] = "MySQL";45 $db['driver'] = "MySQL"; 46 46 47 47 /** … … 50 50 * Optional, just make sure it has an empty value 51 51 */ 52 $db[ "prefix"] = "{db_prefix}";52 $db['prefix'] = "{db_prefix}"; 53 53 54 54 /**
