Skip to content
Browse files

Fixed several table width layout issues.

  • Loading branch information...
1 parent 2903cee commit 3afaad0bc85dfccc4872aee3cbd8d82bd4e24272 eenemeenemuu committed May 3, 2012
View
1 cpg1.5.x/CHANGELOG.txt
@@ -23,6 +23,7 @@ Changelog
[S] = Security fix (issues that are related to security)
*********************************************
+2012-05-03 [C] Fixed several table width layout issues {eenemeenemuu}
2012-04-26 [C] Fixed named anchors in plugin manager {eenemeenemuu}
2012-04-20 [B] Fixed handling of intermediate-sized files in admin tools and during upload (thread ID 74769) {eenemeenemuu}
2012-04-20 [B] Fixed "newer/older than" search feature {eenemeenemuu}
View
10 cpg1.5.x/include/themes.inc.php
@@ -2754,7 +2754,7 @@ function theme_display_album_list_cat(&$alb_list, $nbAlb, $cat, $page, $total_pa
$column_width = ceil(100 / $columns);
$thumb_cell_width = $CONFIG['alb_list_thumb_size'] + 2;
- starttable('100%');
+ starttable('99%'); // '100%' destroys the layout if $CONFIG['main_table_width'] is a pixel value
if ($STATS_IN_ALB_LIST) {
$params = array('{STATISTICS}' => $statistics,
@@ -3672,7 +3672,7 @@ function theme_html_rating_box()
'{TITLE}' => $rate_title,
'{VOTES}' => $votes,
'{LOCATION}' => $location,
- '{WIDTH}' => $CONFIG['picture_table_width'],
+ '{WIDTH}' => $CONFIG['picture_table_width'] == "100%" ? $CONFIG['main_table_width'] : $CONFIG['picture_table_width'],
);
if ($CONFIG['old_style_rating']) {
@@ -3908,7 +3908,7 @@ function theme_html_comments($pid)
'{IP}' => $ip,
'{REPORT_COMMENT_TITLE}' => &$lang_display_comments['report_comment_title'],
'{REPORT_COMMENT_ICON}' => cpg_fetch_icon('report', 0),
- '{WIDTH}' => $CONFIG['picture_table_width'],
+ '{WIDTH}' => $CONFIG['picture_table_width'] == "100%" ? $CONFIG['main_table_width'] : $CONFIG['picture_table_width'],
'{FORM_TOKEN}' => $form_token,
'{TIMESTAMP}' => $timestamp,
);
@@ -3957,7 +3957,7 @@ function theme_html_comments($pid)
'{DEFAULT_USERNAME}' => $lang_display_comments['your_name'],
'{DEFAULT_USERNAME_MESSAGE}' => $lang_display_comments['default_username_message'],
'{SMILIES}' => '',
- '{WIDTH}' => $CONFIG['picture_table_width'],
+ '{WIDTH}' => $CONFIG['picture_table_width'] == "100%" ? $CONFIG['main_table_width'] : $CONFIG['picture_table_width'],
'{HELP_ICON}' => $captionLabel,
'{FORM_TOKEN}' => $form_token,
'{TIMESTAMP}' => $timestamp,
@@ -3987,7 +3987,7 @@ function theme_html_comments($pid)
template_extract_block($template_add_your_comment, 'smilies');
template_extract_block($template_add_your_comment, 'submit');
$params = array('{ADD_YOUR_COMMENT}' => $lang_display_comments['add_your_comment'],
- '{WIDTH}' => $CONFIG['picture_table_width'],
+ '{WIDTH}' => $CONFIG['picture_table_width'] == "100%" ? $CONFIG['main_table_width'] : $CONFIG['picture_table_width'],
'{LOGIN_TO_COMMENT}' => sprintf($lang_display_comments['log_in_to_comment'], '<a href="login.php?referer='.$REFERER.'">', '</a>'),
'{HELP_ICON}' => '',
);
View
10 cpg1.5.x/themes/sample/theme.php
@@ -2751,7 +2751,7 @@ function theme_display_album_list_cat(&$alb_list, $nbAlb, $cat, $page, $total_pa
$column_width = ceil(100 / $columns);
$thumb_cell_width = $CONFIG['alb_list_thumb_size'] + 2;
- starttable('100%');
+ starttable('99%'); // '100%' destroys the layout if $CONFIG['main_table_width'] is a pixel value
if ($STATS_IN_ALB_LIST) {
$params = array('{STATISTICS}' => $statistics,
@@ -3669,7 +3669,7 @@ function theme_html_rating_box()
'{TITLE}' => $rate_title,
'{VOTES}' => $votes,
'{LOCATION}' => $location,
- '{WIDTH}' => $CONFIG['picture_table_width'],
+ '{WIDTH}' => $CONFIG['picture_table_width'] == "100%" ? $CONFIG['main_table_width'] : $CONFIG['picture_table_width'],
);
if ($CONFIG['old_style_rating']) {
@@ -3905,7 +3905,7 @@ function theme_html_comments($pid)
'{IP}' => $ip,
'{REPORT_COMMENT_TITLE}' => &$lang_display_comments['report_comment_title'],
'{REPORT_COMMENT_ICON}' => cpg_fetch_icon('report', 0),
- '{WIDTH}' => $CONFIG['picture_table_width'],
+ '{WIDTH}' => $CONFIG['picture_table_width'] == "100%" ? $CONFIG['main_table_width'] : $CONFIG['picture_table_width'],
'{FORM_TOKEN}' => $form_token,
'{TIMESTAMP}' => $timestamp,
);
@@ -3954,7 +3954,7 @@ function theme_html_comments($pid)
'{DEFAULT_USERNAME}' => $lang_display_comments['your_name'],
'{DEFAULT_USERNAME_MESSAGE}' => $lang_display_comments['default_username_message'],
'{SMILIES}' => '',
- '{WIDTH}' => $CONFIG['picture_table_width'],
+ '{WIDTH}' => $CONFIG['picture_table_width'] == "100%" ? $CONFIG['main_table_width'] : $CONFIG['picture_table_width'],
'{HELP_ICON}' => $captionLabel,
'{FORM_TOKEN}' => $form_token,
'{TIMESTAMP}' => $timestamp,
@@ -3984,7 +3984,7 @@ function theme_html_comments($pid)
template_extract_block($template_add_your_comment, 'smilies');
template_extract_block($template_add_your_comment, 'submit');
$params = array('{ADD_YOUR_COMMENT}' => $lang_display_comments['add_your_comment'],
- '{WIDTH}' => $CONFIG['picture_table_width'],
+ '{WIDTH}' => $CONFIG['picture_table_width'] == "100%" ? $CONFIG['main_table_width'] : $CONFIG['picture_table_width'],
'{LOGIN_TO_COMMENT}' => sprintf($lang_display_comments['log_in_to_comment'], '<a href="login.php?referer='.$REFERER.'">', '</a>'),
'{HELP_ICON}' => '',
);
View
1 cpg1.6.x/CHANGELOG.txt
@@ -23,6 +23,7 @@ Changelog
[S] = Security fix (issues that are related to security)
*********************************************
+2012-05-03 [C] Fixed several table width layout issues {eenemeenemuu}
2012-04-26 [C] Fixed named anchors in plugin manager {eenemeenemuu}
2012-04-20 [B] Fixed handling of intermediate-sized files in admin tools and during upload (thread ID 74769) {eenemeenemuu}
2012-04-20 [B] Fixed "newer/older than" search feature {eenemeenemuu}
View
10 cpg1.6.x/include/themes.inc.php
@@ -2754,7 +2754,7 @@ function theme_display_album_list_cat(&$alb_list, $nbAlb, $cat, $page, $total_pa
$column_width = ceil(100 / $columns);
$thumb_cell_width = $CONFIG['alb_list_thumb_size'] + 2;
- starttable('100%');
+ starttable('99%'); // '100%' destroys the layout if $CONFIG['main_table_width'] is a pixel value
if ($STATS_IN_ALB_LIST) {
$params = array('{STATISTICS}' => $statistics,
@@ -3672,7 +3672,7 @@ function theme_html_rating_box()
'{TITLE}' => $rate_title,
'{VOTES}' => $votes,
'{LOCATION}' => $location,
- '{WIDTH}' => $CONFIG['picture_table_width'],
+ '{WIDTH}' => $CONFIG['picture_table_width'] == "100%" ? $CONFIG['main_table_width'] : $CONFIG['picture_table_width'],
);
if ($CONFIG['old_style_rating']) {
@@ -3908,7 +3908,7 @@ function theme_html_comments($pid)
'{IP}' => $ip,
'{REPORT_COMMENT_TITLE}' => &$lang_display_comments['report_comment_title'],
'{REPORT_COMMENT_ICON}' => cpg_fetch_icon('report', 0),
- '{WIDTH}' => $CONFIG['picture_table_width'],
+ '{WIDTH}' => $CONFIG['picture_table_width'] == "100%" ? $CONFIG['main_table_width'] : $CONFIG['picture_table_width'],
'{FORM_TOKEN}' => $form_token,
'{TIMESTAMP}' => $timestamp,
);
@@ -3957,7 +3957,7 @@ function theme_html_comments($pid)
'{DEFAULT_USERNAME}' => $lang_display_comments['your_name'],
'{DEFAULT_USERNAME_MESSAGE}' => $lang_display_comments['default_username_message'],
'{SMILIES}' => '',
- '{WIDTH}' => $CONFIG['picture_table_width'],
+ '{WIDTH}' => $CONFIG['picture_table_width'] == "100%" ? $CONFIG['main_table_width'] : $CONFIG['picture_table_width'],
'{HELP_ICON}' => $captionLabel,
'{FORM_TOKEN}' => $form_token,
'{TIMESTAMP}' => $timestamp,
@@ -3987,7 +3987,7 @@ function theme_html_comments($pid)
template_extract_block($template_add_your_comment, 'smilies');
template_extract_block($template_add_your_comment, 'submit');
$params = array('{ADD_YOUR_COMMENT}' => $lang_display_comments['add_your_comment'],
- '{WIDTH}' => $CONFIG['picture_table_width'],
+ '{WIDTH}' => $CONFIG['picture_table_width'] == "100%" ? $CONFIG['main_table_width'] : $CONFIG['picture_table_width'],
'{LOGIN_TO_COMMENT}' => sprintf($lang_display_comments['log_in_to_comment'], '<a href="login.php?referer='.$REFERER.'">', '</a>'),
'{HELP_ICON}' => '',
);
View
10 cpg1.6.x/themes/sample/theme.php
@@ -2751,7 +2751,7 @@ function theme_display_album_list_cat(&$alb_list, $nbAlb, $cat, $page, $total_pa
$column_width = ceil(100 / $columns);
$thumb_cell_width = $CONFIG['alb_list_thumb_size'] + 2;
- starttable('100%');
+ starttable('99%'); // '100%' destroys the layout if $CONFIG['main_table_width'] is a pixel value
if ($STATS_IN_ALB_LIST) {
$params = array('{STATISTICS}' => $statistics,
@@ -3669,7 +3669,7 @@ function theme_html_rating_box()
'{TITLE}' => $rate_title,
'{VOTES}' => $votes,
'{LOCATION}' => $location,
- '{WIDTH}' => $CONFIG['picture_table_width'],
+ '{WIDTH}' => $CONFIG['picture_table_width'] == "100%" ? $CONFIG['main_table_width'] : $CONFIG['picture_table_width'],
);
if ($CONFIG['old_style_rating']) {
@@ -3905,7 +3905,7 @@ function theme_html_comments($pid)
'{IP}' => $ip,
'{REPORT_COMMENT_TITLE}' => &$lang_display_comments['report_comment_title'],
'{REPORT_COMMENT_ICON}' => cpg_fetch_icon('report', 0),
- '{WIDTH}' => $CONFIG['picture_table_width'],
+ '{WIDTH}' => $CONFIG['picture_table_width'] == "100%" ? $CONFIG['main_table_width'] : $CONFIG['picture_table_width'],
'{FORM_TOKEN}' => $form_token,
'{TIMESTAMP}' => $timestamp,
);
@@ -3954,7 +3954,7 @@ function theme_html_comments($pid)
'{DEFAULT_USERNAME}' => $lang_display_comments['your_name'],
'{DEFAULT_USERNAME_MESSAGE}' => $lang_display_comments['default_username_message'],
'{SMILIES}' => '',
- '{WIDTH}' => $CONFIG['picture_table_width'],
+ '{WIDTH}' => $CONFIG['picture_table_width'] == "100%" ? $CONFIG['main_table_width'] : $CONFIG['picture_table_width'],
'{HELP_ICON}' => $captionLabel,
'{FORM_TOKEN}' => $form_token,
'{TIMESTAMP}' => $timestamp,
@@ -3984,7 +3984,7 @@ function theme_html_comments($pid)
template_extract_block($template_add_your_comment, 'smilies');
template_extract_block($template_add_your_comment, 'submit');
$params = array('{ADD_YOUR_COMMENT}' => $lang_display_comments['add_your_comment'],
- '{WIDTH}' => $CONFIG['picture_table_width'],
+ '{WIDTH}' => $CONFIG['picture_table_width'] == "100%" ? $CONFIG['main_table_width'] : $CONFIG['picture_table_width'],
'{LOGIN_TO_COMMENT}' => sprintf($lang_display_comments['log_in_to_comment'], '<a href="login.php?referer='.$REFERER.'">', '</a>'),
'{HELP_ICON}' => '',
);

0 comments on commit 3afaad0

Please sign in to comment.
Something went wrong with that request. Please try again.