SOHO Life - HKDUG Group Project

Events happening in the community are now at Drupal community events on www.drupal.org.
johndbritton's picture

SOHO Life has a really nice office in Sheung Wan, literally a minutes walk from exit C. The rooms have projectors and wifi access, it's perfect for our meetings.

Nick and I have arranged to work on the SOHO Life website, and hope to complete it before December 6, 2008 (the day of http://openeverything.hk/2008/) since they are the venue sponsor for that event.

Nick will gather the requirements from the client, Dave & Advomatic have generously given us our own SVN repository so that we can all work together from different locations on this and future projects. It would be great if we could document our progress and use this as a practical learning exercise for people who are new to Drupal. I'd love to see people like Dave and Karim helping HKDUGers new to Drupal to build the site. I don't think the project is very large scale, so we shouldn't have a problem getting through it.

My understanding is that I'll handle the hosting for SOHO life, and will arrange for HKDUG webhosting/sandbox areas using the same resources.

Comments

How can I help

hk900's picture

I also want to joint and learn. At least I can translate. Should we have a meeting about this events?

John is off to Vietnam today

cloneofsnake's picture

John is off to Vietnam today for a week of vacation.

I think most likely we will have a meeting next week, a week night, at SOHOlife's place, we all can sit around the table and work on the site together. This will put our last lesson on SVN to the test. Our whole process can be documented and put online as a case study.

I'll check with SOHOlife to see which night is good.

Thanks all!

Pre-meeting setup

caphun's picture

Next week sounds good. Wednesday onwards will suit me more.

I suggest we gather up as much info as possible before the get together and get everyone setup ready to start (i.e. SVN, staging environment etc). This will keep the initial project pickup downtime to a minimum.

To make the SOHOlife meeting more productive should we start outlining a plan for the night? Does this sound good to everyone?

project sounds fun, count me in

DigitalFreak's picture

I am interested in this.

Nov. 29th - Sat. afternoon?

cloneofsnake's picture

Alright folks, I've spoken to the folks @ SOHO, Thursday night they close at 10pm so if we start at 7 like usual, that only gives us 3 hours... so may be Saturday is better huh? We can have the entire afternoon.

People with wide angle lens should bring their cameras so we can show pictures of us having FUN with Drupal at the OpenEverything.hk event! :D

SOHO will have the source code (flash) and photos on a CD for us. We should make a comparison between the old flash site and the new Drupal site at OpenEverything.

Can make Thu but not Sat

caphun's picture

Not sure how much work is involved but we may need both Thu and Sat just in case?

I'm on a school trip with the kids this Saturday, sod's law! Though if Saturday is good for everyone and it goes into the evening then I can make Saturday evening.

I could bring my SLR camera - don't have wide lens though.

The folks from SOHO just

cloneofsnake's picture

The folks from SOHO just asked we'll be going there tomorrow. This is where I wish we could add a poll to an existing thread... So... how many of you are coming:

1) Thursday night
2) Saturday afternoon
3) Thursday night + Saturday afternoon

I'm in favor of 2, Saturday only. I think we can work till 9 pm if needed. How about u guys?

I'm cool with any of the

dalin's picture

I'm cool with any of the above options.

--
Dave Hansen-Lange
Web Developer
Advomatic LLC
East Asia Office
Hong Kong

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

Thursday is better for me

johndbritton's picture

I'm cooking a Thanksgiving dinner on Sunday and need to do the prep work on Saturday. I can make it on Thursday and morning/afternoon on Saturday, but I can't stay past 4PM or so.

--
http://www.johndbritton.com

Thanksgiving dinner? Are we

cloneofsnake's picture

Thanksgiving dinner? Are we invited? :P

Alright then, I guess let's go there tomorrow night! If we can't finish, we continue on Saturday... is that the plan? Anday, Caphun & DigitalFreak, r u guys OK w/ that?

Good thing about Thursday night is that it'll be easy for Karim, just come downstairs from work! :)

+1

caphun's picture

Sounds like a great plan :)

+1

moni-gdo's picture

I will take the lift instead of the stairs.. :P
pain in my knee after the hk challenge,,,
http://www.asia-challenge.com/smartone/ac_smartone.php

Thanks giving camp

DigitalFreak's picture

sorry, I just remember I will go to a thanksgiving camp on the coming weekend. And I need to do some prep work on Thursday night. Can't join this time.

John and I will be there

cloneofsnake's picture

John and I will be there tomorrow @ 5 to start talking to the people at SOHO to gather some requirements. So if you can come early, feel free to do so.

