Sep
19
2006
12

EZPT: Templating Best Practices

After a week of intense work on EZP templates, it quickly becomes apparent where you have made mistakes with the designing of your templates. Most of this stuff is just common sense, if anyone has any other pointers please comment, or post URLs for where this has been discussed.

CSS Rocks
EZP works best with CSS based templates. You’ll notice this most when you need to create a template for a container which will contain a list of various other items. When using CSS, you can use generic code (such as <li> for the list items) and then apply specific classes to the container to modify the look in that page. Since I was delivered a table based html layout for this project, I learned this the hard way.

Override, override, override
The power of EZP comes into play when it comes to overriding the default templates. The power is there to override anything from default datatypes (I had to change the textarea datatype to have fewer than the default 70 rows) to individual objects, classes or sections. There are a couple pitfalls you’ll have to watch for:

  • Use Sections: When you want to change the look of a section of your site (ie: I want all the articles in my knowledgebase to have a blue headline) create a section for knowledgebase and then create an override for the class within the section.
  • Create a strategy for your override precedence: I had some trouble with overrides taking precedence over other overrides until I came with a basic strategy. Node overrides take precedence (places 1-10), Class overrides come next (11-20, then Section overrides (places 20+), and finally any global overrides. You may not have this many overrides, my main issue was with the “node/view/full.tpl” template.
  • Create a strategy for your override naming: If you have a lot of templates you’re managing and if you, like me, prefer to edit your templates outside EZP, you’re going to want to have a naming strategy for your templates. I’m using (type_of_override)_(class)_(section)_(node).tpl. So an override for articles in knowlegdebase would be full_article_knowledgebase.tpl. If I am doing a node override it would be full_42.tpl.
  • Create generic templates. I started out creating some very specific templates, before I realized that generic templates which span over a wider range of nodes/classes will be easier to manage. If you need more specific templates after that you can always override your overrides :)
  • Don’t re-invent the wheel: I found myself creating templates which were just containers for other list items. Don’t re-invent the wheel, use (or override) the container template and then modify the list templates for the sub items.

And finally CTCS
This is one that I learned in IRC as well as from a couple of head banging sessions which turned out were caused by me not clearing the cache. Clear the Cache Stupid, ask questions later.

Written by Aaron Wormus in: Internet, Tutorials, ezpublish |
Sep
17
2006
3

50 Coolest Websites

On the heels of last night’s rant, here’s a list of the 50 Coolest Websites of 2006. Some of my favorites are among them including:

Podcast Pickle
The 9
YouTube (just uploaded a test video I made last week today, I’m starting a series of street musicians in frankfurt)
Kevin Sites
Human Clock
and of course MySpace ;)

Written by Aaron Wormus in: Internet, Web2.0, cool-sites |
Sep
17
2006
1

RIP Lilo

Sad news today, Robert Levin founder of Freenode (previously Open Projects Network) passed away after being hit by a car while riding his bike. Despite the controversies the surrounding the his operation of the two networks, the incredible effort that he made has helped millions of computer users and open-source projects around the world.

While he will be missed, I have no doubt that the infrastructure that he put so much work into will continue on and contine to support the community.

Written by Aaron Wormus in: Internet, rest-in-peace |
Sep
16
2006
59

In defence of MySpace (and other “Worst Web sites”)

PCWorld Author Dan Tynan, starts off his “25 Worst Website” list, with what I imagine he thinks is an insightful comment: “When it comes to the Web, hindsight is more like X-ray vision”. I’m not sure if Dan is ignorant, elitist or just suffering from radiation poisoning from over-exposure to X-ray vision, but this article suffers from a severe disconnect from how the real world views and uses the internet.

The technical world is quickly heading into another bubble, call it web2.0 if you like. Articles like these show that we haven’t learned our lessons. The question that I have to ask, is after the boom bursts, who will be left standing, MySpace or YouTube?

The rest is a rant.
(more…)

