Month: March 2007

  • Deer Hunter .. Live!

    Anybody here heard of that  computer game Deer Hunter? i didn't know it went live ... some people call it pay-per-view slaughter.

  • booo! stupid $wpdb class

    OK-ok. Ronald was right. I don't need no stinkin' help from nobody. (well actually, nobody even tried)

    had to turn to the dark side on this one. I ended up using the built-in fetch_rss function.

    <?php require_once('blah..blah/wp-includes/rss.php'); ?>
    <?php $rss = fetch_rss('your feed here');
    $ijk = 0;
    ?>

    <?php foreach ( $rss->items as $item ) : ?>
    <?php print ("• ");?>
    <a href='<?php echo $item['link']; ?>'
    title='<?php echo $item['title']; ?>'>
    <?php echo $item['title']; ?>
    </a>
    <br /?>
    <?php
    $ijk++;
    // i want to limit the results to 5
    if ($ijk == 5) {
    break;
    } ?>
    <?php endforeach; ?>

    yeah .. yeah the code looks a little sloppy but it works.

    Check out the implementation.

    http://www.sjbci.org/

    In the sidebar, you can see both the now populated Devotions Box and News & Announcements Box. All contents in that box are now dynamic. Entries for Devotions can be found here and News can be found here.

    For those faint of heart, I can now pull all YB's RSS Feeds and show them on a page where your parents can read what you are up to. Keep in mind that it doesn't matter if you have your site protected or not. - I was looking for the smiley with horns but can't find any so ... in the words of jake, whateber.

  • need help! wordpress gurus anyone?

    Hey folks,

    I've been slaving over this issue the whole night ... i got in trouble too ... and can't seem to find any solution for it.

    URL: http://sjbci.org/index_test.php [update: this link no longer works!]

    Notice the sidebar boxes containing Devotions and News & Announcements entries. I did declare different wp-config.php's, it seems that which db is declared first gets to persist its data and the other $wpdb->get_posts gets to keep the previous data as if it never queried the second db.

    here's the code of the sidebar entries:

        <div class="mSide"><strong>Devotions </a></strong><br />

    <?php
    $how_many=5; //How many posts do you want to show
    require_once("./devotions/wp-config.php"); // Change this for your path to wp-config.php file ?>
    <?
    $devotions=$wpdb->get_results("SELECT `ID`,`post_title` FROM $wpdb->posts WHERE `post_status`= "publish" ORDER BY 'ID' DESC LIMIT ".$how_many);
    foreach($devotions as $devo){
    print ("• ");
    print ("<a href="");
    echo get_permalink($devo->ID);
    print ("">$devo->post_title</a>");
    print ("<br />");
    } ?>

    </div>

        <div class="mSide"><strong>News & Announcements</strong><br />

    <?php
    $how_many=5; //How many posts do you want to show
    require_once("./news/wp-config.php"); // Change this for your path to wp-config.php file ?>
    <?
    $ijk = 0;
    $news=$wpdb->get_results("SELECT `ID`,`post_title` FROM $wpdb->posts
    WHERE `post_status`= "publish" ORDER BY 'ID' DESC LIMIT ".$how_many);
    foreach($news as $np){
    $ijk++;
    print ("$ijk. ");
    print ("<a href="");
    echo get_permalink($np->ID);
    print ("">$np->post_title</a>");
    print ("<br />");
    } ?>
        </div>

    here are my prefixes,
    devotions: $table_prefix  = 'wp_';   
    news: $table_prefix  = 'news_';   

    What's the best way to accomplish this without using XML. I know I can always cURL the feed then do some domdocument and xpath mumbo-jumbo in PHP but I don't want to do that. It's a performance bottleneck anyway.

    Any thoughts?

  • thirtyitis? or just stupidity?

    why did i ever think that 20 * 4 = 800???!!!???

  • hmmm

    i might just become an engineer after all ... 

  • movin' on down ...

    We've had a lot of memories in Budd Lake. Emma's first everything happened there. We will never forget that place.
    But we have to respond to a personal calling and move closer to where our ministries belong. With that out of the way BIG THANKS are in order for friends and family that went out of their way to help us.

    Papa, Mama, Toto, Steph, Kristy (In Spirit), Sam, Squiggly, Eugene, Wendell and Rogie.

    From the bottom of our sore muscles, stained arms, achy backs and bruised .. umm ... bottoms, The Ababa's thank you.

    We might be moving down geographically but we are moving up 708 zip code points to get to where we are.