DABR Twitter Web Client Mini Blog Yo Mama Jokes Sports Bookmarklets About Us

May 6, 2010

Apple As An Exclusive Country Club

Filed under: Apple, Google, Mac, Randomness, Tech, iPhone — Tags: , , , , , , , — webadmin @ 6:53 pm


 
With the iPhone and the iPad, Apple has either smartly or stupidly drawn a line in the sand and declared themselves no longer just the arbiters of hardware and system UI but arbiters of content and commerce as well. If you want to develop or produce content for Apple’s ecosystem, you will do exactly as Apple tells you to do. If you want to enjoy Apple’s products as a consumer, you’ll enjoy every freedom Apple provides and live with every limitation they impose. It’s like a country club. Apple isn’t saying you can’t play golf with your pit-stained t-shirt and denim cutoffs. They’re just saying you can’t do it at their club. Apple wants to run the most profitable country club in the world, with millions of members, but they don’t want everybody; and therein lies the difference between how their resurgence is playing out and how Microsoft’s dominance ultimately played out.

Posted via web

Popularity: 1% [?]

January 31, 2010

Weekly Updates for 2010-01-31

Filed under: Mini Blog — Tags: — webadmin @ 5:59 am


 

Powered by Twitter Tools

Popularity: unranked [?]

January 29, 2010

microblog: Kurt Warner – the ONLY QB retirement th…

Filed under: Uncategorized — webadmin @ 4:10 pm


 

Kurt Warner – the ONLY QB retirement that should matter since Elway and until Peyton.

Popularity: unranked [?]

January 24, 2010

Weekly Updates for 2010-01-24

Filed under: Mini Blog — Tags: — webadmin @ 5:59 am


 

Powered by Twitter Tools

Popularity: unranked [?]

January 22, 2010

microblog: “Owen Coyle admits that he was perhaps …

Filed under: Uncategorized — webadmin @ 6:44 am


 

“Owen Coyle admits that he was perhaps a little too harsh on Arsenal defender William Gallas after his late challenge on Mark Davies.” http://ping.fm/3pTDg ya think??

Trigger: tfc

Popularity: unranked [?]

December 18, 2009

FREEDOM EDEN: Top Ten Surprises, Sarah Palin Book

Filed under: Politics — Tags: , — webadmin @ 7:34 am


 
TOP TEN SURPRISES IN THE SARAH PALIN BOOK

10. Cover photo is actually Tina Fey

9. All proceeds from the book go toward a bitchin’ new snowmobile

8. Nearly had to pull out of campaign after spraining her winking muscle

7. Not interested in politics, is interested in joining “Dancing with the Stars”

6. Includes fantasy sequence where she beats Katie Couric with her own microphone

5. Someone’s got a crush on Jon Gosselin

4. It’s a science fiction romance about moody teenage vampires

3. Favorite website: YoubetchaTube

2. Includes Levi Johnston centerfold

1. Even Sarah doesn’t know what Todd does

Posted via web

Popularity: unranked [?]

November 24, 2009

microblog: num. 3 thing you never thought you’d se…

Filed under: Mini Blog — webadmin @ 12:10 pm


 

num. 3 thing you never thought you’d see: “Black Friday Starts Today At Cooter’s” [cootersplace.com]

Popularity: unranked [?]

Expanding DABR Photo-Upload options



 

One of the most underrated parts of Dabr IMO is the Twitpic upload page. It allows you to interact with a Twitter helper service that uses the same login information as your twitter account. And since Twitter has speced out how the uploadAndPost process works, lots of other Twitter helper services use it in their API – such as YFrog, Twitgoo, Twitvid, and Posterous (which slickly reverse matches your autopost-twitter information in order to validate your posterous account). But Posterous is pretty slick all around – probably the best tumble blog/micro blog/media blog service out there and certainly the most expandable. Perhaps in the future I might try to integrate some more later.

Dabr photo upload twitpic yfrog twitgoo twitvid posterous imgurAnyways, I figure I’d give it a go to add some more services to the twitpic page – keyed off a service dropdown. The hardest part in reality was managing the options allowed by each service (i.e. URL upload instead of file upload, additional message body). In addition, I wanted to add support for a site that I use all the time – Imgur. They didn’t implement the uploadAndPost spec so I had to make a few exceptions as well as add an extra step to post the tweet along with the uploaded image file. Took a while to work out all the kinks (one large kink remaining is that Twitvid uploads don’t work LOL) but this page pretty much saves me from ever having to go to those sites again to upload images!

