韩国的 整形 大夫

Archive for 7월, 2009|Monthly archive page

wordpress:dynamic sub-page navigation

카테고리: wordpress usage, 날짜: 7월 16, 2009, 시간: 11:04 pm

WordPress: Dynamic Sub-Page Navigation

Filed as Features, Guides on July 26, 2007 11:44 am

The more and more I study the WordPress architecture, the more and more convinced I become that WordPress is a great choice for use as a feature rich Content Management System (CMS). Basically, WordPress can be used, not only as a blog platform, but as software to manage the content of any website, with or without a blog. Because WP added the ability to use “Pages” to hold relatively static content, and because WP includes functions to call and display the content of those pages just about any way you can think of, all it takes is a good WordPress theme to get the job done.

But where WordPress lacks as a CMS is the ability to further exploit the sub-page system. Not so much in their use, but in their application to the actual website design.

However, this plugin did wonders for people looking to take advantage of the hierarchal structure of pages and sub-pages by allowing only the “parent” pages to be displayed on the homepage. And if a “parent” page has children, and that page’s link is clicked, then the child pages will “fold” down, displaying “deeper” options (much like the features of the more mainline CMS out there).

But There’s a Problem

I’m not here to just give props to a cool plugin. You see, I had a client who wanted the original “parent” list across the top of the page (just under the header image) and when one of the “parent” page links was clicked, he wanted the “sub-pages” to display as a list in the sidebar. As far as I could tell, there was no way to do that with the Fold Page List plugin. So, I went searching. I promise, if I could find the original website I got this from, I’d give a link. As it turns out, I can’t find it. Sorry :-)

First thing to do is just list your pages. Be sure to make it top-level only!

<?php wp_list_pages(‘title_li=&depth=1′); ?>

Then, I used the code I found (with a few modifications, I’m sure):

<?php
global $wp_query;

if( empty($wp_query->post->post_parent) ) {
$parent = $wp_query->post->ID;
} else {
$parent = $wp_query->post->post_parent;
} ?>
<?php if(wp_list_pages(“title_li=&child_of=$parent&echo=0″ )): ?>
<div id=”submenu”>
<ul>
<?php wp_list_pages(“title_li=&child_of=$parent” ); ?>
</ul>
</div>
<?php endif; ?>

Without getting too technical, I’ll explain roughly what all that means.

if( empty($wp_query->post->post_parent) ) {
$parent = $wp_query->post->ID;
} else {
$parent = $wp_query->post->post_parent;
}

This code checks to see if the current page (the active page) as a parent. If it does NOT have a parent … it assigns the current page ID as the “parent”. If it DOES have a parent, it assigns the parent ID as the “parent”. The reason this is necessary is for top-level parents. If we simply used the parent ID to assign the “parent”, then if a top-level parent was active, the “parent” variable would be empty and we wouldn’t get our sub-page list.

<?php if(wp_list_pages(“title_li=&child_of=$parent&echo=0″ )): ?>
<div id=”submenu”>
<ul>
<?php wp_list_pages(“title_li=&child_of=$parent” ); ?>
</ul>
</div>
<?php endif; ?>

This last part is pretty simple. All it checks for is IF there are any sub-pages (in a very rudimentary way). If it does have sub-pages, then it lists them (along with a title and some div wrappers for style).

One Limitation

I didn’t spend too much time doing research on this, but as far as I can tell, this only works 2 levels deep (top-level and 2nd level). If you have 3 levels of sub-pages, this won’t work (or at least won’t work like it’s supposed to). Sorry, but all I needed was 2 levels, so that’s all I developed it for :-)

Download the Source

Click Here to download the source for this script

So, if you are looking for a quick and dirty way to use WordPress as a CMS, this little bit of code can go a long way. I’ve used it several times since the time I developed it, and I plan on using it many times in the future!

Next week, I’m writing a tutorial on how to do the same thing we did here, but with categories and sub-categories. Don’t miss it!

UI개발자를 위한 북마크

카테고리: Uncategorized, 날짜: 7월 16, 2009, 시간: 10:51 pm

UI 개발자를 위한 북마크

NARADESIGN

목차

[숨기기]

뉴스

드림위버

모바일

블로그

웹 표준

웹 접근성

