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

Christoph Baudson christoph.baudson at wheregroup.com
Fri Aug 28 04:39:29 EDT 2009


Thanks for your implementation. We should integrate this into trunk 
rightaway. See my comments inline.


Thomas Baschetti schrieb:
> 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');

I suggest we change the var_type to 'php_var'.

>
> 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'";

I suggest we change the WHERE clause to read var_name = 'favicon' 
instead of 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.

We should commit this into trunk and add a short note at the element var 
description in the wiki

http://www.mapbender.org/Body

and maybe add an enhancement ticket so we have it in the changelog.

If you don't find the time, Thomas, please let me know and I will attend 
to it.

Thanks for your contribution

Christoph

>
>
> Ciao
> Thomas
>


-- 
********************************************
INTERGEO 2009
22.-24. September 2009 in Karlsruhe
Halle 1, Stand 1.417
www.intergeo.de
******************************************** 

_______________________________________

W h e r e G r o u p GmbH & Co. KG

Siemensstraße 8
53121 Bonn
Germany

Christoph Baudson
Anwendungsentwickler

Fon: +49 (0)228 / 90 90 38 - 15
Fax: +49 (0)228 / 90 90 38 - 11
christoph.baudson at wheregroup.com
www.wheregroup.com
Amtsgericht Bonn, HRA 6788
_______________________________________

Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
_______________________________________ 



More information about the Mapbender_users mailing list