Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:hicapacity/foodtrucks
Browse files Browse the repository at this point in the history
  • Loading branch information
ryankanno committed Jul 10, 2011
2 parents 2928942 + d565950 commit 61d4a0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
16 changes: 2 additions & 14 deletions protected/components/TwitterHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,14 @@ public static function isValidFormat($tweet) {
}

public static function parseTruckTweet($tweet_text) {
if (preg_match('/^@streetgrindzapp\s+(?P<menu_url>http:\/\/.*?)?\s*(?P<start>[012]?[0-9]:?([0-5][0-9])?)( ?a| ?A)?( ?p| ?P)?m?( ?to ?| ?2 ?| ?.- ?)(?P<end>[012]?[0-9]:?([0-5][0-9])?)( ?a| ?A)?( ?p| ?P)?m?\s*$/', $tweet_text, $matches)) {
if (preg_match('/^@streetgrindzapp\s+(?P<menu_url>http:\/\/.*?)?\s*(?P<start>\d+)-(?P<end>\d+)\s*$/', $tweet_text, $matches)) {
return $matches;
} else {
preg_match('/^@streetgrindzapp\s+(?P<start>[012]?[0-9]:?([0-5][0-9])?)( ?a| ?A)?( ?p| ?P)?m?( ?to ?| ?2 ?| ?.- ?)(?P<end>[012]?[0-9]:?([0-5][0-9])?)( ?a| ?A)?( ?p| ?P)?m?\s*(?P<menu_url>http:\/\/.*?)?\s*$/', $tweet_text, $matches);
return $matches;
}
}
/**
* Use the following function if you'd like to use minutes in the future.
* extra matches include <startmins> and <endmins>
public static function parseTruckTweet($tweet_text) {
if (preg_match('/^@streetgrindzapp\s+(?P<menu_url>http:\/\/.*?)?\s*(?P<start>[012]?[0-9]):?(?P<startmins>([0-5][0-9])?)( ?a| ?A)?( ?p| ?P)?m?( ?to ?| ?2 ?| ?.- ?)(?P<end>[012]?[0-9]):?(?P<endmins>([0-5][0-9])?)( ?a| ?A)?( ?p| ?P)?m?\s*$/', $tweet_text, $matches)) {
return $matches;
} else {
preg_match('/^@streetgrindzapp\s+(?P<start>[012]?[0-9]):?(?P<startmins>([0-5][0-9])?)( ?a| ?A)?( ?p| ?P)?m?( ?to ?| ?2 ?| ?.- ?)(?P<end>[012]?[0-9]):?(?P<endmins>([0-5][0-9])?)( ?a| ?A)?( ?p| ?P)?m?\s*(?P<menu_url>http:\/\/.*?)?\s*$/', $tweet_text, $matches);
preg_match('/^@streetgrindzapp\s+(?P<start>\d+)-(?P<end>\d+)\s*(?P<menu_url>http:\/\/.*?)?\s*$/', $tweet_text, $matches);
return $matches;
}
}

*/
/**
* Take tweet time -> converts tweet to timezone, sets the hour/min/secs, converts back to UTC for db
*/
Expand Down
2 changes: 1 addition & 1 deletion protected/views/layouts/mapview.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php $this->beginContent('//layouts/main'); ?>
<div data-fullscreen="true" data-role="page" data-theme="b" class="content_wrapper">
<div data-role="header" data-position="fixed">
<h1><img src="images/StreetgrindzLogo.png"> <?php echo CHtml::encode(Yii::app()->name); ?></h1>
<h1><img src="images/StreetgrindzLogo.png"><a style="color: #fff; text-decoration: none;" href="http://streetgrindz.com"><?php echo CHtml::encode(Yii::app()->name); ?></a></h1>
</div>
<div data-role="content" class="content">
<div id="content_map">
Expand Down

0 comments on commit 61d4a0c

Please sign in to comment.