See you all tmrw.

http://maps.google.com.hk/?q=148+Connaught+Road+Central,+Hong+Kong+Islan...

I'm in

hk900's picture

I will come before 7pm. Any plan for dinner tonight?

Running late

caphun's picture

I'm on my way now though expect to arrive slightly late. ~7.30pm

Thanks

johndbritton's picture

Thanks for coming tonight,

http://www.hostgrown.com/~soholife is the sandbox for the project. See you all soon.

--
http://www.johndbritton.com

their existing hosting

cloneofsnake's picture

just took a look - they have infinite bandwidth! and this month they had already used 10GB of bandwidth! Anthony said they paid about HK$1000 / year for this, and the contract ends next August. So... what can we use this space for?

I'm going to try out webform now and try to make a few sample forms.

Caphun and Karim must've

cloneofsnake's picture

Caphun and Karim must've been working hard tonight huh... I see the menus are looking really nice now!! Amazing stuff!

Hey, can everyone check out my profile and add me to your YM/MSN IM and GTalk? Would like to document our work and put on here as tutorial / showcase and also talk about it next Saturday at OpenEverything.

Thanks.

ACK!

dalin's picture

I see we need to talk about input formats and filters. Someone has added several html tags to the default "Filtered HTML" format. This is safe only as long as untrusted users cannot post comments or nodes. Which is true on this site, but not something that you should rely on. I'm pasting a recent rant I gave to my coworkers below:

There’s been a few instances in the last month or so where I’ve navigated to admin/settings/filters of a few different sites and discovered that anonymous users have permission to post just about anything they please.

Please know that anonymous users can use any HTML tags permitted by the default input format. On most sites this is the Filtered HTML format.

If you want the full list of non-depricated tags that are safe try:

<p> <br> <a> <em> <strong> <strike> <pre> <ul> <ol> <li> <dl> <dt> <dd> <q> <cite> <blockquote> <caption> <div> <span> <h2> <h3> <h4> <h5> <h6> <img> <table> <tbody> <td> <tfoot> <th> <thead> <tr> <sub> <sup>

What usually happens is that content admins on a site need to use more HTML than what Filtered HTML allows by default. And so someone goes over to the admin page and adds things like img, embed, or object tags to the list. I have yet to see script tags enabled for the default filter, but that would be truly catastrophic.

Instead, what should happen is the user picks a different input format for their text-field. I can hear your pleas already: “That’s a pain in the butt to pick a different input filter every time you want to create a new node”. And you are correct. Enter Filter Defaults module. This allows you to specify a default filter for every role.

The root of this confusion has to do with a few naming inconsistencies and a lot of usability issues with the different admin forms. These will likely be fixed in Drupal 7, but until then keep this stuff in mind.

--
Dave Hansen-Lange
Web Developer
Advomatic LLC
East Asia Office
Hong Kong

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

Filter Default

cloneofsnake's picture

http://drupal.org/project/filter_default

I thought about this problem when I was creating my final-family site too... what would you add to the default Filtered HTML? and would you create a more relaxed Filtered HTML for content editors (not letting them use Full HTML)

I'm still fixing the the translations - you can see my progress here: http://spreadsheets.google.com/pub?key=p0TaVV6k-GgheFw0DcRYeRA

For "Filtered HTML" you

dalin's picture

For "Filtered HTML" you could use:
<p> <br> <a> <em> <strong> <strike> <pre> <ul> <ol> <li> <dl> <dt> <dd> <q> <cite> <blockquote> <caption> <div> <span> <h2> <h3> <h4> <h5> <h6> <table> <tbody> <td> <tfoot> <th> <thead> <tr> <sub> <sup>
Then I often change "Full HTML" to have a HTML filter with all of the above plus <img> <embed> <object> <param>. You can set this format to be the default for your content admins.
Then I often create a new format called "Raw HTML" that has no filters. Site admins can choose this one if "Full HTML" isn't enough. But you need to be careful about who has permission to use this one since it will allow the most dangerous <script> tags.
These days I am not turning the PHP format on. I'm even deleting the module. It's more risk than it's worth.

--
Dave Hansen-Lange
Web Developer
Advomatic LLC
East Asia Office
Hong Kong

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

language aware menus

dalin's picture

So I got language aware menus working. It required the i18n module.
Info here: http://drupal.org/node/313302
You basically just enable the Menu translation module and you're good to go.

In so doing I accidentally killed the sidebar menu. Sorry Karim. Depending on how you were creating that block, you may need to use the hack described in the link above.

