Lion drawing for free use

I created this in photoshop, thought I should share it with the world. Use it for whatever you like, but credit me when using it; link to this site…

I created this in photoshop, thought I should share it with the world. Use it for whatever you like, but credit me when using it; link to this site…
This has probably been done before, but check out my ajax-like search! Very easy code, it just uses the text on the page. But you can rewrite it to talk to php scripts, I guess I will do this later, and perhaps explain the code a little.
And please comment if some of the code should be changed for better appearance. I can see that the divs don’t float the way they should. I will check this later.
UPDATE: works now in IE. The reason it didn’t work was that document.getElementsByName() isn’t working in IE (at least IE7). I found a fix and implemented it.
We are to do this by creating two files you put serverside. The first one, can be called twitter.php. Here’s the code:
<a href=”http://www.twitter.com/pan100lion”>
<?php
$twitterDOM = new DOMDocument();
$twitterDOM->encoding = ‘UTF-8′;
$twitterDOM->load(”http://twitter.com/statuses/user_timeline/37750230.rss”);
$xslt= new DOMDocument();
$xslt->encoding = ‘UTF-8′;
$xslt->load(”twitterstub.xsl”);
$processor = new XSLTProcessor();
$processor->importStylesheet($xslt);
$output = $processor->transformToDoc($twitterDOM);
echo $output->saveXML();
?>
</a>
Swap the link on the line $twitterDOM->load with your own feed adress. You’ll find it at your twitter page.
File number 2 is called twitterstub.xsl:
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp " ">
<!ENTITY copy "©">
<!ENTITY reg "®">
<!ENTITY trade "™">
<!ENTITY mdash "—">
<!ENTITY ldquo "“">
<!ENTITY rdquo "”">
<!ENTITY pound "£">
<!ENTITY yen "¥">
<!ENTITY euro "€">
]>
<xsl:stylesheet xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”
xmlns=”http://www.w3.org/1999/xhtml”
version=”1.0″ >
<xsl:output method=”html”
media-type=”text/html”
doctype-public=”-//W3C//DTD XHTML 1.0 Transitional//EN”
doctype-system=”http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”
indent=”yes”
encoding=”UTF-8″ />
<xsl:template match=”/”>
<xsl:for-each select=”rss/channel/item”>
<xsl:if test=”position() < 2″>
<p><xsl:if test=”position() = 1″>
<xsl:attribute name=”style”>font-weight:bold; font-size:10px</xsl:attribute>
</xsl:if>
<xsl:value-of select=”title” />
<i>
(<xsl:value-of select=”pubDate” />)
</i>
</p>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
this is a stylesheet with info on how to parse the file. It is programmed to only take the first one, but it can be altered to take several posts if you know some xsl. Read more about xslt here.
Oh yeah, and you need to include the twitter.php file where you want it to appear. Like this: <?php include(’twitter.php’) ?>
I was planning on installing adsense on this blog, and I have now found a theme for doing so. My adsense account is not ready yet, so I assume someone else gets the vast amount of dollars ticking in than me right now.
The theme I use is Prosense, and I read about it here.
Music for code – code for music. I find Jeff Beck and his whacky guitar tunes to be somewhat inspiring to listen to while coding.
For a web developer, the coding environment is one of the most important factors in effective work. Being a fresh web developer, it is perhaps even more important to focus on finding the best tools available for coding. The first six months of my career I used Dreamweaver CS4 some and Eclipse some, for my php programming. I found that Eclipse was far better on code completion – but not as good as it is on Java. Even with plug-ins. But Dreamweaver has built-in ftp support, this can of course be bulit in to Eclipse, but I haven’t tried it. You can probably also have a WYSIWYG editor in Eclipse, but I can’t seem to find a distro suiting my needs. And when I install plugins, they tend to introduce bugs to other parts of Eclipse. Frustrating!
When I started working for Kyber now in April, they introduced me to PSPad, as an alternative to the relatively expensive Dreamweaver. It turned out to work great (I have used it for classic asp coding and not for php though) for web development coding! It has a built-in ftp client, this is actually important, and it allows code completion. The only thing I could wish for now, was an advanced SQL database administration panel so that I could edit the DB and the site files in the same application. Now, I remote the IIS server and edit the database directly there by using the MS tool (I don’t remember what it’s called right now).
I have the feeling Eclipse can be tweaked for my needs, if anyone out there knows about a distro including the features I have discussed, please leave a comment to this post. But, for now, still looking for that perfect tool of my dreams – the tool to fall in love with, I can easily recommend trying PSPad. I tried JEdit too, but found it didn’t support drag and drop of files from Explorer in Windows.
More to come on this one – I am planning on building a web site from scratch in pspad. Keep reading the blog!