Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Google Map of replies insight [ci skip]
  • Loading branch information
ginatrapani committed Jun 15, 2012
1 parent c5b7448 commit 8f98ddd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 7 additions & 1 deletion webapp/_lib/view/_insights.post.tpl
Expand Up @@ -49,4 +49,10 @@
{/if}
</span><br>&nbsp;
</span>
</div>
</div>

{if $i->slug eq 'geoencoded_replies'}
<script type="text/javascript" src="/plugins/geoencoder/assets/js/iframe.js"></script>
<iframe width="680" frameborder="0" src="/plugins/geoencoder/map.php?pid={$post->post_id}&n=twitter&t=post" name="childframe" id="childframe" >
</iframe>
{/if}
8 changes: 8 additions & 0 deletions webapp/plugins/twitter/model/class.TwitterCrawler.php
Expand Up @@ -1933,6 +1933,14 @@ private function generateInsightFeedItems($number_days=3) {
$insight_dao->deleteInsight('retweet_spike_30_day_'.$post->id, $this->instance->id,
$simplified_post_date);
}

//If geoencoded, show the map in the stream
$plugin_option_dao = DAOFactory::GetDAO('PluginOptionDAO');
$options = $plugin_option_dao->getOptionsHash('geoencoder', true);
if (isset($options['gmaps_api_key']->option_value) && $post->is_geo_encoded == 1) {
$insight_dao->insertInsight('geoencoded_replies', $this->instance->id, $simplified_post_date,
"Going global! You've got replies all over the map.", Insight::EMPHASIS_LOW, serialize($post));
}
}

//Generate least likely followers insights
Expand Down

0 comments on commit 8f98ddd

Please sign in to comment.