moved favicon and site icon to the templates where they belong

This commit is contained in:
JT Smith 2004-11-05 00:49:36 +00:00
parent a278041d74
commit babb8099c9
7 changed files with 38 additions and 29 deletions

View file

@ -32,6 +32,7 @@
- Fixed a user profile vulnerability.
- Fixed a sequence ordering problem with the USS.
- Added internationalized URL handling.
- Moved site icon and fav icon directly into style templates.
6.2.8

File diff suppressed because one or more lines are too long

View file

@ -32,6 +32,24 @@ while (my $data = $sth->hashRef) {
$sth->finish;
print "\tMoving site icons into style templates.\n" unless ($quiet);
my $type = lc($session{setting}{siteicon});
$type =~ s/.*\.(.*?)$/$1/;
my $tags = '
<link rel="icon" href="'.$session{setting}{siteicon}.'" type="image/'.$type.'" />
<link rel="SHORTCUT ICON" href="'.$session{setting}{favicon}.'" />
<tmpl_var head.tags>
';
$sth = WebGUI::SQL->read("select templateId,template from template where namespace='style'");
while (my ($id,$template) = $sth->array) {
$template =~ s/\<tmpl_var head\.tags\>/$tags/ig;
WebGUI::SQL->write("update template set template=".quote($template)." where templateId=".quote($id)." and namespace='style'");
}
$sth->finish;
WebGUI::SQL->write("delete from settings where name in ('siteicon','favicon')");
WebGUI::Session::close();

View file

@ -84,16 +84,6 @@ sub www_editSettings {
-value=>$session{setting}{urlExtension},
-label=>$i18n->get("url extension")
);
$tabform->getTab("content")->text(
-name=>"favicon",
-label=>$i18n->get(897),
-value=>$session{setting}{favicon}
);
$tabform->getTab("content")->text(
-name=>"siteicon",
-label=>$i18n->get(898),
-value=>$session{setting}{siteicon}
);
$tabform->getTab("content")->integer(
-name=>"maxAttachmentSize",
-label=>$i18n->get(130),

View file

@ -136,13 +136,9 @@ sub process {
} elsif ($session{page}{useEmptyStyle}) {
$templateId = 6;
}
my $type = lc($session{setting}{siteicon});
$type =~ s/.*\.(.*?)$/$1/;
$var{'head.tags'} = '
<meta name="generator" content="WebGUI '.$WebGUI::VERSION.'" />
<meta http-equiv="Content-Type" content="text/html; charset='.WebGUI::International::getLanguage($session{page}{languageId},"charset").'" />
<link rel="icon" href="'.$session{setting}{siteicon}.'" type="image/'.$type.'" />
<link rel="SHORTCUT ICON" href="'.$session{setting}{favicon}.'" />
<script>
function getWebguiProperty (propName) {
var props = new Array();

View file

@ -86,11 +86,6 @@ our $I18N = {
lastUpdated => 1036892929
},
'898' => {
message => q|Site Icon|,
lastUpdated => 1050172395
},
'798' => {
message => q|Page Title|,
lastUpdated => 1036978688
@ -1483,11 +1478,6 @@ How should this user be notified when they get a new WebGUI message?
lastUpdated => 1036892866
},
'897' => {
message => q|Favicon|,
lastUpdated => 1050170767
},
'784' => {
message => q|Thumbnail|,
lastUpdated => 1036954393
@ -7076,10 +7066,6 @@ The primary URL of your company. This will appear on all automated emails sent f
<p><b>URL Extension</b><br />Add an extension such as "html", "php", or "asp" to each new page URL as it is created. <p><b>NOTE:</b> Do NOT include the dot "." in this. So the field should look like "html" not ".html".
<P><B>Favicon</B><BR>An icon that appears on Internet Explorer short cuts such as your "Favorites". More information about <A href="http://msdn.microsoft.com/workshop/author/dhtml/howto/shortcuticon.asp">Favicon</A> is available online.
<P><B>Site Icon</B><BR>An icon that appears in the URL bar of most modern browsers. It may also appear in the bookmarks of the browser. The image must be 16x16 pixels.
<P><B>Maximum Attachment Size</B><BR>The size (in kilobytes) of the maximum allowable attachment to be uploaded to your system.
<P><B>Max Image Size</B><BR>If images are uploaded to your system that are bigger than the max image size, then they will be resized to the max image size. The max image size is measured in pixels and will use the size of the longest side of the image to determine if the limit has been reached.

View file

@ -14,6 +14,15 @@
left: 85px;
font-size: 50px;
text-align: left;
/*background-image: url(bg_title.gif);*/
background-repeat: repeat-x;
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, Arial, sans-serif;
color: black;
text-transform: uppercase;
letter-spacing: 2px;
font-size: 25px;
height: 73px;
vertical-align: middle;
}
.adminConsoleWorkArea {
@ -21,6 +30,8 @@
margin: 65px 200px 50px 10px;
padding: 5px;
-moz-border-radius: 10px;
background-image: url(bg_console.gif);
background-repeat: repeat-x;
}
/* Hides from non-ie: the holly hack \*/
* html .adminConsoleWorkArea {
@ -39,6 +50,8 @@
padding: 5px; */
font-family: helvetica, arial;
font-size: 12px;
background-image: url(bg_console.gif);
background-repeat: repeat-x;
}
.adminConsoleMainMenu {
@ -46,6 +59,8 @@
padding: 5px;
margin: 5px;
-moz-border-radius: 10px;
background-image: url(bg_console.gif);
background-repeat: repeat-x;
}
.adminConsoleSubmenu {
@ -53,6 +68,8 @@
padding: 5px;
margin: 5px;
-moz-border-radius: 10px;
background-image: url(bg_console.gif);
background-repeat: repeat-x;
}
.adminConsoleUtilityMenu {
@ -60,6 +77,8 @@
padding: 5px;
margin: 5px;
-moz-border-radius: 10px;
background-image: url(bg_console.gif);
background-repeat: repeat-x;
}
.adminConsoleHidden {