Archive for the ‘site updates’ Category
March 19th, 2010
If you are trying to implement a search field in your website but do not plan on having a submit button (relying on the user to click enter), you’re going to want to put instructions somewhere.
In my case, I decided to populate the box it self with the words “Type and press enter to search”.
1
| <input type="text" name="q" value="Type and press enter to search." id="searchfield" /> |
Unfortunately, this left the user with the task of manually deleting the text in the box before searching. Adding a tiny bit of javascript to your HTML element will automatically remove the text when the user clicks on it and if the user doesn’t enter anything it will add the text back when the user clicks away.
1 2 3
| <input type="text" name="q" value="Type and press enter to search." id="searchfield"
onfocus="if ( this.value=='Type and press enter to search.' ) { this.value = ''; }"
onblur="if ( this.value=='' ) { this.value = 'Type and press enter to search.'; }" /> |
Hopefully it works for you all, I have only tested it in Firefox and Safari on a Mac.
Tags: example, html, javascript, tips
Posted in Uncategorized, site updates | No Comments »
May 12th, 2009
Are you trying to add automatic hashtag and username hot linking in your PHP twitter app?
I just tried to do this with my amdavidson.me lifestreaming site. It’s just two nested regular expressions. If there’s some problem with nested preg_replace functions, or if any regular expression geniuses have better ideas, feel free to comment.
But if not, here’s a little code for you, should make things super easy. It assumes your tweet variable is $tweet, replace with whatever you’d need.
1 2 3 4 5
| echo preg_replace('/\#([a-zA-Z0-9_]{1,15})?/',
"<a href=\"http://hashtags.org/tag/$1\">#$1</a>",
preg_replace('/\@([a-zA-Z0-9_]{1,15})?/',
"<a href=\"http://twitter.com/$1\">@$1</a>",
$tweet)); |
Tags: amdavidson.me, php, snippet, twitter
Posted in site updates | No Comments »
May 4th, 2009
Well, this site just got more tweaking today to make the theme feel a bit more “andr3w”. I’m pretty comfortable with it now, it will certainly still change, but I don’t think it will be all that much.
The theme that I based my theme on is called Minimalism and it was done by Christian Geneahr. In turn it was based on the classic Kubrick, a theme so widely used and appreciated, I would call it the “Pappy” of all Wordpress themes.
With Kubrick’s fine lineage, Christian was able to make quite a nice minimalist theme. It just needed a couple more refinements for me to feel totally comfortable with it and now that my changes are somewhat stable, it’s time for me to do my GPL duty.
So, without further adieu: Minimalism-Revisited.
Tags: blogging, design, gpl, minimalism, theme, wordpress
Posted in design, site updates, wordpress | No Comments »
April 20th, 2009
So the Sweetcron documentation isn’t altogether clear on what you should put in cron for it to update automatically, rather than slowing down a user every 30 minutes.
It’s fairly intuitive, but for those missing this logical step, do the following.
Change the setting in the admin panel from psuedo-cron to true-cron, and take note of the URL.
Then put the following in your crontab file (easily accessed with ‘crontab -e’ on a debian machine):
1
| */5 * * * * curl http://your/true-cron/url |
You can change the 5 to be the number of minutes between updates that you want, and you’ll definitely want to change the URL to the one listed in your Sweetcron’s admin page.
Tags: amdavidson.me, host, lifestream, server, sweetcron, system
Posted in site updates | No Comments »
April 13th, 2009
Changed up the site a little. More to come, wanna try my hand at making the typography interesting.
I just thought the old design was a little over done, so thanks to the awesome theming capability of Wordpress… Here’s a new one.
Tags: design, site, theme, update, wordpress
Posted in design, site updates, wordpress | No Comments »
April 9th, 2009
Sorry to any visitors affected by the malformed site that cropped up due to my last post…
Old habits die hard, and I write too many of my posts in HTML only to have a missing quotation mark leave my page poorly rendered. I need to rely on the (fairly) excellent built in wordpress wysiwyg editor. At least until I write a proper, custom blog engine for this page…
The affected post has been fixed and you can now go about your business.
Tags: blogging, html, site, wordpress, wysiwyg
Posted in site updates, wordpress | No Comments »
February 10th, 2009
photogriffy.net was upgraged to v0.2, this is a pretty major update. I’ve changed the backend to be based entirely on the Flickr API. I was able to crank it all out with rails and the flickraw gem over the course of a few hours. There are still a lot of features I want to add and a bunch of formatting to do, but the site works as it stands. Rails truly is an amazing prototyping framework.
This is part of a larger update to the way I post my photos to the web. It’s getting a bit scattered with some photos posted to AMDavidson.com, some to AMDavidson.me, some to Flickr, and even a few to Twitpic with very little planning or organization.
So, I’m now working towards putting everything on Flickr and then basing my other websites on that content so the content is unified between the sites and doesn’t require bouncing around the web to places unknown to see it all.
Tags: flickr, flickraw, gem, photogriffy, rails, update
Posted in rails, site updates | No Comments »
January 22nd, 2009
Well, I spent an hour or two last night uploading a couple of plugins and playing with the CSS on the site. It’s amazing what you can do with just wordpress.org and a couple of hours.
The theme is (heavily) based on Oulipo by Mignolo. Maybe someday I’ll do my own custom theme, but for now, this’ll do; I’d rather be working on my other sites.
Tags: site, theme, update, wordpress
Posted in design, site updates, wordpress | No Comments »
January 21st, 2009
Switched this blog from Mephisto to Wordpress, not a big migration yet, as there were only three posts to move.
Nothing against Mephisto, but I’d like to focus my efforts on my other site, and use Wordpress for this because it works well, and has a ton of plugin support to get the functionality that I want.
Tags: mephisto, site, wordpress
Posted in site updates, wordpress | No Comments »
January 18th, 2009
Welcome to andr3w.net.
This site has a very simple purpose, in my free time I code my personal site, but that site is becoming more and more of a photoblog and less and less web development content seems relevant there (although I have always kept it to a minimum).
andr3w.net will be my second home on the web with information about my current effort with rails, (x)html, css, js, and whatever else I’m tinkering with at the time.
Check back soon for a restyling from the default Mephisto style and more content as free time allows.
Tags: mephisto, site
Posted in site updates | No Comments »