The Loop and Multiple Queries

By | WordPress, Work | No Comments

This is the bit i’m srtuggling with:

[code]

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<h2><a href=”<?php the_permalink() ?>” rel=”bookmark”>

<?php if( get_post_meta($post->ID, “hpbottom”, true) ): ?>
<img style=”float:left;margin:0px 10px 0px 0px;width:50px; height:50px;” src=”<?php echo get_post_meta($post->ID, “hpbottom”, true); ?>” width=”150″ height=”150″  alt=”<?php the_title(); ?>” />
<?php include(TEMPLATEPATH.”/Cat_Thumb_Assign.php”);?>
<?php endif; ?>


<?php if (is_category(’28’) ): ?>
<?php include(TEMPLATEPATH.”/cat_tweet.php”); ?>
<?php else: ?>

<?php the_title(); ?></a>
</h2>
<div class=”date”>
<div class=”dateleft”>
<p><span class=”time”><?php the_time(‘F j, Y’); ?></span>
by <?php the_author_posts_link(); ?> &nbsp;<?php edit_post_link(‘(Edit)’, ”, ”); ?>
Filed under <?php the_category(‘, ‘) ?></p>
</div>

<div class=”dateright”>
<p><span class=”comment”><?php comments_popup_link(‘Leave a Comment’, ‘1 Comment’, ‘% Comments’); ?></span></p>
</div>
</div>

<?php the_content(__(‘Read more’));?><div style=”clear:both;”></div>

<!– These are the ‘tags’ markup   <div class=”postmeta2″>
<p><span class=”tags”>Tags: <?php the_tags(”) ?></span></p>
</div>–>
<div style=”border-bottom:1px dotted #2255AA; margin-bottom:10px; padding:0px 0px 10px 0px; clear:both;”></div>

<?php endif; ?>

<?php endwhile; else: ?>

<p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p>

<?php endif; ?>

[/code]

I want it to choose a thumbnail depending on the catagory (the thumbnail assigning happens in  Cat_Thumb_Assign.php). This I’ve had working no problem. Then it should  choose how to display that post dependingon wether its either catagory 28 (a twitter update) or not.

Can anyone figure this out?

New Linkage

By | WordPress | No Comments

I’ve just changed the permalink structure of the site so I apologise to anyone who has linked to my site and the links break.

On the fence

Unless you linked to summat and didn’t tell me – the  toy deserve to DIIIIEEEEE…..umm ok maybe a bit harsh.

Great Weekend

By | Family, Rides, WooYaa | No Comments

24052009091

Sunday: I went for my first ride on Sarah since before I got married. It was sheer bliss but shocking aso how out of practice i am. I cold’nt get any good lines. I was stiff over the roots and rocks, I was exhasted and felt like i was gonna keel over after the first 5 mins. But it was GREAT! Ruth and I discussed our timing on these things and agreed that Sunday morings were the best time for me to ride.

I went down my old local loop to the Canal and te greenford estate BMX track which was in even more disrepair than ever.  Quite sad really. I couldn’t  ride a full set due to the amout of broken glass and the remnants of fires. Never mind the state of my fitness.

I still enjoyed it and got some un which was ace.

24052009095

24052009093

24052009089

On Monday we went down to Henley and chilled out for the day with my folks. we had some lunch then went for a walk with them where Dad took me “in search of adventure”. This mean trespassing!

I love my Dad for these stunts he pulls. I think Ruth really finally reailsed where i get my crazy ideas from. He showed methis great old chapel and the groundsof a certain private property.

25052009097

25052009096

25052009100

25052009101

25052009102

It was ace.

It’ coming together….

By | WordPress | No Comments

 im-dev

It’s coming back tpogether now bu  i still need to figure out how to implement the catagory template code. The thumbnail code works great but the tweets need to be condensed hence th catagory template need:

<?php
$post = $wp_query- >post;
if ( in_category(‘3’) ) {
include(TEMPLATEPATH . ‘/cat3.php’);
} elseif ( in_category(‘4’) ) {
include(TEMPLATEPATH . ‘/cat4.php’);
} else {
include(TEMPLATEPATH . ‘/cat.php’);
} ? >

Lets see if we can get it to this:

New Layout

New Layout

Good grief this is an awful mess

By | WordPress | No Comments

I really am making a mess ofthis site i think i need my head examined. I am living in th hope that if i can pull it off It will work and look amazing – well as amazing as i want it to look, but i keep having too many ideas that flit throug my head and i dont write em down and then i forget them….

I gotta have some faith that ican do this. God game me some Skillz and i intend to use em.

HTML CAN NOT DO THAT!!!1!!

Star Trek – WOOT

By | Film | One Comment

 thumbs

Wifey and i went out for our weekly date night last night and did the usual thing of Nandos and a Movie.

Nandos! Oh how i love Nandos. What a brilliant food chain……mmmmm…..spicy chicken.

THEN we wnet to see Star Trek.

WOW…………yes i said WOW

It was great. Being brought up on the show, it gave me a real sense of nostalgia. With all the lame back-stories going around (like Wolverine) i was expecting this to be a bit rubish but i really really enjoyed it. Thelevels of reference to the original series was amazing from the obvious to the ever so subtle.

I don’t really wanna give anything away for hose who have not seen it so I’ll stop here…

BUT GO SEE IT!!!!

bad from low angles

By | Photos | No Comments

 13052009069-001

I have realised that when i really need a shave, and I am lit from the back, and I am tired, and I am using a crappy flash, and I’m being shot from a low angle  that i look rubbish……

…the rest of the time i look just dandy!

Henley Happened

By | Love, Photos | No Comments

08052009039

Wifey and i had a really great weekend in Henley. The plan as to do NOTHING! that pln was achieved. We mostly slept, chilled, read, walked and …well…did nothing…as i …said.

We saw some firends on sat afternoon down in twyford which was cool

On a whole – it was justwhat the doctor ordered. I didn’t realise how stressed i had been until i stopped!

ReDev…again

By | WordPress | 3 Comments

I’m trying desperately to do some hardcore WordPress theme development and i fear i am a wee bit over my head. However, usually when i do something stupid and try and make the site do something it doesn’t normally, well, i’m always in way over my head but there you go. I am posting this here and on wordpress.org to see if anyone can help me with it.

Old Current Version

Old Current Version

The first image here is how the site currently works/looks. First it takes the most recent post and features it at the top of the page. Then it goes on to display the next ten or so posts with thumbnails albeit limited to 220 characters or so. It is checking the category then assigning the appropriate image. It does that using the following code:

<?php if (is_category(‘7’) ):
<img src='<?php bloginfo(‘template_url’);?>/images/cat7.jpg’ alt=” />
<?php } elseif (is_category(‘8’) ):
<img src='<?php bloginfo(‘template_url’);?>/images/cat8.jpg’ alt=” />
<?php endif; ?>

This is an abbreviation of the full code used as i’m using about 10 diff categories and thumbnails.

This is all a bit messy to be honest. And now i am using twitter it is becoming crowded with that little bird bless him. I want to restyle the layout of the posts. That can be done simply with some good CSS. What I really want to do though is to change the layout of the tweet posts completely.

 

New Layout

New Layout


This is where the second image comes into play. This image shows roughly how i’d like to display the Tweet posts and the standard posts. I’m gonna do away with featuring the first post as its not really for me on this site – i hate it actually. You will see though that the layout of the tweetpost is very different from the standard one.

I’m using twitter tools to sort the tweets and part of what it does is post my tweets as posts but in doing so it creates a title as well as the content. Fair enough

– it has to for wordpress. I don’t want it to display the Title ad the content. I want to get rid of the titles for these tweetpots.

The way i have been thinking of doing it:

I want to create different templates for each category then create a query in the loop to see which template to use to display the post. The lovely people at wpcandy.com have created a great cheat sheet on a PDF (found this via webdesignledger.com), on the 3rd page is the following code:

<?php
$post = $wp_query- >post;
if ( in_category(‘3’) ) {
include(TEMPLATEPATH . ‘/cat3.php’);
} elseif ( in_category(‘4’) ) {
include(TEMPLATEPATH . ‘/cat4.php’);
} else {
include(TEMPLATEPATH . ‘/cat.php’);
} ? >

I want to put this code in to my pages so that whenever a tweet or standard post appears that it will display in a nice and pretty fashion. I just don’t have the PHP/WordPress skills to know which bits of code to change. I have been trying but i keep getting errors.

SOOOOOOOOOO…..

any ideas?

If anyone out thewre with a super-brain cares to crack this one i’d be a very happy boy.

Questions welcome.

You can find this as a forum post on the wordpress forums too here.

BTP

By | Blog, Video, Work | No Comments

Film I made for BTP in May 2009:

[quicktime]http://www.irishmark.net/MEDIA/Films/BTP_OUTSTANDING_TEAMWORK.mp4[/quicktime]