function twitter_twitpic_page($query) {
  // Check for oAuth credentials
  if (user_type() == 'oauth') {
    return theme('page', 'Error', '<p>You can't do media uploads while accessing Dabr using an OAuth login.</p>');
  }

  //verify that we're entering this page from posting the form  
  if ($_POST['service']) {
  
    // format and shrink/truncate associated status message
    $status = prepare_status($_POST['message'],120);
     
    // set the  api url based on the service name (all similar except imgur)
    $postUrl = 'http://'.$_POST['service'].'.com/api/uploadAndPost';

     // prepare the fields array with the common elements
    $postData = array(
      'username' => user_current_username(),
      'password' => $GLOBALS['user']['password'],
      'message' => $status,);
       
     // perform service-specific tasks
     switch ($_POST['service']){
         case 'imgur':
               if (!defined('IMGUR_API_KEY')){
                    twitter_refresh('twitpic/fail/'.$_POST['service'].'/'.urlencode('API KEY undefined'));
               }
               
               // imgur doesn't use the Twitter standard uploadAndPost spec
               $postUrl = 'http://imgur.com/api/upload.xml';
               
               //if URL is provided, send URL for imgur to rehost, otherwise use selected file
              if (empty($_POST['url'])){
                   $postData = array(
                         'key' => IMGUR_API_KEY, 
                         'image' => '@'.$_FILES['media']['tmp_name']);
              } else {
                   $postData = array(
                         'key' => IMGUR_API_KEY, 
                         'image' => $_POST['url']);
              }
               break;
          case 'yfrog': 
               if (!defined('YFROG_API_KEY')){
                    twitter_refresh('twitpic/fail/'.$_POST['service'].'/'.urlencode('API KEY undefined'));
               }
               $postData['key'] = YFROG_API_KEY;
               
              // Yfrog can also accept a URL as the media source
              if (!empty($_POST['url'])){
                   $postData['url'] = $_POST['url'];
              } else {
                    $postData['media'] = '@'.$_FILES['media']['tmp_name'];
               }
               break;
          case 'posterous':
              // Posterous has an additional comments element and will fall through to the default
               $postData['body'] = stripslashes($_POST['body']);
         default:
               $postData['media'] = '@'.$_FILES['media']['tmp_name'];
     }

     // make the api call
    $response = twitter_process($postUrl,$postData);

     // check response XML for associated IDs
     // for uploadAndPost supporting services
    if (preg_match('#mediaid>(.*)</mediaid#', $response, $matches)) {
      $id = $matches[1];
       
       // Twitvid allows crossposting to Youtube
      if (preg_match('#youtube_id>(.*)</youtube_id#', $response, $matches)) {
           $altid = $matches[1];
      }
       
       // Posterous sends back a separate shortened URL code
      if (preg_match('#mediaurl>http://post.ly/(.*)</mediaurl#', $response, $matches)) {
           $altid = $matches[1];
      }
       
       // show success messsage and pass IDs to create links to media
      twitter_refresh("twitpic/confirm/".$_POST['service']."/$id/$altid");
    } 
     // response for imgur uses different element names
     elseif (preg_match('#image_hash>(.*)</image_hash#', $response, $matches)) {
      $id = $matches[1];
       
       // the secret delete link/code is offered only once and should be shown in the confirmation
      if (preg_match('#delete_hash>(.*)</delete_hash#', $response, $matches)) {
           $deleteid = $matches[1];
      }
       
       // we need the actual imgur link in order to post status to Twitter 
      if (preg_match('#original_image>(.*)</original_image#', $response, $matches)) {
           $imglinkid = $matches[1];
      }

       // update status with the image link
      $status .= " $imglinkid ";

       // post the status to twitter
      $response = twitter_process('http://twitter.com/statuses/update.json',
           array('source' => 'dabr', 'status' => $status));

       // show success message, link to image, and hidden delete link
      twitter_refresh("twitpic/confirm/".$_POST['service']."/$id/$deleteid");
    } else {
          // collect errors from response
         if (preg_match('#error_code>(.*)</error_code#', $response, $matches)) {
              $error = "Error Code: $matches[1]. ";
         }
         if (preg_match('#error_msg>(.*)</error_msg#', $response, $matches)) {
              $error .= "Error Msg: $matches[1]. ";
         }
         if (preg_match('#err.code="(.*)" msg="(.*)" />#', $response, $matches)) {
               $error = "Error Code: $matches[1] Error Msg: $matches[2]";
         }
            
          // show failure messages
         twitter_refresh('twitpic/fail/'.$_POST['service'].'/'.urlencode($error));
    }
  } 
  // Page mode to show confirmation and media links
  elseif ($query[1] == 'confirm') {
    $postedlink = "Media: http://$query[2].com/$query[3]";
    if ($query[2] == 'imgur' && !empty($query[4])){
         $postedlink .= " // Hidden delete link: http://imgur.com/delete/$query[4]";
    }
    if ($query[2] == 'twitvid' && !empty($query[4])){
         $postedlink .= " // Youtube:  http://www.youtube.com/watch?v=$query[4]";
    }
    if ($query[2] == 'posterous' && !empty($query[4])){
         $postedlink = "Post: http://post.ly/$query[4]";
    }
     
     // show formatted confirmation to add thumbnails
    $content = "<p>Upload success.</p><p>".twitter_parse_tags($postedlink)."</p>";
  } 
  // page mode for failure - show errors
  elseif ($query[1] == 'fail') {
    $content = "<p>$query[2] upload failed: $query[3]</p>";
  } 
  // otherwise show form
  else {
    $content = '<style type="text/css">.disabletrue{background:#ddd;}.disablefalse{background:#fff;}</style>
          <script type="text/javascript">function disable(sel){service=sel.options[sel.selectedIndex].value;sel.form.url.disabled= (service != 'yfrog' && service != 'imgur');sel.form.body.disabled= (service != 'posterous');sel.form.url.className= 'disable'+(service != 'yfrog' && service != 'imgur');sel.form.body.className= 'disable'+(service != 'posterous');}</script>
          <form name="twitpic" method="post" action="twitpic" enctype="multipart/form-data"><br />Service: <select name="service" onChange="disable(this);"><option value="twitpic">Twitpic</option><option value="twitgoo">Twitgoo</option><option value="yfrog">Yfrog</option><option value="imgur">Imgur</option><option value="twitvid">Twitvid</option><option value="posterous">Posterous</option></select><br />Upload: <input type="file" name="media" /><br />Message: <input type="text" name="message" maxlength="120" /><br />Image Url: <input type="text" name="url" maxlength="120" /><br />Body:<br><textarea style="position:relative;top:-14px;left:67px;" cols=50 rows=3" name="body"></textarea><br /><input type="submit" value="Upload" /></form>
          <script type="text/javascript">disable(document.forms['twitpic'].service);</script>';
  }
  return theme('page', 'Twitpic Upload', $content);
}

I also had to update the twitter_photo_replace function, which I use to show the thumbnail of the image on the confirm page, to add the imgur regexes

    '#imgur.com/([w]{5})[s.ls][.w]*#i' => 'http://imgur.com/%ss.png',
    '#imgur.com/gallery/([w]+)#i' => 'http://imgur.com/%ss.png',
    '#imgur.com/delete/([w]+)#i' => 'images/trash.gif',

A lot of code, but to me it’s worth it!

Popularity: unranked [?]

November 19, 2009

microblog: wow [Being Poor « Whatever] Being poor…

Filed under: Mini Blog — Tags: — webadmin @ 7:49 pm


 

wow [Being Poor « Whatever] Being poor is knowing exactly how much everything costs … http://ping.fm/g2PbX

Being poor is knowing exactly how much everything costs.

Being poor is getting angry at your kids for asking for all the crap they see on TV.

Being poor is having to keep buying $800 cars because they’re what you can afford, and then having the cars break down on you, because there’s not an $800 car in America that’s worth a damn.

Being poor is hoping the toothache goes away.

Being poor is knowing your kid goes to friends’ houses but never has friends over to yours.

Being poor is going to the restroom before you get in the school lunch line so your friends will be ahead of you and won’t hear you say “I get free lunch” when you get to the cashier.

Being poor is living next to the freeway.

Being poor is coming back to the car with your children in the back seat, clutching that box of Raisin Bran you just bought and trying to think of a way to make the kids understand that the box has to last.

Being poor is wondering if your well-off sibling is lying when he says he doesn’t mind when you ask for help.

Being poor is off-brand toys.

Being poor is a heater in only one room of the house.

Being poor is knowing you can’t leave $5 on the coffee table when your friends are around.

Being poor is hoping your kids don’t have a growth spurt.

Being poor is stealing meat from the store, frying it up before your mom gets home and then telling her she doesn’t have make dinner tonight because you’re not hungry anyway.

Being poor is Goodwill underwear.

Being poor is not enough space for everyone who lives with you.

Being poor is feeling the glued soles tear off your supermarket shoes when you run around the playground.

Being poor is your kid’s school being the one with the 15-year-old textbooks and no air conditioning.

Being poor is thinking $8 an hour is a really good deal.

Being poor is relying on people who don’t give a damn about you.

Being poor is an overnight shift under florescent lights.

Being poor is finding the letter your mom wrote to your dad, begging him for the child support.

Being poor is a bathtub you have to empty into the toilet.

Being poor is stopping the car to take a lamp from a stranger’s trash.

Being poor is making lunch for your kid when a cockroach skitters over the bread, and you looking over to see if your kid saw.

Being poor is believing a GED actually makes a goddamned difference.

Being poor is people angry at you just for walking around in the mall.

Being poor is not taking the job because you can’t find someone you trust to watch your kids.

Being poor is the police busting into the apartment right next to yours.

Being poor is not talking to that girl because she’ll probably just laugh at your clothes.

Being poor is hoping you’ll be invited for dinner.

Being poor is a sidewalk with lots of brown glass on it.

Being poor is people thinking they know something about you by the way you talk.

Being poor is needing that 35-cent raise.

Being poor is your kid’s teacher assuming you don’t have any books in your home.

Being poor is six dollars short on the utility bill and no way to close the gap.

Being poor is crying when you drop the mac and cheese on the floor.

Being poor is knowing you work as hard as anyone, anywhere.

Being poor is people surprised to discover you’re not actually stupid.

Being poor is people surprised to discover you’re not actually lazy.

Being poor is a six-hour wait in an emergency room with a sick child asleep on your lap.

Being poor is never buying anything someone else hasn’t bought first.

Being poor is picking the 10 cent ramen instead of the 12 cent ramen because that’s two extra packages for every dollar.

Being poor is having to live with choices you didn’t know you made when you were 14 years old.

Being poor is getting tired of people wanting you to be grateful.

Being poor is knowing you’re being judged.

Being poor is a box of crayons and a $1 coloring book from a community center Santa.

Being poor is checking the coin return slot of every soda machine you go by.

Being poor is deciding that it’s all right to base a relationship on shelter.

Being poor is knowing you really shouldn’t spend that buck on a Lotto ticket.

Being poor is hoping the register lady will spot you the dime.

Being poor is feeling helpless when your child makes the same mistakes you did, and won’t listen to you beg them against doing so.

Being poor is a cough that doesn’t go away.

Being poor is making sure you don’t spill on the couch, just in case you have to give it back before the lease is up.

Being poor is a $200 paycheck advance from a company that takes $250 when the paycheck comes in.

Being poor is four years of night classes for an Associates of Art degree.

Being poor is a lumpy futon bed.

Being poor is knowing where the shelter is.

Being poor is people who have never been poor wondering why you choose to be so.

Being poor is knowing how hard it is to stop being poor.

Being poor is seeing how few options you have.

Being poor is running in place.

Being poor is people wondering why you didn’t leave.

Popularity: unranked [?]

microblog: ThisIsWhyYoureFat Dot Com http://ping.f…

Filed under: Mini Blog — Tags: , , — webadmin @ 9:33 am


 

ThisIsWhyYoureFat Dot Com http://ping.fm/73ck4 – The GREATEST web site EVER! I especially like this little number: http://ping.fm/w3xYX

Popularity: unranked [?]

Powered by WordPress

Blog Information