[Mapbender-users] Assign a shortcut icon to a gui

Thomas Baschetti info at thomas-baschetti.de
Thu Aug 27 16:44:33 EDT 2009


Hi,

Frank Jäger schrieb:
> is ist possible to configure a mapbender-gui with a favicon-link?
>
> <head>
>  ...
>   <link rel="shortcut icon" type="image/png" href="img/favicon.png">
>   
quick hack, assign a favicon as an element_var to element body:

INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, 
var_value, context, var_type) VALUES('gui', 'body', 'favicon', 
'../img/favicon.png', 'ein icon' ,'image/png');

and in frames/index.php right after
right after the line
<title><?php  echo  $gui_id;?> - presented by Mapbender</title>
insert :


<?php
$sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = 'body' AND 
fkey_gui_id = $1 and var_type='image/png'";
$v = array($gui_id);
$t = array('s');
$res = db_prep_query($sql,$v,$t);
$cnt = 0;
while($row = db_fetch_array($res)){
echo "<link rel=\"shortcut icon\" type=\"image/png\" 
href=\"".$row["var_value"]."\">\n";
}
?>


not the nicest solution but should work.


Ciao
Thomas

-- 

Thomas Baschetti - Systemanalyse Geographische Informationssysteme
Hakenstraße 8D
49074 Osnabrück

Tel: 0541 25 91 90 | mobil 01577 189 25 91
E-Mail: info at thomas-baschetti.de
www.thomas-baschetti.de
Ust-IdNr.: DE264355072



More information about the Mapbender_users mailing list