IT Trends

User Experience

블로그 허브

사용자 맞춤형 웹 서비스

사전

웹 디자인

웹 브라우저

웹 브라우저들

웹 브라우저 시뮬레이터

  • Browsershots – http://browsershots.org/ 현존하는 10 여종의 웹 브라우저에 대한 Simulator 테스트. 브라우저 선택 옵션에 모두 체크해도 한번에 4~5개 정도 밖에 Simulation 되지 않으며 시간이 오래 걸리고 추가 테스트를 진행 하는 경우 기존의 스크린샷이 사라지므로 스크린샷은 PC에 저장하는 것을 권함.
  • Internet Explorer Collection – http://finalbuilds.edskes.net/iecollection.htm 모든 버전의 IE를 스텐드얼론 형식으로 사용할 수 있다. 개발자용 IE툴바를 사용할 수 있는 것이 장점이나 정식으로 설치된 IE 브라우저에 다양한 버그를 유발하는 단점이 있어 권장하지 않음.
  • iPhone/iPod Touch Simulator – http://testiphone.com/
  • Multiful IE – http://tredosoft.com/Multiple_IE IE 3~6 브라우저에 대한 렌더링 툴.
  • Opera Mini Simulator – http://www.operamini.com/demo/ Mobile 전용 웹 브라우저 Opera Mini 의 렌더링 테스트.
  • Safari Simulator(BrowsrCamp) – http://www.browsrcamp.com/ Mac OS 전용 웹 브라우저 Safari 의 렌더링 테스트.
  • Xenocode Browser Sandbox – http://www.xenocode.com/browsers/ IE 6~8, FF 2~3, SF, OP, CR 브라우저를 실행파일을 이용하여 설치 없이 테스트 할 수 있다.

웹 브라우저 테스트

웹 브라우저 호환성 문제

웹 브라우저 확장

웹 사용성

웹 성능 분석

웹 어플리케이션

웹 이미지 검색

사진

아이콘

웹 접근성

지침

웹 표준

통계

CSS

CSS Framework

CSS Reference

CSS Standards

CSS Vendor Extensions

Flash

Fonts

HTML/XHTML

Javascript

User Interface 개발

游泳练习 Gtrack

카테고리: 游泳练习, 날짜: 7월 16, 2009, 시간: 2:01 am

 

http://www.youtube.com/watch?v=kjgN4aQyeSc

眼部整形法

카테고리: Uncategorized,整形手术, 날짜: 7월 15, 2009, 시간: 1:08 pm

  埋线法

我院有很多种埋线法,和过去使用的各种方法相比,现在采用了更先进的,更容易保持双眼皮的方法。
一般来说,埋线法是利用很细的线做出双眼皮形状的手术方法,该手术方法有比较简单,不会出现肿胀的优点。

眼睛上部脂肪不多,眼皮较薄,没有下垂皮肤时,患者比较适合做该手术,并能取得较好的手术效果。

在患者眼皮上切开1-2毫米的切口或不通过切口都可以进行手术。

手术时间较短,肿胀程度也较小,大部分经过3天即可痊愈。

但是,眼皮下垂较厉害时,采用切开法较好,脂肪较多时,采用部分切开法或切开法可以取得更好的效果。

 前开

前开是针对于左右幅度较窄,看起来不太爽快的眼睛进行的手术。

现行的手术方法有三角pedicle法,Y-切开法,W-切开法等多种手术方法。

手术后眼睛会看起来很利索,并且能取得使眼睛左右幅度变大,使黑色瞳孔内侧的白色眼球部位显露更多的效果,看起来像对眼的假性斜视和真性内斜视,也能取得一定的矫正效果。

手术通过约5毫米的切口进行,不会出现肿胀,手术后4天即可拆线,可单独进行前开手术,也可将前开手术和双眼皮手术同时进行。

안녕하세요???

카테고리: Uncategorized, 날짜: 7월 15, 2009, 시간: 8:25 am

수영과 다이빙, 자전거와 등산을 좋아하는 사람입니다.

노우하우와 기록들을 공유하는 공간으로 만들어 나가려고 합니다.

좋은 정보있으면 공유해요..

팔로우

모든 새 글을 수신함으로 전달 받으세요.