smokinpuppy
Joined: 26 Mar 2012
Posts: 14
Posted: 2012-05-11 18:15
Back to top
Reply with quote
|
Hi,
I have latitude and longitude coordinates stored in a mysql db and I'm wondering if anyone knows how to display the map_canvas in phpMyEdit rows
Thanks,
Robert
|
doug
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2012-05-12 14:34
Back to top
Reply with quote
|
I don't know anything about map_canvas, but in general the MySQL CONCAT function can be used with stored data to create HTML tags. To locate examples, use the forum's Search feature to look for CONCAT. Set 'escape' to false.
| Code: |
$opts['fdd']['dummy1'] = array (
'name' => 'Thumbnail',
'sql|VLF' => 'if(category = "other",
CONCAT("<a href=\"", dir, "/", filename, "\" target=\"_blank\">link</a>"),
if(category = "thumb", CONCAT("<a rel=\"example_group\" href=\"", REPLACE(dir, "/tn", "/"), filename, "\" title=\"", long_description, "\" target=\"_blank\"><img src=\"", dir, "/", filename, "\" ", " alt=\"\"></a>"), ""))',
'options' => 'VLF',
'input' => 'R',
'escape' => false,
'sort' => false
);
// `domain` is another field in this table
$opts['fdd']['dummy2'] = array (
'input' => 'R',
'name' => 'Whois',
'sql' => 'CONCAT("<a href=\"http://whois.domaintools.com/", domain, "\" target=\"_blank\">whois</a>")',
'options' => 'FL',
'escape' => false,
'sort' => true
); |
|
smokinpuppy
Joined: 26 Mar 2012
Posts: 14
Posted: 2012-05-12 23:40
Back to top
Reply with quote
|
Thank you for your reply, I will work on it and post my findings.
Thanks again,
Robert
|
smokinpuppy
Joined: 26 Mar 2012
Posts: 14
Posted: 2012-05-13 11:24
Back to top
Reply with quote
|
Well I ended up using Concat function to produce an I frame which passed ID field to another page and insert that page in the iFrame. Incase someone might find it useful here is the code:
| Code: |
$opts['fdd']['virtual_field'] = array (
'name' => 'Map Location',
'sql|VLF' => 'CONCAT("<iframe src=\"show_map.php?mid=", id, "\" width=\"200px\" height=\"200px\"></iframe>")',
'options' => 'VLF',
'input' => 'R',
'escape' => false,
'sort' => false
); |
|
|
Post new topic
Reply to topic
|
|