Skip to:
Content
Pages
Categories
Search
Top
Bottom

Some valuable Tips with custom template

  • @mohitkr05

    Participant

    Hello all.. I need some tips to start in right direction for the following instances. I want to implement the following things in my home theme.

    1.Extracting the recent blog posts accross my wpmu/buddypress website with thumbnails sof the first image in the post. I have read an article about caching first image of post in wordpress but need some help for mu version.

    2.I dont know have it been asked before or not, but is there any plugin that can make my buddypress admin bar work for external link just like a digg bar.

    3.Helps in adding blogger, wordpress and other blogs /(external) blogs to the member fields, as seen in flokka.com

    Thanks for ur help

Viewing 3 replies - 1 through 3 (of 3 total)
  • @r-a-y

    Keymaster

    For #1, use Justin Tadlock’s Get The Image plugin in a loop. Or to make things easier, use Tadlock’s query_posts widget with Get The Image to easily define which posts to display. The Get The Image plugin does not cache the images though.

    If you’re looking for image resizing / caching, try TimThumb from darrenhoyt.com… although I never have been able to get that working on WP.

    For #2, there’s two plugins that I know of.

    First one is The WordPress Bar. The second one is Pretty Link. It will not integrate with the BP bar… it will add another bar for external pages.

    For #3, you’ll have to get creative with the xprofile fields. I have something setup with a BP install I’m working on, which manipulates the BP profile loop and uses CSS manipulation to display the social badges.

    @mohitkr05

    Participant

    Thanks R-A-Y

    For 3rd i was talking about the external blogs plugin..a post says it will be available later in roadmap.

    @mohitkr05

    Participant

    i have used this code to display the images from the post.

    <?php if (bp_has_posts()) : ?>

    <?php while (bp_has_posts()) : bp_the_post(); ?>

    <?php

    $szPostContent = $post->post_content;

    $szSearchPattern = ‘~<img [^\>]*\ />~’;

    // Run preg_match_all to grab all the images and save the results in $aPics

    preg_match_all( $szSearchPattern, $szPostContent, $aPics );

    // Check to see if we have at least 1 image

    $iNumberOfPics = count($aPics[0]);

    if ( $iNumberOfPics > 0 ) {

    // Now here you would do whatever you need to do with the images

    // For this example the images are just displayed

    for ( $i=0; $i < $iNumberOfPics ; $i++ ) {

    echo $aPics[0][$i];

    };

    };

    endwhile;

    endif;

    ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Some valuable Tips with custom template’ is closed to new replies.
Skip to toolbar