-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[READY] - set starttime, check status of api query, and resize header.png #64
Changes from all commits
9126792
7fd3d84
9817579
995f72e
2887ab1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,14 +71,15 @@ This is available in both Schedule and Room views | |
examples: | ||
* `http://signs.scale.lan/?year=2019&month=3&day=7&hour=9&minute=10` | ||
* `http://signs.scale.lan/?room=ballroom-de&year=2019&month=3&day=8&hour=14&minute=33` | ||
> **NOTE:** This will not work unless `$starttime` is correctly set for the current year of the show | ||
|
||
### Yearly Tasks | ||
|
||
There is a bit of manual effort necessary from year to year. These tasks include, but might not be limitted to: | ||
* update the logo for the curent year at `/server/images/header.png` | ||
* update the logo for the curent year at `/server/images/header.png` should be `360x170px` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. new one is 381x170. probably close enough given transparency There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I noticed this too. I believe it was due to: It looks good regardless :) |
||
* Do a search and replace for the previous scale version (example: replace all occurances of 16x with 17x) | ||
* verify proper XML is being supplied by drupal from the url reflected in the `$url` variable in `room.php` and `scroll.php` | ||
* set `$starttime` in `scroll.php` which should reflect midnight of the first night of current year show | ||
* set `$starttime` in `scroll.php` which should reflect midnight of the first night of current year show. Example: if the show starts on 3/14/24, then the entry for startime should be: `$starttime = mktime(0, 0, 0, 3, 14, 2024) / 60;`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks for clarifying this |
||
* set `$starttime` in `room.php` to match scroll.php | ||
* set `$room_lookup_table` in `room.php` to match all rooms being used for the current year | ||
* set `$room_lookup_table` in `index.php` to match the one in `room.php` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,18 +3,11 @@ | |
date_default_timezone_set('America/Los_Angeles'); | ||
|
||
# set yearly (change if DST starts during SCaLE) | ||
|
||
# before "spring forward" | ||
#$starttime = mktime(0, 0, 0, 3, 5, 2020) / 60; | ||
#$starttime = mktime(0, 0, 0, 3, 9, 2023) / 60; | ||
|
||
# after "spring forward" | ||
# 18x | ||
#$starttime = mktime(23, 0, 0, 3, 4, 2020) / 60; | ||
# 19x starts 7/27/2022 23:00 | ||
#$starttime = mktime(23, 0, 0, 7, 27, 2022) / 60; | ||
# 20x | ||
$starttime = mktime(23, 0, 0, 3, 8, 2023) / 60; | ||
# 21x | ||
$starttime = mktime(0, 0, 0, 3, 14, 2024) / 60; | ||
Comment on lines
6
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no more cruft |
||
|
||
// Turn off all error reporting | ||
error_reporting(0); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,55 +43,60 @@ function search_twitter() | |
$count = 0; | ||
|
||
print '<div class="item active">'; | ||
foreach ($results['statuses'] as $status) { | ||
$logo = $status['user']['profile_image_url']; | ||
$name = $status['user']['name']; | ||
$screen_name = $status['user']['screen_name']; | ||
$comment = $status['text']; | ||
|
||
$created = date("F d, Y h:i a", strtotime($status['created_at'])); | ||
$rightnow = round(time() / 60); | ||
|
||
$time_diff = $rightnow - $created; | ||
|
||
if (in_array($screen_name, $blacklist)) { | ||
continue; | ||
} | ||
|
||
if (strpos($comment, 'RT') !== FALSE && in_array($screen_name, $promote) !== TRUE) { | ||
continue; | ||
} | ||
|
||
if ($count % 3 == 0 && $count > 0) { | ||
|
||
# ensure twitter response actually contains statuses | ||
# TODO: fix broken query due to upstream changes | ||
if (array_key_exists('statuses', $results)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks for wrapping this. |
||
foreach ($results['statuses'] as $status) { | ||
$logo = $status['user']['profile_image_url']; | ||
$name = $status['user']['name']; | ||
$screen_name = $status['user']['screen_name']; | ||
$comment = $status['text']; | ||
|
||
$created = date("F d, Y h:i a", strtotime($status['created_at'])); | ||
$rightnow = round(time() / 60); | ||
|
||
$time_diff = $rightnow - $created; | ||
|
||
if (in_array($screen_name, $blacklist)) { | ||
continue; | ||
} | ||
|
||
if (strpos($comment, 'RT') !== FALSE && in_array($screen_name, $promote) !== TRUE) { | ||
continue; | ||
} | ||
|
||
if ($count % 3 == 0 && $count > 0) { | ||
print '</div>'; | ||
print '<div class="item">'; | ||
} | ||
|
||
if (in_array($screen_name, $promote)) { | ||
print '<div class="tweet tweetpromote media">'; | ||
} else { | ||
print '<div class="tweet media">'; | ||
} | ||
|
||
print '<div class="vcard">'; | ||
print '<a class="pull-left" href="#">'; | ||
//print "<div class='tweet-pic'>"; | ||
// print "<img class='media-object' style=\"height: 48px; width: 48px;\" src=\"$logo\">"; | ||
//print "</div>"; | ||
print '</a>'; | ||
print '</div>'; | ||
print '<div class="item">'; | ||
} | ||
|
||
if (in_array($screen_name, $promote)) { | ||
print '<div class="tweet tweetpromote media">'; | ||
} else { | ||
print '<div class="tweet media">'; | ||
print '<div class="hentry">'; | ||
print '<div class="media-body'> | ||
print "<span class='media-heading'>$screen_name </span>"; | ||
print "<span class=\"tweet-comment\">$comment</span>"; | ||
print "<span class=\"tweet-time\">$created</span>"; | ||
print "</div>"; | ||
print "</div>"; | ||
|
||
$count += 1; | ||
|
||
} | ||
|
||
print '<div class="vcard">'; | ||
print '<a class="pull-left" href="#">'; | ||
//print "<div class='tweet-pic'>"; | ||
// print "<img class='media-object' style=\"height: 48px; width: 48px;\" src=\"$logo\">"; | ||
//print "</div>"; | ||
print '</a>'; | ||
print '</div>'; | ||
|
||
print '<div class="hentry">'; | ||
print '<div class="media-body'> | ||
print "<span class='media-heading'>$screen_name </span>"; | ||
print "<span class=\"tweet-comment\">$comment</span>"; | ||
print "<span class=\"tweet-time\">$created</span>"; | ||
print "</div>"; | ||
print "</div>"; | ||
|
||
$count += 1; | ||
|
||
} | ||
} | ||
print '</div>'; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for clarify this