wp-shortcake / shortcake-bakery

A fine selection of shortcodes for WordPress
42 stars 16 forks source link

Extend Googledocs shortcode to handle Google Fusion Tables embeds #181

Open goldenapples opened 8 years ago

goldenapples commented 8 years ago

Fusion tables are embedded with iframes from URLs that begin like https://www.google.com/fusiontables/embedviz/. They always have a viz parameter with the type of visualization and a q parameter containing the query. Different visualization types may also contain a number of other parameters.

Example embed codes that should be reversed:

<iframe width="500" height="300" scrolling="no" frameborder="no" src="https://www.google.com/fusiontables/embedviz?q=select+col12+from+1-941Px73b_XWWn3pmPHKp6WhbbSVNiEmKMadwe0&amp;viz=MAP&amp;h=false&amp;lat=10.992086799750266&amp;lng=-85.45998246582036&amp;t=1&amp;z=11&amp;l=col12&amp;y=45&amp;tmplt=51&amp;hml=TWO_COL_LAT_LNG"></iframe>
<iframe width="500" height="300" scrolling="yes" frameborder="no" src="https://www.google.com/fusiontables/embedviz?viz=CARD&amp;q=select+*+from+1-941Px73b_XWWn3pmPHKp6WhbbSVNiEmKMadwe0&amp;tmplt=6559&amp;cpr=2"></iframe>