Weblog

Mar/21: MODx: allow users to edit nested pages, not parents.

This tutorial will show you how to allow users to edit only nested pages, without allowing them access to those pages’ parents.

Scenario: You have a site running on MODx and have several users with varying levels of access. One section of your site has the following structure:

Root
|
-->Resources
	|
 	-->Teachers
  		|
 		-->Classroom Notes

You would like to let your teachers edit the “Classroom Notes” page every day with all the things that have happened that day, but you don’t want them to have access to any other page on the site. In fact most of them are so devoid of technical skill you want all the other pages hidden from the tree view when they login so there is no confusion about which page they are supposed to edit.

So in the Security tab of your manager you create a user group called “teachers” and add all the teachers to this group. You next create a document group called “teacher pages” and add the “Classroom Notes” page to it. Every other page goes to a private “admins only” document group. (Use the Doc Manager module under the Modules tab to mass edit pages’ document group associations.) Finally, you link this document group with the “teachers” user group.

But now you have a problem. Log in as a teacher and you won’t be able to access the page. You will won’t be able to see any pages at all! That’s because the parent pages of “Classroom Notes” are private for admins only.

You could make both the “Resources” page and the “Teachers” page part of the “teachers” document group. Then teachers would be able to see and edit the “Classroom Notes” page, but they would also be able to edit the parent pages. This is not a good option, now they can see three pages instead of just the one you want them to edit.

What to do?

Solution: Enter the @DOCUMENT binding

First, create a template variable called [*importPageContent*]. Give it the caption “Import another pages content with @Document ##” and leave the input type as “text”. Be sure to leave the default value blank, and don’t forget to associate this template variable with the template used by the “Classroom Notes” page.

