This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
require_once('/home/kurt/ars-technica-mt-bits/published/includes_c/classes.inc.php'); | |
$_resource = new Entry(); | |
$_resource->excerpt = 'Clint is cool [What now!](http://google.com) Blah blah blah...'; | |
$_resource->listing_image = false; | |
$_resource->listing_image = new Image(); | |
$_resource->listing_image->caption = ''; | |
$_resource->listing_image->credit = ''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
require_once('/home/kurt/ars-technica-mt-bits/published/includes_c/classes.inc.php'); | |
$_instance = new Entry(); | |
$_instance->body = 'Clint is cool | |
[What now!](http://google.com) | |
Blah blah blah'; | |
$_instance->excerpt = 'Clint is cool [What now!](http://google.com) Blah blah blah...'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#adds asset fields to appropriate forms | |
sub add_asset_fields{ | |
my ($cb, $app, $param, $tmpl) = @_; | |
my $asset = $param->{asset}; | |
#$asset->init_meta(); | |
if($asset){ | |
$tmpl->context->var('credit_url', $asset->credit_url); | |
$tmpl->context->var('credit_text', $asset->credit_text); | |
$tmpl->context->var('caption', $asset->caption); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"><!-- | |
google_ad_client = "pub-9994288170196423"; | |
/* 728x90, created 1/6/09 */ | |
google_ad_slot = "6863598004"; | |
google_ad_width = 728; | |
google_ad_height = 90; | |
//--> | |
</script> | |
<script type="text/javascript" | |
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
munch do |h| | |
(h / 'div.img').each do |img| | |
src = (img % 'img').attributes['src'] | |
(img / 'img').remove | |
text = img.inner_html | |
img.swap("<div class=\"ImageRight\"><div><img src=\"#{src}\" /></div><div>#{text}</div></div>") | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="news-item-figure" style="width:640px;"> | |
<div class="news-item-figure-image"> | |
<img src="http://write.arstechnica.com/published/cdn/assets/2009/02/kindle-listing-thumb-640xauto-2497.jpg" alt="Evolution yields revolution: the Kindle 2" /> | |
</div> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def from_url(url) | |
raise "No url specified" if url.nil? | |
easy = Curl::Easy.perform(url) do |c| | |
c.headers["If-Modified-Since"] = @last_modified unless @last_modified.nil? | |
c.headers["If-None-Match"] = @etag unless @etag.nil? | |
c.follow_location = true | |
end | |
if easy.response_code == 200 | |
@source_url = url | |
parse_response(easy) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kurt@ubuntu:~/lighthouse-git$ ./bin/lh-git init --lighthouse-account <snip> --lighthouse-api-key <snip> --lighthouse-project 24284 | |
Using project 24284 | |
1) I don't want to work out of a bin | |
2) Todo | |
3) New Tickets | |
4) Stuff Clint should be working on | |
5) Upcoming | |
6) Clint's Tickets | |
7) Important Issues | |
8) Aurich's Tickets |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
com.arstechnica.common.journals_and_popular = function(){ | |
$('#most-popular-and-journals-box-header li').live('click', function(){ | |
$('#most-popular-and-journals-box-header li').removeClass('selected'); | |
$(this).addClass('selected'); | |
var target = '#' + $(this).attr('id').replace('-tab', '-box'); | |
$('#most-popular-and-journals-box > div') | |
.filter('#most-popular-and-journals-box-header').hide() | |
.filter(target).show(); | |
}); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mt:SetVarTemplate name="main_menu"> | |
<mt:CategoryBasename default="no-cat" separator="-" setvar="tl_basename" /><!-- <mt:var name="tl_basename" /> --> | |
<ul id="primary-navigation"> | |
<li<mt:if var="tl_basename" eq="no-cat"> class="current-selection"</mt:if>><a href="<mt:BlogURL />">All</a></li> | |
<li<mt:if var="tl_basename" eq="apple"> class="current-selection"</mt:if>><a href="<mt:BlogURL />apple/">Apple</a></li> | |
<li<mt:if var="tl_basename" eq="business"> class="current-selection"</mt:if>><a href="<mt:BlogURL />business/">Business</a></li> | |
<li<mt:if var="tl_basename" eq="gadgets"> class="current-selection"</mt:if>><a href="<mt:BlogURL />gadgets/">Gadgets</a></li> | |
<li<mt:if var="tl_basename" eq="gaming"> class="current-selection"</mt:if>><a href="<mt:BlogURL />gaming/">Gaming</a></li> | |
<li<mt:if var="tl_basename" eq="hardware"> class="current-selection"</mt:if>><a href="<mt:BlogURL />hardware/">Hardware</a></li> | |
<li<mt:if var="tl_basename" eq="microsoft"> class="current-sele |