Andy or Nick can you translate the Chinese top level menus to Chinese:
http://www.hostgrown.com/~soholife/en/admin/build/menu-customize/menu-he...
http://www.hostgrown.com/~soholife/en/admin/build/menu-customize/primary...

--
Dave Hansen-Lange
Web Developer
Advomatic LLC
East Asia Office
Hong Kong

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

Caching on Dev

caphun's picture

Hi All,

Just a note. I have disabled all caching on purpose as it is very annoying to have to clear the cache each time we make a small change to the theme.

Obviously once this site moves into Production we should activate caching and compression for performance reasons.

Thanks!

Ca-Phun

Amazing work guys! I've

cloneofsnake's picture

Amazing work guys! I've caught a cold and had been sleeping thru the day. Will catch up tomorrow w/ the menu & content translations, and then document our work for Saturday's presentation.

Thanks! Nick!

hk900's picture

Thanks, Nick! Today I found the content translations is done already.

This week my office move to another new place. I need to tidy up and set up all stuff, that is my excuse :P Hopefully, we will meet each other on Saturday.

John how's your Thanksgiving dinner?

pathauto settings

cloneofsnake's picture

Alright, I'm pretty sure I fixed all the paths manually to:

site.com/en/menu-name/page-title
site.com/zh-hant/menu-name/page-title

(In pathauto, I set the default path pattern to [menupath-raw]/[title-raw] )

but some of the pages got changed back to gibberish - especially the Chinese pages, as pathauto will strip all multi-byte characters away and I had to manually go back to put in the english titles as their path.

This was my fault, I set pathauto's Update Action to: "Create a new alias. Delete the old alias." because I think that would make the most sense... I'm changing it back to "Do nothing. Leave the old alias intact.",

Also, I'm not sure there are /feed paths generated for some of the pages:

about-soholife/soholife-environment/soholife-environment/feed
about-soholife/what-soholife/what-soholife/feed

They seem utterly useless, I think these were auto created by pathauto? I'm going to delete them all tomorrow, let me know if I shouldn't.

The documentation hasn't gone ANYWHERE yet!!! I was going to do it today but ended up going to HKU with John to check out their venue... I'll definitely whip up something tomorrow!! I'll IM some of u if I need to ask specifically about things.

See y'all on Saturday!

Those per-node

dalin's picture

Those per-node feeds:
about-soholife/what-soholife/what-soholife/feed
etc. Are for the comments of each node. But since we don't have comments on, yes they are useless.

--
Dave Hansen-Lange
Web Developer
Advomatic LLC
East Asia Office
Hong Kong

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

Presentation Slides

cloneofsnake's picture

http://docs.google.com/Presentation?id=dj2qcgv_107vdv3jrd6

Most of you already have access to edit this but here's the link anyway... it's now published for sharing on the web. The presentation went great... (except for that little mishap with my Firefox 3 "awesome bar"... let's just say I didn't feel too awesome at that moment.) :"P

Also check out the pics on flickr

http://flickr.com/search/?q=hkdug&w=all
http://flickr.com/search/?q=openeverythinghk&w=all

I'll figure out w/ SOHOlife ... like Karim said, may be it's better to keep using a local HK host, so we'll just move the site to their existing hosting, and we can continue to use John's hostgrown.com/~soholife as sandbox.

Let's meet up to have dinner before Karim leaves to Sweden next weekend huh? I'll also be going to Seattle for a month on Dec 30th.

im up for dinner

johndbritton's picture

Let's definitely have a dinner before Karim leaves (and before I leave too)!

I'm mostly free, so I'll leave it up to you all to find a time that works.

--
http://www.johndbritton.com

dinner

dalin's picture

How about Mon 15th, Tue 16th, or Wed 17th?

--
Dave Hansen-Lange
Web Developer
Advomatic LLC
East Asia Office
Hong Kong

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

+1 for Tue or Wed

caphun's picture

Monday not good for me as I have a meeting that evening. Can definitely make Tue or Wed however.

Aren't Karim leaving on the 13th or 14th?

cloneofsnake's picture

Karim, do you want to have dinner? Let us know.

I can't do tomorrow nor Weds.

Hey guys, check out these search results:

http://search.yahoo.com/search?p=soholife
http://www.google.com.hk/search?q=soholife

http://hk.search.yahoo.com/search?p=soholife
http://www.google.com.hk/search?q=soholife

In the Yahoo one, we came out 1st! :D Kinda cool, but also kinda doesn't make sense...

I'd love to join the dinner

moni-gdo's picture

I'd love to join the dinner but I will have Christmas dinner with my company on Thur and to prepare for my trip on Sat, I am afraid I can't join this time. You guys have fun!!!!

Btw, I knew that you could reorder the search result in yahoo,, good job Nick, :)

LOL. Yeah man, everyone

cloneofsnake's picture

LOL. Yeah man, everyone knows Yahoo's search results used to be organized by humans... they went through a major development to implement Inktomi to give Yahoo automatic search results... so now, all of Yahoo's results are automatically ordered by monkeys... I'm one of those search monkeys. LOL...

Awww... alright, we'll have your farewell dinner w/o you... we'll miss you! :D You will bring us souvenirs right? There's this IKEA cabinet that I really like... :P

Have a nice trip brother.

Nick

IE is messed up

cloneofsnake's picture

Or rather, our page http://www.hostgrown.com/~soholife/ is messed up in IE.

The whole flash thing in the middle has moved to the right a little, and the right sidebar is forced to down below.

The drop down menus are looking pretty messed up in IE. If the jQuery roll down menus prove too much for IE, we just just turn that off for IE right? Let them use plain old CSS.

I'm also trying to encourage them to open up their teaching materials and put everything online under Creative Commons license... I think a couple of things need changing in their website - 1) the menu - they don't have enough contents so the menu is quite meaningless! I already merged "Contact us" to go under "About SOHOlife", I think they said the "Kids" link can also go as they don't have classes for Kids no more. What's a good menu name for their teaching materials online? I want to put in a new menu item like "Open Coursewares" and under it, they can put their lessons online. Also, they wanted a "forum", but I think we can add a menu item called "Community" or something, we can add an "events" content type for them to post about events (like Open Everything), and a "Student Questions" content type for students to ask questions or something...

The #2 that needs changing is their front page, we copied their old webpage but the lack of info + the block of useless flash pictures really suck... I think the front page should be in Chinese, has some info about their company and may be a jCarousel that shows the latest "events" or "lesson" nodes... (I've been itching to use Karim's jCarousel ever since he demo'd it :)

So, I'm going to start messing around in the dev environment now.

About IE

caphun's picture

Yeah, Karim and I had realized the IE issues during development. I know these issues look bad at the moment but they are very easy to fix. It should also be pretty easy to get the menu working in IE aswell. When developing a site I always work on Firefox - get it all looking good and 99% complete, then tackle the IE issues. If we start tackling IE issues whilst changing other areas of the site we'd end up going back to IE again and again.

I like "Open Courseware", it sounds more in tune with what's out there already.

I agree with removing the Flash movie from the front page in favour of a more semantic alternative. What that alternative should be is open to discussion, maybe in our next meeting?

jCarousel sounds good as a ticker. We could also use jQuery to achieve the photo shuffling effects on the home page. Basically if we really wanted to we could mirror the same Flash functionality in JavaScript - same goes with the flash piece sitting under the menu. :)

Ya, at this point, we don't

cloneofsnake's picture

Ya, at this point, we don't need to copy their old site. I'm fixing their menus so they look nicer.

I swapped the colors in Primary Links (background from white to green, words from green to white), 'coz I think that makes the menu stands out more and separate header from content area.

Disabled the entire Header Links (HOME | Location | My Account | Login). People can click on the logo for home. Location is useless. I moved my account to Navigation, and Login / Logout to Primary links (the last item). I think that makes the header area cleaner.

The length of the menu items are not consistent, that looks kinda ugly.

The fonts used are Framework's default, I don't know much about fonts but I think I would just copy whatever some nice looking sites do...
- like apple.com = "Lucida Grande","Lucida Sans Unicode",Arial,Verdana,sans-serif;
- and my blog = 'Lucida Grande',Geneva,Arial,Verdana,sans-serif; :D

caphun, you're the jQuery expert, feel free to do your magic and teach the rest of us about it. & I'm sure u know about the form-builder - http://www.lullabot.com/blog/drupals-form-building-future - I read that this uses your jQuery UI, feel free to grab that module too!

Cool, we could be more creative now :D

caphun's picture

Here's a good list of usable web fonts:

http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html

Yeah, I think the header looks better now - more defined and less clutter.

OK, I'll work on fixing the menu tomorrow is it looks better.

That form building tool looks pretty good! Seems like Drupal is getting deeper into jQuery. :)

I've continued to polish the

cloneofsnake's picture

