Skip to content

Commit

Permalink
Removed display desc under thumbnail feature
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroenrnl committed Oct 19, 2012
1 parent fb24567 commit fca4a67
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 29 deletions.
3 changes: 2 additions & 1 deletion php/config.inc.php
Expand Up @@ -232,7 +232,8 @@
// the maximum number of characters of a description to display // the maximum number of characters of a description to display
// under a thumbnail (see also desc_thumbnail pref). Set this // under a thumbnail (see also desc_thumbnail pref). Set this
// to 0 to disable this feature (and override a user's pref). // to 0 to disable this feature (and override a user's pref).
define('MAX_THUMB_DESC', 40); // Deprecated
//define('MAX_THUMB_DESC', 40);


define('THUMB_SIZE', 120); define('THUMB_SIZE', 120);
define('MID_SIZE', 480); define('MID_SIZE', 480);
Expand Down
4 changes: 0 additions & 4 deletions php/photo_search.inc.php
Expand Up @@ -29,10 +29,6 @@ function get_photos($vars, $offset, $rows, &$thumbnails, $user = null) {
if(!is_numeric($offset)) { die("offset must be numeric"); } if(!is_numeric($offset)) { die("offset must be numeric"); }
if(!is_numeric($rows)) { die("rows must be numeric"); } if(!is_numeric($rows)) { die("rows must be numeric"); }


if (MAX_THUMB_DESC && $user && $user->prefs->get("desc_thumbnails")) {
$select .= ", ph.description";
}

$from_clause=DB_PREFIX . "photos as ph"; $from_clause=DB_PREFIX . "photos as ph";


if ($user && !$user->is_admin()) { if ($user && !$user->is_admin()) {
Expand Down
12 changes: 0 additions & 12 deletions php/photos.php
Expand Up @@ -153,10 +153,6 @@
</form> </form>
<br> <br>
<?php <?php
if (MAX_THUMB_DESC && $user->prefs->get("desc_thumbnails")) {
$desc_thumbnails = true;
}

for ($i = 0; $i < $num; $i++) { for ($i = 0; $i < $num; $i++) {


if ($i > 0 && $i % $_cols == 0) { if ($i > 0 && $i % $_cols == 0) {
Expand All @@ -173,16 +169,8 @@
} else { } else {
echo $thumbnails[$i]->get_thumbnail_link("photo.php?" . update_query_string($vars, "_off", $offset + $i, $ignore)) . "\n"; echo $thumbnails[$i]->get_thumbnail_link("photo.php?" . update_query_string($vars, "_off", $offset + $i, $ignore)) . "\n";
} }
if (!empty($desc_thumbnails) && $thumbnails[$i]->get("description")) {
?>
<br>
<div class="thumbdesc"><?php echo substr($thumbnails[$i]->get("description"), 0, MAX_THUMB_DESC) ?></div>
<?php
if (strlen($thumbnails[$i]->get("description")) > MAX_THUMB_DESC) { echo "..."; }
}


if (!empty($lightbox)) { if (!empty($lightbox)) {
if (!isset($desc_thumbnails)) { echo "<br>\n"; }
?> ?>
<div class="actionlink"><a href="photos.php?<?php echo update_query_string($vars, "_photo_id", $thumbnails[$i]->get("photo_id"), $ignore) ?>">x</a></div> <div class="actionlink"><a href="photos.php?<?php echo update_query_string($vars, "_photo_id", $thumbnails[$i]->get("photo_id"), $ignore) ?>">x</a></div>
<?php <?php
Expand Down
12 changes: 0 additions & 12 deletions php/prefs.php
Expand Up @@ -112,18 +112,6 @@
<dd> <dd>
<?php echo create_text_input("recent_photo_days", $user->prefs->get("recent_photo_days"), 4, 4) ?> <?php echo create_text_input("recent_photo_days", $user->prefs->get("recent_photo_days"), 4, 4) ?>
</dd> </dd>
<?php
if (MAX_THUMB_DESC) {
?>
<dt>
<?php echo translate("show descriptions under thumbnails") ?>
</dt>
<dd>
<?php echo create_pulldown("desc_thumbnails", $user->prefs->get("desc_thumbnails"), array("1" => translate("Yes",0), "0" => translate("No",0)) ) ?>
</dd>
<?php
}
?>
<dt> <dt>
<?php echo translate("open fullsize photo in new window") ?> <?php echo translate("open fullsize photo in new window") ?>
</dt> </dt>
Expand Down
2 changes: 2 additions & 0 deletions sql/zoph_update-0.10.sql
Expand Up @@ -31,3 +31,5 @@ CREATE TABLE zoph_conf (
timestamp timestamp, timestamp timestamp,
PRIMARY kEY (conf_id) PRIMARY kEY (conf_id)
) EGINE=MyISAM; ) EGINE=MyISAM;

ALTER TABLE zoph_prefs DROP COLUMN desc_thumbnails;

0 comments on commit fca4a67

Please sign in to comment.