Written by Aaron Wormus in: Internet, MySpace, PHP, Rants, Social Networking, Web2.0, youtube |
Sep
14
2006
2

Now that’s what I call Bandwidth

mwsnap003.jpg

Written by Aaron Wormus in: Internet, Linux |
Aug
24
2006
3

Yes, I’d like an Eric Rice

Buy Eric Rice

As seen on The Eric Rice Show blog.

Written by Aaron Wormus in: Blogs, Internet, advertisements |
Jul
25
2006
1

Frappr now with MySpace Features

What started out as a simple google maps hack has turned into a full featured social networking site with some really nice features.

Since the maps are the main reason why people are at frappr, they have used this in some cool ways, for example the chat applet is integrated with the maps, so the map will zoom over to the location of the person who last entered a message. There is also a nice “Cool people near you” feature, which pulls up people in your general area.

There is also the ability to customize your page, add pictures/music, blog, add images, and of course embed so much javascript and flash that your profile will crash all but the strongest of browsers.

More than just the nice features, it’s good to see this small application maturing to something that could at some point have a business built around it.

Written by Aaron Wormus in: Internet, MySpace, Social Networking, Web2.0 |
Jun
13
2006
5

Lessons Learnt from Dialup #2

  1. Skype is awesome! I had a good conversation on a 2kb/s connection
  2. Skype is weird! It delivers messages hours after they are sent. I’m online for an hour and suddenly I get a message that was sent 3 hours ago
  3. I wish more programming packages had good offline documentation. a tarball would do. PHP and PEAR packages should use POD docs
  4. Not having online docs makes me happy for my wall of programming books
  5. I retain more from books than I do from online docs
  6. And finally: ASCII pr0n SUCKS!!!!!

The good news is that I just got a letter saying that I’ll be re-connected this week!

Written by Aaron Wormus in: General, Internet |
Jun
10
2006
15

Doing Cool Things with VIM - Yanking

<rant>
The worst thing about the majority of VIM tutorials/books is that they start in the most obvious place. If I’m interested in a text editor and after reading the first chapter of a book all I know how to do is move the cursor around, I’m not going to be that impressed. Lets face it, moving the cursor around in any direction isn’t exactly a groundbreaking feature of VIM.

For a beginner VIM users, there is nothing interesting about how you can use k and j to move the cursor up or down, or the h and l to move the cursor left and right. I think it’s safe to say that, for the first tutorial we can let user use left-arrow instead of h, right arrow-instead of l, up-arrow instead of h and down-arrow instead of j. As users begin to understand the basic concepts behind VIM commands then it is important on it’s important to know that you can move the cursor up with j, down with k to the left with h and to the right with l. But there is no need to bring this up in the first lesson!

The other thing that there is absolutely no need to mention are the nuances of the different modes that VIM has. When you open VIM you’re in command mode, hit i and you can insert text, hit esc or (ctrl-c) and you’re back in command mode. How difficult is it to say that? What more do people need to know to get started.

VIM has tons of cool features, the conceived “steep learning curve” is probably because instead of focusing on the features that separates VIM, each tutorial starts out with a discussion about how to move the cursors using the keys j(down), k(up), l(right, I remember this because I think l should make the cursor go left, but it doesn’t), and h(left).
</rant>

OK, so with that out of the way lets get into cool thing #1

Yanking and Registers

One of the first things that I’ve had people ask when I introduce them to VIM is “How do I copy and paste”. In VIM you copy by “yanking” text into a “registry”. If I want to copy this line I’ll enter command mode (esc) and type yy, this yanks the entire line. Deleting will also yank the line into the default registry. To delete the entire line type dd.

Move your cursor (using the arrow keys or h j k l, or you can move to the end of the line using $ and the beginning of the line using ^) and then type p to put the text you just yanked or deleted into the current location of your cursor.