I've continued to polish the contents on the dev site, including a better webform, a new content type called "Events" and a view to display events with page path "club".

I also switched on the forum module, it had the "left sidebar" there which I thought was kinda unnecessary so I tried copying the page.tpl.php into forums.tpl.php and commented in the "left sidebar" part, cleared cache... boom, now it looks messed up! (I used svn add forums.tpl.php to add the new file to the repository... the thing that I don't know is, how do we see the lists of comments / changes on commit?

Anyways, I think the site is looking pretty good already... we are definitely free to be more creative now and make the site look and function more "up to western standards". The management at SOHOlife probably doesn't see the value of having a good website (I don't think they're too impressed), but I've spoken to their teachers, I think they're more excited about this. Oh! I've asked them to sign in and I'll give them "Editor" permissions so they can start writing some sample contents. Next, I think I'll try to get Haggen So from Creative Commons HK to explain to the management at SOHO, why is it a good idea to use CC. We can probably have them revise the "terms and conditions" statements and help us with labeling the contents with CC!

Things that still needs to be done:

1) pathauto - would be better if "events" and "forum" content types are added to the URL path, eg: www.soholife.hk/en/forum/a-new-topic or www.soholife.hk/zh-hant/events/open-everything-hk-2008

2) forums template + general theming / layout improvements

3) set up cron

4) create new content types under "OpenCampus" (probably need to get feedback from their teachers as to what type of stuff they will write about.

5) launch it ASAP - even if we're not done yet, I think it's good enough to let them run w/ it while we continue to mess around.

Anything else?

In terminal run "svn log" to

caphun's picture

In terminal run "svn log" to get a history of changes made to the repos with comments. It's sometimes handy just to write the log out into a file for easy viewing - e.g., "svn log > history.log".

"svn diff" is pretty useful to get an idea of what's changed from the previous revision if you find that the latest revision is messed up or someone changed your stuff by mistake. SVN DIFF could also target a specific file/folder by issuing "svn diff filename.php".

I'll try and have a look at number 2 next week to see if we could improve the general layout of the site.

Thanks!

Hey guys, ready or not, our

cloneofsnake's picture

Hey guys, ready or not, our baby has to go life! I just found out that their DNS registration is going to expire next month... and I think their hosting is expiring on the 31st of this month.

I'll check w/ the Soho people but I think I'm going to flip the switch and point soholife.hk, sohopro.hk, soholife.com.hk, sohopro.com.hk ALL to our site on hostgrown.com.

Caphun, can you fix the jquery menu roll down on IE? BTW, read about the "context" problem of users don't know where they are at, and this module helps - http://drupal.org/project/menutrails . We can actually take the roll down menu out and forget about mimicking their flash site.

Will do

caphun's picture

Happy New Year!

No problem. I will fix the menu today so it looks good in IE.

Done!

caphun's picture

It could look better but at least it doesn't look broken now. :)

Thanks Caphun!

cloneofsnake's picture

Thanks Caphun!

We're live

cloneofsnake's picture

Got some news to report guys!

Our site is now live at:

http://www.soho.edu.hk
http://www.soholife.hk
http://www.sohopro.hk

It was weird I couldn't log into any of them at first, I saw that there was a soho.edu.hk/~soholife/* still attached to the end of the Http_Host / Domain Name, so I checked the URL alias in Drupal admin, nothing I could do there. Then I checked .htaccess file, found this line:

  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
  #  RewriteBase /~soholife

So I commented it.

Still didn't work, so I checked settings.php. I found:

/**
* Drupal automatically generates a unique session cookie name for each site
* based on on its full domain name. If you have multiple domains pointing at
* the same Drupal site, you can either redirect them all to a single domain
* (see comment in .htaccess), or uncomment the line below and specify their
* shared base domain. Doing so assures that users remain logged in as they
* cross between your various domains.
*/
$cookie_domain = 'hostgrown.com';

So I changed it to soho.edu.hk. Now all is fine. Yay~~ Well, not all... I'm trying to redirect everything to soho.edu.hk by mod_rewrite. It's not working. Can someone point out my mistake?

# Redirect sohopro.hk and soholife.hk to soho.edu.hk
 
RewriteCond #{HTTP_HOST} ^www.sohopro.hk$ [NC]
RewriteCond #{HTTP_HOST} ^www.soholife.hk$ [NC]
RewriteRule ^(.*)$ http://www.soho.edu.hk/$1 [R=301,L]

DrupalHK

Group categories

HKDUG Vocabulary

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: