TIGblogs TIG | TIGblogs GROUP TIGBLOGS LOGIN SIGNUP
betzster's Blog
betzster's Blog
« previous 5


Tidy up the RSS

I’ve been playing around with backing up my tweets lately. At this point I’m using the Twitter Tools plugin to create a weekly digest. Since I created a Tumble-blog not to long ago to share social stuff like this I also wanted the tweets to go to tumblr. Part of this was just a way to clean up Tumblr and not create a new post everytime I tweet.

Now, having the tweets on the blog is mostly for me. I didn’t want to bombard people that are subscribed to the RSS feed with this weekly mashup of all my tweets, but still be able to have the RSS feed to send to Tumblr or for anybody that wants it.

This is what I ended up doing:

function tweetRSS123($query) {
	if ($query->is_feed && !is_category()) {
		$query->set('cat','-1');
		}
return $query;
}

add_filter('pre_get_posts','tweetRSS123');

I got the idea somewhere on the web that I can’t remember. The big change that I made was !is_category(). Which just says if it’s a category archive, don’t do anything. So it won’t remove the category from RSS if you actually take the RSS of that category.

So far it seems to be working. It’s hard to tell if it’s going to get along with the W3 Total Cache plugin, but I think I’m finally at a point where it’s going to work. It’s going to be really awesome if this works because I just spent an hour throwing together a plugin to send it to Tumblr just-in-case, but I’d really rather not use it.

If You Want to Use It

So there are two ways of using this snippet in your own theme. The way I’m doing it is to put this in the functions.php file for your theme, which gets treated just like a plugin except that it’s on a per-theme basis. This is where you can put any PHP function that are specific to your theme.

The other way would be to to add just a little bit more code and install it as a plugin, which is probably what I’ll be doing a little later when I get some free time to throw that together. The advantage of using something like this as a plugin instead of in your functions file is that it stays around for any theme that you use. If you forget to add this to the next theme you use though, your category is going to show up again.

You’ll have to remember to change the ‘-1′ value to the negative of the category ID that you want to exclude. The value is negative because we want to exclude it. If it were positive it would only include that category, which probably isn’t a good idea for your RSS feed.


February 27, 2010 | 11:02 AM Comments  0 comments

Tags:


2010-02-21 Twitter Updates

class="aktt_tweet_digest">
  • @ href="http://twitter.com/drtechnickal">drtechnickal he's back RT @ href="http://twitter.com/pathartl">pathartl oh my god chrome is so much faster than safari href="http://twitter.com/joshbetz/statuses/9104730775">#
  • @ href="http://twitter.com/BlatzLiquor">BlatzLiquor The copyright on blatzliquor.com still says 2009. Have your designer do it dynamically with <?php echo date('Y', time()); ?> href="http://twitter.com/BlatzLiquor/statuses/9120279665">in reply to BlatzLiquor href="http://twitter.com/joshbetz/statuses/9120618369">#
  • RT @ href="http://twitter.com/biz">biz: "I used to think I was indecisive, but now I'm not so sure." href="http://twitter.com/joshbetz/statuses/9159457573">#
  • @ href="http://twitter.com/pathartl">pathartl i've got chrome on the macbook mini and the macbook synced href="http://twitter.com/joshbetz/statuses/9197028458">#
  • @ href="http://twitter.com/pathartl">pathartl you can sync chrome with your google account though. and i use dropbox to sync files across… there wouldn't be enough space href="http://twitter.com/pathartl/statuses/9199641837">in reply to pathartl href="http://twitter.com/joshbetz/statuses/9200644848">#
  • @ href="http://twitter.com/pathartl">pathartl ahh ok href="http://twitter.com/pathartl/statuses/9200727348">in reply to pathartl href="http://twitter.com/joshbetz/statuses/9200864423">#
  • @ href="http://twitter.com/drtechnickal">drtechnickal @pathartl i guess i was late – "First off, welcome. And thanks for opening a Gmail account." 1/21/05 href="http://twitter.com/joshbetz/statuses/9213349329">#
  • Video: Apple Mac OS X Leopard First Intro Full Video (HD) (via YouHDVideoTube) href="http://tumblr.com/xhe6ijxs7" rel="nofollow">http://tumblr.com/xhe6ijxs7 href="http://twitter.com/joshbetz/statuses/9217085925">#
  • oh geez. you had to tell the whole world, haha RT @ href="http://twitter.com/pathartl">pathartl: AHA! href="http://bit.ly/c0OP3a" rel="nofollow">http://bit.ly/c0OP3a href="http://twitter.com/joshbetz/statuses/9218849378">#
  • @ href="http://twitter.com/pathartl">pathartl how bout this? href="http://yfrog.com/1eb79p" rel="nofollow">http://yfrog.com/1eb79p href="http://twitter.com/joshbetz/statuses/9220039990">#
  • @ href="http://twitter.com/travwetzel">travwetzel Group Interview: Expert Advice For Students and Young Web Designers href="http://bit.ly/dcGvK1" rel="nofollow">http://bit.ly/dcGvK1 href="http://twitter.com/joshbetz/statuses/9239280909">#
  • href="http://buildinternet.com/2009/12/the-role-of-college-for-web-designers/" rel="nofollow">http://buildinternet.com/2009/12/the-role-of-college-for-web-designers/ – interesting href="http://twitter.com/joshbetz/statuses/9240970646">#
  • what?? RT @ href="http://twitter.com/pathartl">pathartl: .@joshbetz and his dad are awesome href="http://twitter.com/joshbetz/statuses/9246700706">#
  • Video: Hundreds gather for winter undie run down State Street on Vimeo (via Vimeo) href="http://tumblr.com/xhe6jok4s" rel="nofollow">http://tumblr.com/xhe6jok4s href="http://twitter.com/joshbetz/statuses/9265516460">#
  • href="http://youlooknicetoday.com/episode/sake-period" rel="nofollow">http://youlooknicetoday.com/episode/sake-period – has to be the funniest episode i've listened to yet href="http://twitter.com/joshbetz/statuses/9269144388">#
  • Video: Adobe Photoshop Cook on Vimeo (via Vimeo) href="http://tumblr.com/xhe6jwauo" rel="nofollow">http://tumblr.com/xhe6jwauo href="http://twitter.com/joshbetz/statuses/9273795570">#
  • i'm convinced that i need a kindle href="http://twitter.com/joshbetz/statuses/9287830842">#
  • The Boxee Beta interface is so much nicer than the alpha, but it doesn't really feel like a beta when they put it on a box to sell href="http://twitter.com/joshbetz/statuses/9287959625">#
  • @ href="http://twitter.com/pathartl">pathartl nah. not a DX href="http://twitter.com/pathartl/statuses/9291759473">in reply to pathartl href="http://twitter.com/joshbetz/statuses/9291958451">#
  • @ href="http://twitter.com/pathartl">pathartl href="http://5z8.info/bombbuilding_l3g7_startdownload" rel="nofollow">http://5z8.info/bombbuilding_l3g7_startdownload href="http://twitter.com/joshbetz/statuses/9292013598">#
  • @ href="http://twitter.com/pathartl">pathartl krose has a book deal href="http://twitter.com/joshbetz/statuses/9293769484">#
  • @ href="http://twitter.com/pathartl">pathartl I think i'm going to use this CSS3 menu href="http://www.webdesignerwall.com/demo/css3-dropdown-menu/" rel="nofollow">http://www.webdesignerwall.com/demo/css3-dropdown-menu/ on that project I showed you href="http://twitter.com/joshbetz/statuses/9296199593">#
  • and these href="http://widowmaker.kiev.ua/checkbox/" rel="nofollow">http://widowmaker.kiev.ua/checkbox/ would be sweet in backend/admin options for TSE or something href="http://twitter.com/joshbetz/statuses/9296222331">#
  • time to learn regular expressions href="http://twitter.com/joshbetz/statuses/9305670552">#
  • I love this design: href="http://informationarchitects.jp/" rel="nofollow">http://informationarchitects.jp/ href="http://twitter.com/joshbetz/statuses/9305820758">#
  • tmac was playing with carl landry – now he's playing with marcus landry. href="http://twitter.com/joshbetz/statuses/9310456794">#
  • href="http://bit.ly/cYydud" rel="nofollow">http://bit.ly/cYydud href="http://twitter.com/joshbetz/statuses/9319490709">#
  • @ href="http://twitter.com/pathartl">pathartl href="http://bit.ly/cxflAC" rel="nofollow">http://bit.ly/cxflAC href="http://twitter.com/joshbetz/statuses/9319555594">#
  • Video: UWHIPHOP.COM: ON WISCONSIN REMIX SONG (via Getbacknews) href="http://tumblr.com/xhe6kxctp" rel="nofollow">http://tumblr.com/xhe6kxctp href="http://twitter.com/joshbetz/statuses/9320150369">#
  • Video: YouNews: Giant snowball rolled into street in Madison, WI (via younews) href="http://tumblr.com/xhe6kxiyp" rel="nofollow">http://tumblr.com/xhe6kxiyp href="http://twitter.com/joshbetz/statuses/9320320143">#
  • Video: Super Sprayer (via spacepainter) href="http://tumblr.com/xhe6kxp2n" rel="nofollow">http://tumblr.com/xhe6kxp2n href="http://twitter.com/joshbetz/statuses/9320481698">#
  • @ href="http://twitter.com/pathartl">pathartl krose has a book deal href="http://twitter.com/joshbetz/statuses/9320581226">#
  • href="http://www.youtube.com/watch?v=ha2Rjt0Ju_A" rel="nofollow">http://www.youtube.com/watch?v=ha2Rjt0Ju_A – @ href="http://twitter.com/partharl">partharl, wow that's super high quality video footage right there href="http://twitter.com/joshbetz/statuses/9320910471">#
  • @ href="http://twitter.com/pathartl">pathartl – ooo this is what the cool kids do: href="http://www.youtube.com/watch?v=CsMOf8-ibGE" rel="nofollow">http://www.youtube.com/watch?v=CsMOf8-ibGE href="http://twitter.com/joshbetz/statuses/9321054799">#
  • RT @ href="http://twitter.com/pathartl">pathartl: @ href="http://twitter.com/joshbetz">joshbetz The even cooler kids climb up and use this href="http://yfrog.com/1e8isgj" rel="nofollow">http://yfrog.com/1e8isgj href="http://twitter.com/joshbetz/statuses/9321449407">#
  • @ href="http://twitter.com/pathartl">pathartl @drtechnickal href="http://pleaserobme.com/" rel="nofollow">http://pleaserobme.com/ href="http://twitter.com/joshbetz/statuses/9342001541">#
  • @ href="http://twitter.com/drtechnickal">drtechnickal good ol' RealVNC href="http://itunes.apple.com/us/artist/realvnc/id352019552" rel="nofollow">http://itunes.apple.com/us/artist/realvnc/id352019552 href="http://twitter.com/joshbetz/statuses/9342313418">#
  • @ href="http://twitter.com/DrTechnickal">DrTechnickal yeah, i had another vnc app that was tough to use. When there are free vnc apps who's going to pay $10 for Real VNC? href="http://twitter.com/DrTechnickal/statuses/9344487674">in reply to DrTechnickal href="http://twitter.com/joshbetz/statuses/9348447517">#
  • @ href="http://twitter.com/travwetzel">travwetzel href="http://digg.com/d31JMgO" rel="nofollow">http://digg.com/d31JMgO href="http://twitter.com/joshbetz/statuses/9371838829">#

  • February 21, 2010 | 1:02 AM Comments  0 comments

    Tags:


    Anything Slider: Go on “Go”

    Last week when I was in the CSS-Tricks forums, somebody wanted to modify the functionality of Chris Coyier’s anythingSlider. Not a huge change, he just wanted to make the slider advance to the next panel when you click “Go”. Made sense to me. By the time you click “Go”, you’re done looking at that panel and are ready for the next one. If it doesn’t advance until after whatever delay you’ve setup, it could be confusing.

    Basically what we want to do is make the slider advance to the next panel when we click go, which is the same as advancing to the next panel after we click the start/stop button if the slider ends up playing. It sounds complicated, but it will make more sense when we look at the code.

    base.$startStop.click(function(e){ base.startStop(!base.playing); if(base.playing) base.goForward(true); e.preventDefault(); });

    What I’ve done is find the place where he sets up the Start/Stop button that I mentioned above. Since he’s already go something going on if the button is clicked I used that to add our line that says to advance one panel. It took me a second to figure out that we wanted to slider to be playing instead of paused. The reason for this is that we’re inside the click function, which means we’ve already clicked the start/stop button. This probably seems pretty obvious to most people, but I was coming at this from a different perspective I guess.

    Anyway, this is what I’m using on this site now. I really like the functionality so far. It’s nice to see the slider actually advance when you click go instead of staying on the same slide for another couple of seconds.


    February 9, 2010 | 8:02 AM Comments  0 comments

    Tags:


    Youtube, Vimeo Showing in HTML5

    Both YouTube and Vimeo recently gave an option to watch videos in HTML5. I switched right away knowing that every time I try to play an HD video on YouTube, my Macbook fan spins up because of the heat caused from flash processing. On the Dell Mini I just bought, I couldn’t even watch HD videos on youtube because HD video in flash was too much for the atom processor.

    When I saw that YouTube and Vimeo were offering HTML5 instead of flash video, I immediately tested both of the above mentioned issues. The fan in the macbook stayed quiet and the Dell Mini didn’t have any problems when I watched HD content with HTML5 video instead of flash. This is an example of the power of HTML5 video and why Apple decided to skip flash on the iPad.

    The other thing that I really like about this is the fact that it pushes the HTML5 spec forward that much more. Obviously Google is involved in developing HTML5, so it shouldn’t be a surprise to see this on YouTube. Vimeo, however, is not involved — at least that i know of — in developing the HTML5 specification and just wants clean, efficient code. HTML5 is a good way to do that.

    Finally, Adam Curry recently explained on “The Cranky Geeks” that it’s going to take a long time to derail flash video because of all the money invested in technologies used for ad agencies such as pre-rolls, but I think it would be pretty easy to develop a similar system that work in HTML5.

    All in all, this is good for everyone except Adobe and flash developers. I’m not so worried about the flash developers though, the good ones have the skills to be useful in more than just flash video.


    February 7, 2010 | 4:02 AM Comments  0 comments

    Tags:


    « previous 5


    Josh's Profile


    Latest Posts
    Network Favicons
    Set up VirtualBox for...
    Facebook Hackathon...
    On Comments
    WordPress &...

    Monthly Archive
    April 2007
    May 2007
    June 2007
    July 2007
    August 2007
    September 2007
    October 2007
    November 2007
    December 2007
    March 2008
    April 2008
    May 2008
    June 2008
    July 2008
    September 2008
    October 2008
    November 2008
    December 2008
    January 2009
    February 2009
    March 2009
    April 2009
    May 2009
    June 2009
    July 2009
    August 2009
    September 2009
    October 2009
    November 2009
    December 2009
    January 2010
    February 2010
    March 2010
    April 2010
    June 2010
    July 2010
    August 2010
    September 2010
    October 2010
    November 2010
    December 2010
    January 2011
    February 2011
    March 2011
    April 2011
    June 2011
    September 2011
    October 2011
    November 2011
    December 2011
    January 2012

    Change Language


    Tags Archive
    apache apple asides band blogs coding design dreamweaver florida gallery general globalwarming hosting internet johnmayer network nifty php plugins school service tech theme themes twitter vacation web windows wordpress youtube

    Links
    High School Reunion
    Josh Betz Blog
    Josh Betz Professional
    Josh Betz Projects


    27757 views
    Important Disclaimer