Now you’ll notice, that only the last thing you yanked (or deleted) is stored in the default register – If you yank or delete something up, the previous text will be replaced. To get around this, VIM provides registers which you can use to store yanked data.
(more…)

Written by Aaron Wormus in: General, Internet, Tutorials, VIM |
May
25
2006
1

Flickr acting Weird?

Flickr Acting weird

Written by Aaron Wormus in: General, Internet, Web2.0 |
May
25
2006
0

Making $$$ through Backpackit

I’m checking my email this morning and I see the invoice for my Backpackit subscription! Nothing was charged! Somebody signed up through my affilitate link and that paid for a month of my premium usage!

This means that if I can get a signup every month, then I won’t have to pay for my premium membership. If you signup under me, and then you convince someone to sign up every month then you won’t have to pay either! Using this logic we can take down the evil thing that is Backpackit without any cost to ourselves (not like these signups cost them anything).

Anyway, I’m jazzed, even though I’ll be the first to say that Backpackit isn’t as awesome as it’s made out to be, it’s still working for me and I’m psyched about getting my first affiliate sale!

Is that blog whoring or what?

Written by Aaron Wormus in: Ajax, Internet, Web2.0 |
May
15
2006
0

Ghanean Cab driver mistaken for Internet Pundit

Dvorak Uncensored

While waiting for Kewney the cab driver was asked something and he said Kewney or indicated he was there for Kewney not fully understanding the question. He was rushed into the office and given a badge that said Kewney. He obviously thought this meant he was there to get Kewney and this badge was somehow part of the system. When they needed Kewney on the set someone saw him with the Kewney badge and said, “Kewney?” He said yes thinking he was being asked if he was there for Kewney. Next thing you know he is on the air. Fabulous.

Written by Aaron Wormus in: Internet, Like-So-Totally-Awesome |
May
10
2006
0

Cpanel Tips: MX to non-hosted site

We are in the development stage of a site at domain.com. To host this site we created an account in Cpanel for domain.com and started our testing. After a couple of days we get a report that email that is being sent from domain1.com is not reaching the recipients at domain.com.

After poking around for a couple minutes, it’s obvious that since both domain1.com and the (non-active) domain.com are on the same box the mail is being delivered locally.

After a quick chat with the nice people at #cpanel, I got the following solution.

1. create a A record for external.domain.com and point that to the IP address of the live MX server for domain.com
2. create an MX record on the local domain.com Zone and point that to external.domain.com

And people say I waste time when I’m on IRC.

The other option I had was to add the domain to /etc/remotedomains and remove it from /etc/localdomains but since this is a managed server I’m working on, I don’t have that option.

Written by Aaron Wormus in: Internet, Software, cpanel |
May
10
2006
5

Cpanel Tips: Multiple Sites on one Cpanel Host

The last couple weeks I’ve had to work on a managed server which only has Cpanel access and the associated WebHost Manager. The people in #cpanel on efnet have been VERY helpful in getting me around some sticky configuration issues.

Putting 2 sites on one control panel

A client had a domain name which was registered and hosted using Yahoo! Small Business Services. Due to the fact that he was using all the YSB services, he could not transfer the domain to our servers, best thing we could do is point www.domain.com to our server and let YSB take care of all the services which were attached to *.domain.com.

This client already had a Cpanel account on this server (we’ll call it domain1.com), so I figured we could just create an addon “parked” domain which would catch that domain. For some reason (which I can’t remember now) that didn’t work.

What finally worked was to create a subdomain of domain1.com, and then create an CNAME record from www.domain.com which pointed at domain.domain1.com.

Obviously this is a bit screwy, but it works.

Written by Aaron Wormus in: Internet, Software, cpanel |
May
09
2006
1

Would you like some Parasiteus with that?

After posting the post about godaddy, I checked to see if they also offered EU domain names. After a quick vanitiy search, I found that they had what I wanted and much, much, more :)

godaddy smart domains

Written by Aaron Wormus in: Internet, vanity |

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes