Skip to content
Browse files

Fix for wider badge icons

  • Loading branch information...
1 parent 305ab65 commit 31a66f0b102e3d1d1e819e0b46235dafc1771829 @pudge pudge committed Oct 16, 2008
View
12 Slash/Utility/Comments/Comments.pm
@@ -2166,13 +2166,17 @@ EOT
}
if ($user->{people}{FOF()}{$person}) {
my $title = $user->{people}{people_bonus_fof} ? "Friend of a Friend ($user->{people}{people_bonus_fof})" : "Friend of a Friend";
- ($zoosphere_display .= $zooicon) =~ s/__IMG__/fof/g;
- $zoosphere_display =~ s/__TITLE__/$title/g;
+ (my $tmp = $zooicon) =~ s/__IMG__/fof/g;
+ $tmp =~ s/__TITLE__/$title/g;
+ $tmp =~ s/width="\d+" /width="$constants->{badge_icon_size_wide}" /g;
+ $zoosphere_display .= $tmp;
}
if ($user->{people}{EOF()}{$person}) {
my $title = $user->{people}{people_bonus_eof} ? "Foe of a Friend ($user->{people}{people_bonus_eof})" : "Foe of a Friend";
- ($zoosphere_display .= $zooicon) =~ s/__IMG__/eof/g;
- $zoosphere_display =~ s/__TITLE__/$title/g;
+ (my $tmp = $zooicon) =~ s/__IMG__/eof/g;
+ $tmp =~ s/__TITLE__/$title/g;
+ $tmp =~ s/width="\d+" /width="$constants->{badge_icon_size_wide}" /g;
+ $zoosphere_display .= $tmp;
}
}
}
View
4 plugins/Zoo/templates/confirm;zoo;default
@@ -63,11 +63,11 @@ or <a href="[% gSkin.rootdir %]/faq/com-mod.shtml#cm2200">where you change their
<table width="100%">
<tr>
<td>
- <b>Consider <a href="[% gSkin.rootdir %]/~[% nickname | strip_paramattr %]/">[% nickname %]</a> a Friend</b> <img src="[% constants.imagedir %]/fof.[% constants.badge_icon_ext %]" alt="Friends of Friends" title="Friends of Friends" width="[% constants.badge_icon_size %]" height="[% constants.badge_icon_size %]">
+ <b>Consider <a href="[% gSkin.rootdir %]/~[% nickname | strip_paramattr %]/">[% nickname %]</a> a Friend</b> <img src="[% constants.imagedir %]/fof.[% constants.badge_icon_ext %]" alt="Friends of Friends" title="Friends of Friends" width="[% constants.badge_icon_size_wide %]" height="[% constants.badge_icon_size %]">
&nbsp;<a href="[% gSkin.rootdir %]/my/comments">[% IF user.people_bonus_fof %]([% user.people_bonus_fof %])[% ELSE %](+0)[% END %]</a>
</td>
<td>
- <b>Consider <a href="[% gSkin.rootdir %]/~[% nickname | strip_paramattr %]/">[% nickname %]</a> a Foe</b> <img src="[% constants.imagedir %]/eof.[% constants.badge_icon_ext %]" alt="Foes of Friends" title="Foes of Friends" width="[% constants.badge_icon_size %]" height="[% constants.badge_icon_size %]">
+ <b>Consider <a href="[% gSkin.rootdir %]/~[% nickname | strip_paramattr %]/">[% nickname %]</a> a Foe</b> <img src="[% constants.imagedir %]/eof.[% constants.badge_icon_ext %]" alt="Foes of Friends" title="Foes of Friends" width="[% constants.badge_icon_size_wide %]" height="[% constants.badge_icon_size %]">
&nbsp;<a href="[% gSkin.rootdir %]/my/comments">[% IF user.people_bonus_eof %]([% user.people_bonus_eof %])[% ELSE %](+0)[% END %]</a>
</td>
</tr>
View
4 plugins/Zoo/templates/zoo_icons;misc;default
@@ -48,11 +48,11 @@ __template__
[% END %]
[% IF user.people.${Slash.FOF}.$person && implied != Slash.FOF %]
[% IF bonus && user.people_bonus_freak; zootitle = "Friend of Friend ($user.people_bonus_fof)"; ELSE; zootitle = "Friend of Friend"; END; %]
- <span class="zooicon"><a href="[% gSkin.rootdir %]/zoo.pl?op=check&amp;uid=[% person %]"><img src="[% constants.imagedir %]/fof.[% constants.badge_icon_ext %]" alt="[% zootitle %]" title="[% zootitle %]" width="[% constants.badge_icon_size %]" height="[% constants.badge_icon_size %]"></a></span>
+ <span class="zooicon"><a href="[% gSkin.rootdir %]/zoo.pl?op=check&amp;uid=[% person %]"><img src="[% constants.imagedir %]/fof.[% constants.badge_icon_ext %]" alt="[% zootitle %]" title="[% zootitle %]" width="[% constants.badge_icon_size_wide %]" height="[% constants.badge_icon_size %]"></a></span>
[% END %]
[% IF user.people.${Slash.EOF}.$person && implied != Slash.EOF %]
[% IF bonus && user.people_bonus_freak; zootitle = "Foe of Friend ($user.people_bonus_eof)"; ELSE; zootitle = "Foe of Friend"; END; %]
- <span class="zooicon"><a href="[% gSkin.rootdir %]/zoo.pl?op=check&amp;uid=[% person %]"><img src="[% constants.imagedir %]/eof.[% constants.badge_icon_ext %]" alt="[% zootitle %]" title="[% zootitle %]" width="[% constants.badge_icon_size %]" height="[% constants.badge_icon_size %]"></a></span>
+ <span class="zooicon"><a href="[% gSkin.rootdir %]/zoo.pl?op=check&amp;uid=[% person %]"><img src="[% constants.imagedir %]/eof.[% constants.badge_icon_ext %]" alt="[% zootitle %]" title="[% zootitle %]" width="[% constants.badge_icon_size_wide %]" height="[% constants.badge_icon_size %]"></a></span>
[% END %]
[% END %]
[% END %]
View
1 sql/mysql/defaults.sql
@@ -768,6 +768,7 @@ INSERT INTO vars (name, value, description) VALUES ('authors_unlimited','100','S
INSERT INTO vars (name, value, description) VALUES ('backup_db_user','','The virtual user of the database that the code should use for intensive database access that may bring down the live site. If you don\'t know what this is for, you should leave it blank.');
INSERT INTO vars (name, value, description) VALUES ('badge_icon_ext', 'gif', 'Badge icon extension ("gif" or "png", probably)');
INSERT INTO vars (name, value, description) VALUES ('badge_icon_size', '15', 'Badge icon height/width');
+INSERT INTO vars (name, value, description) VALUES ('badge_icon_size_wide', '15', 'Badge icon width for wide icons');
INSERT INTO vars (name, value, description) VALUES ('badkarma','-10','Users get penalized for posts if karma is below this value');
INSERT INTO vars (name, value, description) VALUES ('bad_password_warn_ip','40','Warn admin if an ip specifies password incorrectly this many times in one day');
INSERT INTO vars (name, value, description) VALUES ('bad_password_warn_subnet','60','Warn admin if a subnet specifies password incorrectly this many times in one day');
View
12 sql/mysql/upgrades
@@ -5580,20 +5580,22 @@ CREATE TABLE shill_ids (
user varchar(16) NOT NULL default ''
);
INSERT INTO shill_ids VALUES (1, 'Admin');
-INSERT INTO shill_ids VALUES (2, 'Thinkgeek');
+INSERT INTO shill_ids VALUES (2, 'ThinkGeek');
# for plugins/Zoo
INSERT INTO vars (name, value, description) VALUES ('badge_icon_ext', 'gif', 'Badge icon extension ("gif" or "png", probably)');
INSERT INTO vars (name, value, description) VALUES ('badge_icon_size', '15', 'Badge icon height/width');
+INSERT INTO vars (name, value, description) VALUES ('badge_icon_size_wide', '15', 'Badge icon width for wide icons');
# for Slashdot ...
#INSERT INTO vars (name, value, description) VALUES ('badge_icon_ext', 'png', 'Badge icon extension ("gif" or "png", probably)');
#INSERT INTO vars (name, value, description) VALUES ('badge_icon_size', '16', 'Badge icon height/width');
+#INSERT INTO vars (name, value, description) VALUES ('badge_icon_size_wide', '32', 'Badge icon width for wide icons');
# adding ie-version specific css for www.slashdot.org
-INSERT INTO `css` VALUES
-(NULL,'stylesheet','text/css','screen/projection','ie6.css','','','','no','',3,1,'lt IE 7','no'),
-(NULL,'stylesheet','text/css','screen/projection','ie7.css','','','','no','',3,1,'IE 7','no'),
-(NULL,'stylesheet','text/css','screen/projection','ie8.css','','','','no','',3,1,'gte IE 8','no');
+#INSERT INTO `css` VALUES
+#(NULL,'stylesheet','text/css','screen/projection','ie6.css','','','','no','',3,1,'lt IE 7','no'),
+#(NULL,'stylesheet','text/css','screen/projection','ie7.css','','','','no','',3,1,'IE 7','no'),
+#(NULL,'stylesheet','text/css','screen/projection','ie8.css','','','','no','',3,1,'gte IE 8','no');
# 2008-10-16
UPDATE vars SET value = 'T_2_5_0_225' WHERE name = 'cvs_tag_currentcode';

0 comments on commit 31a66f0

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