Second, edit the template used by the “Classroom Notes” page. Add your newly created template variable just below the [*#content*] tag.

Next, create a new document under the root of your site. Give this document the title “Classroom Notes Content” and un-check the “show in menu” box. Associate this page with the “teachers” user group and every other page in the site with the “admins only ” group. Take note of this document’s ID.

Finally, edit your original “Classroom Notes” page. Leave the content text box completely empty and instead insert “@DOCUMENT ##” into the importPageContent variable text box, where ## is equal to the document ID of “Classroom Notes Content” page.

There you go, now the “Classroom Notes” page pulls its content from the “Classroom Notes Content” page and your teachers can only ever see and edit this latter page.

Enjoy!

Mar 21, 2008 MODx CMS 1 Comment

Mar/15: How to install adobe Fireworks 8 from the Studio 8 CD on Ubuntu

My Mac is in the shop having a logic board replaced and I desperately need to work on some fireworks 8 files I have backed up. So… here’s how to get fireworks 8 running on your Ubuntu Linux system, using the Studio 8 install CD.

This solution also solves the problem I and a few other have gotten when trying to run Wine on .exe files on a cd. Wine gives a “Module not found” error which apparently means that the file is not executable by the current user. Hence the chmod command in the instructions.

Disclaimer: I’m using the Alpha Version of Hardy Heron, but this should work with anything.
I’m also running Wine version 0.9.57 which is just the default Hardy Version. You MUST have Wine for this to work.

Step 1: make a directory in your home folder called “studio8″

Step 2: Next open a terminal and run the following commands:
note that the sudo command will ask you for your password. supply it when prompted.
sudo cp -r /cdrom/* ~/studio8/
sudo chmod -R 777 ~/studio8
wine ~/studio8/fscommand/fw_client_installer.exe

Step 3: Follow the instructions and you should be good to go.

Mar 15, 2008 Ubuntu 2 Comments

Mar/15: How to convert wma and publisher files to something useable

This post will (hopefully) save someone else the time I’ve wasted looking for a way to convert pesky Microsoft files into something useful for my Mac and Ubuntu Linux machines.

How to convert WMA files in Ubuntu Linux: Online Tool

After hours of searching and experimenting with different programs and scripts, I finally got smart and searched for online  conversion tools.  There are several, but the one I used is media-convert.com. It’s ugly and ad ridden, but it works like a charm and converted my 56 minute WMA file into a an MP3 file without a hitch. I could have converted to WAV, MP4, or just about anything else had I so desired.

No need for new codecs, or pain-in-the-neck command line scripts. Just a simple upload and a voila!

How to convert MS Publisher files into PDFs: Online Tool

People often send me MS Publisher files. This program is a blight in the world of desktop publishing, I know, but the average user doesn’t know this. Nor does the average user know how to export publisher files into other formats that Mac or Linux users can view.

Enter pdfonline.com. Upload your .pub file and a few seconds later a pretty pdf of the file is in your email inbox. I’m sure there are other tools, but this one did the trick for me, and the whole point of this post is to save time. You can’t edit it, but you can at least see it, and that is usually all I need to do. If anyone knows of a way to convert MS Publisher files into an editable format online then post it in the comments.

Feb/29: Offering your services

The web design market is a competitive one, especially for small-time web developers. You can’t charge what you are worth, because your target clients do not have large budgets or a true appreciation for the value of your services. They are just as likely to use your services as they are to call up their 15-year-old nephew who got Front Page pre-installed on his new computer.

On the other hand, you often can’t go after those “big” sites because they will often need more than you can offer or they believe that paying an exorbitant amount to some fancy firm will guarantee success. So what to do?

Part of the solution is creatively marketing your services. Being a web designer isn’t just one skill. You know how to code (often in several languages), design, and of course, make use of great open source software like MODx and WordPress. So why not capitalize on all those diverse skills.

My website business, Lucid Green, is attempting to do just that. Take a look at our services page for example. We offer soup to nuts website development, but we can also take website templates designed by someone else and integrate them into MODx or WordPress. We even offer our training and development services to other developers on a subcontract basis. (Don’t know how to use MODx but have a client that wants it? We’ll do it for you and your client never needs to know were not part of your business.)

Offering these many different and specialized services allows us have a sniper style business. We may not snag that one big website client, but we can several smaller more specialized jobs that the bigger firms charge to much for and the 15-year-old nephew is incapable of doing.

I’d love to hear how you solve the problem. Leave your advice in the comments.

Feb 29, 2008 General Advice 0 Comments

Feb/15: Web guilt

I’d like to coin a new term: “Web guilt”

It can be defined as: Feeling like you should be using a new technology that you are not using, or feeling like you have not used current technologies in “the right way.”

I’ve done a brief search on this and haven’t found anyone else talking about this, but I suspect a large number of the internet generation suffer from it.

Here is a personal example: RSS is an amazingly versatile technology. I could use it to look for jobs, push the latest pictures of my kids to the Luddites in my family, or any number of other innovative things. But for me RSS is a convenient way to read Digg and that is about it.

Then there is del.icio.us. I use it to keep track of my own bookmarks and nothing else (and my personal tagging scheme is a mess and all but unusable). I should be subscribing (using RSS of course) to tags of interest and be putting the social web to work for me, but I don’t. I’ve never really even thought of doing that until today. I’m such an idiot.

The worst thing about web guilt is that it is cumulative. I actually find myself resenting new web services because I still haven’t used what I already have properly. A new one is just one more to feel guilty about. Of course, that resentment becomes a new source of guilt. Shouldn’t I welcome new time-saving technologies?

It seems like web guilt is inevitable considering the glut of innovation on the web. We are surrounded by new productivity tools, but we rarely if ever actually use them to their fullest; and new ones appear every day. My feeling of guilt reaches a frenzy when I realize that I waste so much time swimming in a sea of time-saving technologies. Isn’t all this innovation about putting me in charge? Shouldn’t I be satisfied just using the technologies the way I want to use them. Why do I feel like I’m somehow failing when I don’t use them “the right way”?

Feb 15, 2008 Opinion 0 Comments

Feb/15: Web design is a commodity, which is good for the small guys.

According to Cole Camplese of Pennsylvania State U. (heard on iTunes U) web design in today’s world is a commodity not an essential element. In other words, what a website looks like is far less important then the information it contains.

This is obviously true, just ask yourself what websites you visit most often. I’m willing to bet that they are not filled with fancy graphics or animated interfaces. You don’t visit them to see the graphics, you visit them because they have information that you want. Most importantly this information is updated daily, hourly or even by the minute. Moreover, if you are like most web users, the sites you visit
are sites on which you can have a say.

The web today is more about content, especially user generated content, then it ever has been. The actually design of the site, it’s look and feel, is important, but only in-so-far as it does not get in the way of the content and the ability for the visitor to comment on or create that content. (Prime example: myspace, wow that site is ugly!)

For those of us who design websites for small organizations and business, this provides an interesting insight. Most small organizations want need little websites on which one can find a phone number or a ticket price.  These websites are never destinations, they are at simply resources.

These sites are pamphlets in the library’s breezeway. They’re Looked at once, perhaps saved for future reference, but ultimately disposable. Ironically, this means that the look and feel of these websites is far more important then it is for the big boys. These sites are judged by immediate impressions so they have to make everything count.

So while web design may be turning into a mere commodity for the web at large, it is becoming an absolute necessity for smaller niche websites. Just being on the web is no longer enough. Everybody’s on the web. For a websites with sparse information the only thing that makes it stand out over its competitor is its design.

Feb 15, 2008 Opinion 0 Comments

Jan/30: Letters to a newbie 2: good books

Short note this time. Doing research on the web is great. But nothing beats a good book in the hand!

The O’Reilly series (the books with animal sketches on the front) are pretty much “the standard” reference books in the computer world. Not very exciting reading but great desk references and I wouldn’t hesitate to recommend any of them to you.

To start with however, and I almost hate to admit it, but the “Dummies” books are really helpful. I actually really benefited from the Webmastering for Dummies book. It is fairly old, but I still recommend it to you. It is very comprehensive and gives a great “big” picture of the web design world. I would also bet that HTML 4 for Dummies very good.

Finally, The Zen of CSS Design is a must have book. It’s really for the advanced designer, but it blows the world of web design open as far as what is actually possible.

Jan/30: Letters to a newbie 1: getting started

A friend of mine who has worked exclusively in the print world called me the other day and asked for my advice on getting started designing websites. The following series of posts represent my ongoing emails sent in response.

Where to start

While designing websites is a many faceted endeavor there is one thing that ties it all together: HTML. So It only makes sense therefore to begin your journey into web design by learning HTML. The letters stand for HyperText Markup Language but it is only a ‘language’ in the loosest sense of the word. HTML is drop-dead simple in many ways and once you’ve got the basic idea down all you really need is a good desk reference and a creative mind.

Of course, as you mentioned, you had heard that XHTML is the current standard, and that is true, but XHTML mostly just HTML written strictly according to a standardized set of rules The “X” stands for eXtensible, but don’t get too worried about the acronyms. Most web tutorials teaching HTML will actually be teaching you XHTML, if not intentionally then by default since they are almost identical.

HTML is very easy to learn, and a quick Google search for “HTML tutorials” will turn up hundreds of great resources for getting started. The first one on the list of that search is a great one to start with, W3Schools is an extremely reliable source, one that I’ve found myself using quite often. For a little nicer looking page I also found <HTML dog>. It seems to be pretty basic stuff, not much depth, but when you’re just getting started you don’t want to overload yourself right away.

The next thing to learn is CSS or Cascading Style Sheets. Again most good HTML tutorials, like <HTML dog> will teach you CSS right along side HTML, since the two work tightly together. The basics of CSS are, again, drop-dead simple, but using CSS well is fairly subtle art. It can do some amazing things, but it can also be very persnickety.

But enough for this time around, here’s a list of the links discussed above and a few more:

Nov/19: Unease with Open Source

I love Open Source software. In fact, I’m using the latest version of Ubuntu (Gutsy Gibbon) and Firefox to write this post right now. But more and more I’m starting to be convinced that the utopia Open Source software promises is just that … a utopia (a land which is nowhere). In other words, I’m starting to doubt that Open Source will ever be a wide-scale viable alternative to corporate software like Microsoft’s Office.

Why? Well, let’s look at Ubuntu. In my position as a an administrator at a small private I’ve had the opportunity to install it on as many as 15 donated laptops for our teachers. This was my grand experiment to see if Linux was ready for the world. First I spent a few weeks by myself playing with it. Things seemed to go swimmingly, sure there were a few minor annoyances, but most of those had to do with getting acclimated to a new system. I was so excited by it’s potential I not only installed it on all the teacher’s laptops but I also put my wifes old Windows XP machine in the trash and gave her a shiny new Ubuntu laptop.

Nearly a year later and what’s the verdict? Printers don’t work, I can’t tell you how many times I’ve had to show someone convert an open office document to word, and wireless cards?! AGGGH!!!!! Now, I know that many of these problems are not Ubuntu’s fault. If only printer manufacturers, or microsoft, or wirelss card makers would play nice… blah blah blah. The average user, doesn’t care why it doesn’t work, he only cares that it doesn’t! And to be frank I’m starting to agree with that average user.

But to be perfectly honest the main problem with Ubuntu is not wireless cards or printers. No the main problem is not really Ubuntu at all. The main problem is that there is no quality control over the open source software products on the system. Usability stinks. Things aren’t consistent from program to program, and most methods of accomplishing things seems to be modeled after Windows. I mean come on! Since when was Windows a good example to follow!?

Case in point: Open Office. That beacon of hope in the Open Source World. Did you know that there is no way to easily suppress blank lines in an address when merging addresses to labels? Seriously? And you call this office software? missing that feature alone makes this pointless to try to give to the secretaries that work in my office. Leave alone that working with tables is a pain, and don’t even bother to look at Base.

I don’t want this to be a rant. (though I know its to late for that). But please read this more like a lover scorned. I’m rooting for Open Source. I want it to succeed, I really do. I love it. But I’m a power user, and I know open source will never be much of anything until it starts answering the issues my wife faces. She wants a computer to just work. And what’s her opinion of her shiny open source computer? “Great, as long as I don’t have to actually use it.”

Nov 19, 2007 General Advice 1 Comment

Sep/30: A few iPhone bookmarklets

I haven’t posted in ages. Seems like once you get out of the “biz” officially it’s hard to stay involved. Being a teacher and a father take precedence… unless someone gives you an iPhone! (Yes mine was a gift… I’ve got good friends!)

At any rate, here are a few bookmarklets that are essential to my iPhone browsing habits. Thought you might find them useful. right click on the links below to bookmark them in Safari and then sync to your iPhone.

First, my original ones:

Search mobile.answers.com.
I look up a lot of definitions and ideas while prepping to teach my Lit classes. So this one is a life saver. Bonus feature, prepend your search term with a “$” symbol to open the search in a new window.
bookmarklet: Search Answers.com

Look up Bible Passage
Same as above, only this one will send you to the mobile ESV Bible. Again, prepend search query with a “$” symbol to have open the bible in a new window.
bookmarklet:Look up passage

Change font size
I read several books online, most of them aren’t formatted for the iPhone, so the font size is too small and there are no columns to zoom in on. So this will pop up a prompt asking you for a font size. You can type in any CSS rule to be applied to the Body tag. It doesn’t work in every situation, and it seems to have an upper limit on most pages of about 2em’s or 30px. Your milage may vary.
bookmarklet:Change font size

Roll your own

If you want to create a bookmarklet to search your own favorite site, here’s the code. Just change the web address to the address of the site you want to search minus the search term and then create a bookmark with this javascript as the ‘address’ part of the bookmark. You have to first create a bookmark and then “view all bookmarks” under the “bookmarks” menu. Finally double click on the address part of the new bookmark and paste your code in. (hint, copy this into text editor first).


javascript:
(function(){
var site='http://www.gnpcb.org/esv/mobile/?q=
';
var query=prompt('Search for:','');
if(query==null){
return false;
} else if(query!='') {
var newWin = query.charCodeAt(0);
if(newWin==36){
window.open(site+query.slice(1));
} else {
location.href=site+query;
}
} else {
alert('Error: No search query was entered');
}
})
()

Now one that I got somewhere else.

Can’t remember where I got this… oh well. It’s essential!

Find on this page.
It does exactly what it sounds like.
bookmarklet:Find on this page

Sep 30, 2007 General Advice 3 Comments
Next Page »