Archive for March, 2010

more coding funzz!

on the topic of “figuring things out wrt coding” — i was working on converting a site to wordpress and was trying to figure out how to get a home page movie to appear ONLY on the home page (easily).
so i looked around and found out there was a wordpress function called “is_front_page()”

so, along with a nifty fade in/fade out script, i created this in the header.php file:

<?php
  if ( is_front_page() ) {
  echo "
    <div class=\"hpmovie\">
      <div id=\"xlide\">
        <img src=\"wp-content/themes/[THEMENAME]/images/5.jpg\"
          alt=\"\" />
        <img src=\"wp-content/themes/[THEMENAME]/images/11.jpg\"
          alt=\"\" />
        ...
      </div>
    </div>
  ";
  }
?>

so basically, if it’s the home page, it’ll write stuff to the page… boom

coding fun!

so this won’t make sense to any of you, but i was pretty proud of myself when i made this. i used various xsl elements to basically have the page pull data from an xml document:

xsl

...
<xsl:variable name="readmore">
  <xsl:choose>
    <xsl:when test="@readmore != ''">
      <xsl:value-of select="@readmore" />
    </xsl:when>
    <xsl:otherwise>
      See all <xsl:value-of select="@title" />
    </xsl:otherwise>
  </xsl:choose>
</xsl:variable>
<div style="font-size:8pt;">
  <a href="[email protected]}"><xsl:value-of select="$readmore" /></a>
</div>
...

this is a sample of the xml that it pulls:

<page id="..." title="Newsletters" url="newsletters.asp"
  thumbnail="include/media/images/products-newsletters.gif"
  description="blah blah blah">

so since there isn’t a title attribute to this node, it’ll default to the title. on the page, it’ll say “See all Newsletters”

i made it myself! yay

anyone but him

a track from fairly new brit hip hop act, mr. hudson

you might’ve heard him on jay-z’s album — “young forever”

httpvh://www.youtube.com/watch?v=E1nbvplgElw

he also reminds me of a stylish “silas” from the da vinci code:

silas
mr. hudson
heard this song first on sarmad’s vegas mega mix earlier this year (tho this isn’t the album version…)

mr. hudson feat. kanye west – anyone but him

Sorry, but there aren't any posts with this date.