Posts Tagged data

Using files for page templates in Textpattern

Hicksdesign Go to the source

One of Textpattern’s drawbacks has always been that page templates are saved in the database. Editing them means using the textarea in the TXP admin interface, but I’m sure most people would prefer to use their favourite text editor. Here’s a workaround that works in TXP 4.2.0 (I haven’t tried other versions). Once you’ve enabled ‘Allow PHP in pages?’ in Advanced Preferences and set up your sections and page templates, put everything in your page template into a file (such as ‘pagetemplate.php’), and replace it with a PHP include: <txp:php>$docRoot = getenv("DOCUMENT_ROOT");include($docRoot.'/pagetemplate.php');</txp:php> You still need to setup your templates in TXP admin, but from there on in, you can edit the templates in a text editor and upload them. There may be a performance hit doing this, but all TXP tags work. Much easier! Update : Thanks to Sam Brown for this much neater version: <txp:php>include(txpath.'/pages/default.php');</txp:php> This is much shorter, but be aware that the ‘txpath’ value takes you to the textpattern folder rather than the site root… Read the rest here

Changing Display Resets Scroll Offset

Snook Go to the source

In Chrome 5, Safari 4, Opera 10.53 and sometimes Firefox (although I was unable to reproduce it in this test case), changing the visibility of the element by toggling display:none will cause the scroll offset to reset to zero. Toggling visibility:hidden does not seem to trigger the same problem. Scroll the container and then toggle the classes applied. Class applied: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. … Read the rest here

The format of The Long Now

Adactio Go to the source

In 01992, Tim Berners-Lee wrote a document called HTML Tags . In September 02001, I started keeping this online journal. Back then, I was storing my data in XML, using a format of my own invention. The XML was converted using PHP into (X)HTML, RSS, and potentially anything else …although the “anything else” part never really materialised. In February 02006, I switched over to using a MySQL database to store my data as chunks of markup… Read the rest here

Apple Acquires Personal Mobile Assistant Siri

Cameron Moll Go to the source

Apple Acquires Personal Mobile Assistant Siri : They’re not just acquiring an iPhone app, but all of the smarts behind its mega-aggregator connecting to services such as Rotten Tomatoes, Yelp, TaxiMagic, OpenTable, and so on—just about anything a user could ask for with a natural language query. Watch the demo and you’ll probably be as impressed as I am with not only the query data but the user experience, too. … Read the rest here

New HTML5 Form Field Type: range

Cameron Moll Go to the source

New HTML5 Form Field Type: range : Amidst all the HTML5 buzz over the past year, somehow I missed this: HTML5 offers a new input field type, type=”range” , which renders a UI slider for entering data anywhere between the min and max values you specify. This feature could become as useful as CSS multiple backgrounds, in that a) it’s long overdue and b) we’re already faking it all over the web. The HTML5 presentation from which this slide was taken, by the way, is wonderful. It’s an interactive teaching tool on the subject of HTML5, CSS3, and JavaScript APIs. Slide 41 is really wild—press 3, then arrow left or right. Update: I failed to mention these slides are best viewed with a browser that already supports these features, i.e… Read the rest here

Hundred Pushups

Snook Go to the source

Have you heard of Hundred Pushups ? It’s a simple six-week program to build up your strength by slowly increasing the number of pushups you can complete. By the end of six weeks, you should be able to complete 100 and along the way you’ve gotten a short workout working multiple muscle groups. Since I’m still trying to lose weight , I figured I’d get started on the program (yesterday was my first day and managed to do 12 pushups at the end of my first set). However, being the geek that I am, I thought, "I should track my progress with a cool iPhone app." There is one available for $1.99 from the Hundred Pushups web site. … Read the rest here

HTML5 Forms Are Coming

Snook Go to the source

HTML forms have been, to date, quite simplistic. We’ve had limited options: the text field, the checkbox, the radio button, the textarea and finally the select drop down. Any complex data like phone numbers, email addresses or dates had to be checked by JavaScript. (And you should always and I mean always do server-side validation of the data.) The input element works overtime by being rendered completely differently based on the type it’s given—be that a text field, password, checkbox, radio button, and others. Considering my readership, this is all terribly old and boring to you now. I understand… Read the rest here

