Textpattern - A case study of www.weloverestaurants.ie - how it works

Posted 13 April 2010 in the web-design category

Having built a listings web site www.weloverestaurants.ie I thought it would be a good opportunity to give back to the txp community with a recording of how we achieved certain things with this great open source cms!

I just want to give you the bits of code highlighted in the tutorials/case study above, and the plug-in’s I mentioned in it:

Default form code:

<h2><txp:title /></h2> <div class="article"> <txp:article_image class="image" thumbnail="1" /> <txp:excerpt /> <txp:body /> <txp:ako_social images="1" imgclass="social" imgsrcdir="images/social" digg="1" googlebookmarks="1" twitthis="1" wraptag="div" wrapclass="social" /> <txp:if_custom_field name="bookingsemail"> <txp:output_form form="bookings" /> </txp:if_custom_field> <txp:if_comments_allowed> <h4>Visitor comments and restaurant promos!</h4> <txp:comments /> <txp:comments_form /> </txp:if_comments_allowed> </div>

Bookings form code:

<txp:zem_contact to='<txp:custom_field name="bookingsemail" />' label="Make a booking enquiry!"> <p><em>Thank you for your interest in this restaurant. The restaurant team will get back to you to confirm details and book your table / event. Please only make booking enquiries at least 24 hours in advance of your chosen date and time, thank you!</em></p> <div> <h4>Contact Details:</h4> <txp:zem_contact_text label="First Name:*" required="1" /><br /> <txp:zem_contact_text label="Surname:*" required="1" /><br /> <txp:zem_contact_email label="Email:*" required="1" /><br /> <txp:zem_contact_text label="Phone:*" required="1" /><br /> <h4>Dining Details:</h4> <txp:zem_contact_select label="Day* - " list=",1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31" selected="1" required="1" /><txp:zem_contact_select label=" Month* - " list=",January,February,March,April,May,June,July,August,September,October,November,December" selected="12" required="1" /> <txp:zem_contact_select label=" Year* - " list=",2010,2011,2012" selected="2010" required="1" /><br /><br /> <txp:zem_contact_text label="Time:*" required="1" /><br /><br /> <txp:zem_contact_text label="Number of Adults:*" required="1" /><br /><br /> <txp:zem_contact_text label="Number of Children: (Write 0 if none)*" required="1" /><br /><br /> <txp:zem_contact_textarea cols="40" rows="3" label="Any Additional Requests:" required="0" /><br /><br /> <txp:zem_contact_serverinfo name="REQUEST_URI" label="Page" /> <txp:zem_contact_submit label="Send Enquiry" /> </div> </txp:zem_contact>

Plugins

And just visit www.weloverestaurants.ie to view the end result, and see what you can do with this cms!

Add to social bookmarks: del.icio.us | Tweet this: | Add Comment! [1]

How to show teaser but hide full article from anonymous users Drupal

Posted 20 March 2010 in the web-design category

Below code tested with Drupal 5, not sure if it works on Drupal 6, please let me know if you try it!

Just replace your $content variable with the code below, which is in your node.tpl.php file located in your themes folder. Apologies if anyone finds fault with the below, it works, and I couldn’t find any code on the internet for it, being not a programmer it could be a little ugly, but it does work ;)

<?php if ($teaser): ?>

<?php
global $user;
// if visitor is not logged in
if (!$user->uid) {
// print the teaser
print $content;
} else {
// if user is logged in print the teaser
print $content;
}
?>

<?php elseif (!$teaser): ?>

<?php
global $user;
// if anonymous visitor and content type is all except blog or page
if (!$user->uid && $node->type != 'blog' && $node->type != 'page') {
// lock anonymous visitors out of the full article
print("<div class='messages'>Please <a href='/user/register'>register</a> or <a href='/user'>login</a> to view images!</div>");
} else {
// show all content for all content types to logged in users
print $content;
}
?>

<?php endif;?>

Done!

Add to social bookmarks: del.icio.us | Tweet this: | Add Comment!

Working for yourself is like..

Posted 26 September 2009 in the web-design category

being a hustler. Well, you are a hustler.

From the charges you come up with, to the business ideas that will drive your freelance work/company, you hustle. Your clients will barter. They don’t really care whether you’re on minimum wage, whether you have adequate sick pay, or a pension, they just want you to work for the lowest price possible. And if you offer it up for free, they will happily take that.

What happens if you give the client what they want? Well, you go out of pocket, and therefore out of business. So you hustle. Every day. With a different face to the client everytime but the same message.

A good hustler doesn’t back down. A good hustler knows the minimum price to stay afloat, and won’t go under that, EVEN if they might lose the client. You simply can’t sell a service without making a profit. So you have to be prepared to walk away, a little like the street trader on the side of the road. You can barter sure, but if you offer that trader a price too low, he/she WILL walk away. What’s surprising though is, you often raise your price again once you realise how much you really want that item. And that’s what happens in real business, it’s like the wild west. And in a recession, oh boy it gets worse, so much worse.

So you have to hustle even harder, and that will work.. because a good hustler doesn’t put all his eggs in one basket. So just stick to the basics!

Add to social bookmarks: del.icio.us | Tweet this: | Add Comment!

Drupal logout not working with cache enabled

Posted 23 August 2009 in the web-design category

The problem is, a user logs out using Drupal with caching enabled, but if they click on a page having logged out, they appear to still be logged in.

There’s a very simple solution here , that I have implemented on my own site, and it works!

Add to social bookmarks: del.icio.us | Tweet this: | Add Comment!

When free is not cheap enough

Posted 13 August 2009 in the web-design category

I have learned an awful lot in the past two years of working for myself. The most important lesson I think I can share with you, concerns pricing.

Of course for anyone starting out in web design, or any other form of design, you do work for free for a certain period of time, in order to build up your portfolio. This gives you great experience in client management, and you learn more too about your trade as you go along. robber

Once you have let’s say 5 web sites under your belt, you NEED to change. You have to give yourself credit for doing an excellent job, for having learned an awful lot, and now, it’s time for your clients to pay.

Believe me, there is no other area of work in the world, where they give you freebies. If someone is buying a car, they don’t ask the car dealer for a free car in exchange for nothing do they? They also don’t ask for a free car under the premise that, ‘if you give me a free car, I’ll tell my friends how great you were, and you might make a real sale out of it in the future’.

So why should we be expected to work for free.. or even, work for less. Yes, yes, there’s a recession. We know. But don’t you want the few good web designers that exist to still be here this time next year? If you do, you have to pay us, otherwise enjoy dealing with cowboys for the next 20 years after the ‘real’ web designers have been squeezed out of the trade. And believe me, those cowboys will charge you a LOT more than the quality designers out there today, and give you less, a lot less, a brick that cannot, and will not perform in most cases. None of us want the cowboys to win, believe me..so if you are thinking of hiring a web designer, take the quality of their work into account before you start to haggle them out of existence!

Anyway, the video below sums up this behavior prevalent in certain professions quite eloquently ;)

Add to social bookmarks: del.icio.us | Tweet this: | Add Comment!

next page »