Linkrot

Adactio Go to the source

The geeks of the UK have been enjoying a prime-time television show dedicated to the all things webby. Virtual Revoltution is a rare thing: a television programme about the web made by someone who actually understands the web ( Aleks , to be precise). Still, the four-part series does rely on the usual television documentary trope of presenting its subject matter as a series of yin and yang possibilities. The web: blessing or curse? The web: force for democracy or tool of oppression… Read the rest here

Zootool

Hicksdesign Go to the source

The last thing I needed was more choice in apps for keeping a ‘Design Scrapbook’, but that’s what’s happened with Zootool . At first glance, it looked like just another FFFF ound , Ember or Img Spark , but it turns out it’s much more than that. The developer, Bastian, told me to think of it as more of a visual Delicious. Once I got into that mindset it made more sense. Zootool ‘lassos’ not only images, but documents (like PDF s), videos, and pages (not complete pages yet) and stores them in your ‘zoo’… Read the rest here

Older Than…

Mezzoblue Go to the source

For no particular reason, I present to you a list of things that were true on August 27, 2001 : The iPod, XBox, YouTube, Facebook, Flickr, Ubuntu, and Blu-Ray did not exist. IBM was still in the PC business, Handspring was still around, and Blackberries were data-only devices with no telephone capabilities. The Euro had not yet entered circulation, currencies like the Franc, Mark and Lira were still legal tender. George Harrison, The Queen Mother, Gregory Peck, Barry White, Johnny Cash, Ronald Reagan, Ray Charles, Julia Child, Pope John Paul II, Johnny Carson, Steve Irwin, Gerald Ford and Michael Jackson were still alive. SARS, Avian Flu, H1N1 were not in the common vernacular… Read the rest here

Older Than…

Mezzoblue Go to the source

For no particular reason, I present to you a list of things that were true on August 27, 2001 : The iPod, XBox, YouTube, Facebook, Flickr, Ubuntu, and Blu-Ray did not exist. IBM was still in the PC business, Handspring was still around, and Blackberries were data-only devices with no telephone capabilities. The Euro had not yet entered circulation, currencies like the Franc, Mark and Lira were still legal tender. George Harrison, The Queen Mother, Gregory Peck, Barry White, Johnny Cash, Ronald Reagan, Ray Charles, Julia Child, Pope John Paul II, Johnny Carson, Steve Irwin, Gerald Ford and Michael Jackson were still alive. SARS, Avian Flu, H1N1 were not in the common vernacular. Enron and WorldCom were still in business. … Read the rest here

7 Ways to Improve your Public Speaking

Andy Budd Go to the source

As a self confirmed conference junkie I speak at a dozen events each year, and attend many more. As such I’ve probably seen close to a thousand talks over the last five years. Because of this I’ve got a pretty good idea what makes for an exciting talk and how you can guarantee your session will suck. As somebody who also organises two conferences, UX London and dConstruct I’m really keen on getting new talent into the speaking circuit while still maintaining quality. As such I’ve put together a quick guide to help both new and experienced speakers kick arse/ass. Most of these tips aren’t new, but you’ll be surprised how few people actually follow them. … Read the rest here

Correcting Corrupted Characters

Eric Meyer Go to the source

At some point, for some reason I cannot quite fathom, a WordPress or PHP or mySQL or some other upgrade took all of my WordPress database’s UTF-8 and translated it to (I believe) ISO-8859-1 and then dumped the result back right back into the database. So “Emil Björklund” became “Emil Björklund” . (If those looked the same to you, then I see “Börklund” for the second one, and you should tell me which browser and OS you’re using in the comments .) This happened all throughout the WordPress database, including to commonly-used characters like ’smart’ quotes, both single and double; em and en dashes; ellipses; and so on. It also apparently happened in all the DB fields, so not only were posts and comments affected, but commenters’ names as well (for example). … Read the rest here

Isolation

Mezzoblue Go to the source

You probably experience this on a regular basis: a client sends you an illustration or a logo they’d like to use in a project, but it’s a low-res bitmap or a flat image file with a background texture. Or both, if you’re really lucky. Sure, you can try and ask for a vector version, but more often than not what they originally sent was the best copy they had on hand. I seem to have made something of a hobby out of trying to coax useful results out of this type of file. Over the years I’ve stumbled across far better ways of doing it than manually clipping the background with the the magic wand or various selection tools. For the next time you’re handed a less-than-ideal source image, here are a few of my tricks for isolating the part of the file I want to work with in Photoshop. … Read the rest here

On e-book vs. printed book sales, Mobile Web Design, and CSS Mastery 2

Cameron Moll Go to the source

This post will most likely come off as a ramble of sorts, but I’m okay with that. I figure I write enough stuff carefully crafted, from punctuation to grammar to sentence structure, that I can afford a break once in a while. Even if publicly. Speaking of writing, this post is all about that. Let’s start with a question I’m asked occasionally by those of you considering authoring something of your own: Should I sell my book as a PDF or publish it in print (either via Lulu or a publisher)? First of all, if you’re considering self-publishing, I’ve already written about the ups and downs of that … Read the rest here

Yojimbo 2 upgrade

Hicksdesign Go to the source

Yojimbo 2 has suddenly arrived! , but I’ve immediately hit a snag. When you first open it, Yojimbo 1 users are met with this message: So if you try out version 2, you screw up your installation of 1. It’s good manners that it warns you, but a better solution would be to offer a backup and restore facility. The message put me off upgrading, but I found the database (home>Library>Application Support>Yojimbo) and have backed it up. Hopefully, if I decide not to upgrade, I can just restore this folder to revert to version 1. Great to see a new improved icon though! Update : Making a backup of the database works, although I found that wasn’t enough… Read the rest here

Building a URL Shortener

Snook Go to the source

With all the talk of URL shortening services, I decided to add a quick service into Snook.ca, which is run on CakePHP, to redirect a short URL to a post. Because my static content already has short URLs and all I have are posts, creating a short URL handler for it was very easy. To give you some context, I route my posts through a specific structure: /archives/:category /archives/:category/:articlename In this case, I have a couple routes that route everything to my Posts controller and the bycat or view actions. These action take the named parameters and pulls out the appropriate content. Easy peasy. … Read the rest here

Shoot

SimpleBits Go to the source

The Bitcave was temporarily transformed into a video studio this week, while shooting a DVD for New Riders . I’ll have much more info on the video and other fun stuff related to it, soon. After seeing all the work that goes into setting up a simple shoot like this (lighting, sound, rigging, data transfers) I have newfound respect to those that produce motion stuff for a living. There were parts of the taping where I felt comfortable (when presenting against familiar material) and other times where it was downright grueling (talking directly to the camera for 30 takes in a row). Major props to those that can do this kind of thing on a regular basis, and make it look effortless… Read the rest here

Streamliner

Snook Go to the source

Now that I have a little more free time, I’ve begun the process of bringing Snitter back to life. The crowd of desktop applications has not deterred my resolve to (re)build a Twitter application of my own. I have a vision — a vision that I’ve had since before SXSW of last year — that I still have an opportunity to bring to fruition. However, along the way, I’ve decided to accomplish a little extra along the way: I’m building a framework to allow others to build their own applications quickly and easily. This framework, I have dubbed Streamliner . … Read the rest here

Handling an Explicit-Width Bug in Internet Explorer

Eric Meyer Go to the source

In creating the combo-bar charts for the survey report , I stumbled into an Explorer bug that I didn’t remember ever seeing before, and Google didn’t turn up anything that seemed to be related. This could easily mean that I’m the only person who ever did something this insane and thus found the bug. It could just as easily mean that my Google-fu has failed. Either way, I’ll write it up here so it can enter the collective memory. … Read the rest here