Archive | Design RSS feed for this section

The WordPress Iframe Tweet Button Installation Guide / ワードプレスでツイートボタンをインストールする方法

15 8月

ワードプレスでツイートボタンをインストールする方法

昨日、ツイッターからのオフィシャルツイートボタンがリリースされて、すぐに使おうと思った。Tweetmemeより機能があって、特にツイートした後でフォローお勧めの画面がワンダフル☆

やっとキレイにボタンをインストールできたが、思ったとおり、スムーズに進まなかった。それは、ウェブデザイナーの人生ですw

だからココで得たノウハウをシェアしよう思った!このガイドは一応ワードプレス向けのガイドだけど、普通のウェブサイトでも参考になると思う。

With the release of the official tweet button from twitter yesterday, I of course had to integrate it into my blog. Official being part of it, new being another, and the extra “recommend you to follow” function being the biggest part!

I’ve got it all ironed out at this point, as you can see, but just as I guessed the process didn’t go smoothly. Such is the life of those in web design =D

Anyhow, I thought I’d share the process I went through in case it helps others!

This guide is primarily focused on how to get it all to work in WordPress, but even for websites it can help as a reference.

ボタンを使うチャレンジ:

1.Javascript(ジャバスクリプト)を使わないこと
2.機能を全部使えるようにする
3.フェイスブックのボタンとキレイに並ぶ

The Plan for the Button

1. To not use Javascript
2. To get all the snazzy new functions to work
3. To line it up nicely with the facebook button

-

1.Javascript(ジャバスクリプト)を使わないこと

1. To not use Javascript

日本では分からないけど、セキュリティーのため、俺は自動的にJavascriptを向こうにするプログラムNoScript(ファイアフォックスのアッドオン)を使っている。だからJavascriptを使えば、有効しないとツイートボタンが出なくなる。

ラッキーなことで、Javascriptのほかにiframeを使うオプションもあった。トリッキーなところは、ツイートするボタンの公式サイトでは、Javascriptのコードしか作ってくれない。iframeなら自分でコードを作らないと残念。そのコードを、次のセクションにシェアする。

Not sure about all you readers, but I use the NoScript addon for Firefox while browsing, so by default Javascript is disabled whenever I browse a new site. Which would mean that by default, the tweet button wouldn’t show up until I allowed Javascript on the site, so I wanted to avoid it if possible.

Luckily, aside from Javascript, you can implement it with an iframe, so that’s what I used. The tricky part is just that the official tweet button website only generates Javascript code for you, so you need to figure out how to code the iframe yourself. I’ll be sharing the code for that in the next section.

-

2.機能を全部使えるようにする

2. To get all the new snazzy functions to work

ツイッターのデベロッパーサイトのツイートボタンページでiframeのコードを見つけたが、カスタマイズされた例がない。でも、まあ、重要なのはつかるコードだよね。下にある。

The code for the iframe version of the button can be found on the twitter developer site, but it doesn’t have an example on how to customize it. But, well, what’s important is just the code that works, right? Here it is:

<iframe
style=”width: 130px; height: 20px;”
allowtransparency=”true”
frameborder=”0″
scrolling=”no”
src=”http://platform.twitter.com/widgets/tweet_button.html?url=<?php echo urlencode(get_permalink($post->ID)); ?>
&via=RaimanAu
&text=<?php the_title(); ?>
&related=designmejp
&lang=ja
&count=horizontal
“></iframe>

上のコードをテーマのファイルのindex.phpとsingle.phpにそのまま貼り付けたら、すぐ使える。(管理画面⇒外観⇒テーマ編集⇒右にあるメニュー)

テーマのデザインによるけど、普段、コードの<?php the_title(); ?>と<?php the_content(); ?>の間に使えばベストだと思う。分からなかったらしたのイメージを見てください!

If you go ahead and paste the above code into your theme’s index.php and single.php files, you can use it right away! (Admin panel -> Appearance -> Editor -> Menu on the right)

It will depend on the design of your blog’s theme, but normal, if you paste the script somewhere between <?php the_title(); ?> and <?php the_content(); ?>, it will show up where you want it to be. If you don’t really understand, then have a look at the image below and it should help!

では、カスタマイズの説明です!上のコードの強調されたテキストは注意するところ。

And now here’s how to customize it! The text in bold in the code above is where you need to pay attention to.

-

via=RaimanAu

RaimanAuの代わりに、自分のツイッターのユーザーネームを書き込む。この機能は自動的に@ユーザーネームをツイートに入れる。

Instead of RaimanAu, you’re going to want to put your own twitter username. This function automatically adds the @username to the tweet that gets generated.

-

text=<?php the_title(); ?>

<?php the_title(); ?>はワードプレスが使うコードで、ツイートに、投稿のタイトルを自動的に取る。そのまま変えないほうがいい。

<?php the_title(); ?> is code used by WordPress to get the title of your post and puts it in the tweet. Leave this as it is.

-

related=designmejp

ツイートした後に、フォローお勧めの画面のアカウントはここで設定する。今は@designmejpを勧めている。1つ以上のアカウントを勧めたかったら、user1:user2の形に入れればOK!

After tweeting using the tweet button, this code brings up a recommended account to follow! Right now it’s following @designmejp. If you want to add more recommendations, then use the format user1:user2.

-

lang=ja

ツイートボタンの言語を選べるコードです。今の所で選べられる言語は日本語(ja)、英語(en)、とスペイン語(es)です。

This sets the language of the tweet button. Right now, the available languages are English (en), Japanese (ja), and Spanish (es).

-

count=horizontal

ボタンのタイプを決める。ここで入れられるのはnonehorizontalverticalです。下のイメージに、違いを見せる。

This determines the type of button that you have. You have three options: none, horizontal, and vertical. The corresponding button is shown in the image in below.

-

style=”width: 130px; height: 20px;”

ボタンの幅と高さを決める。言語とタイプによる、これを変える必要がある。サイズはしたのイメージにある。

This sets the size of the button, which actually changes depending on the language and the count type. The dimensions are shown in the image below.

もうすぐ終わり!パート3へ!

Whew, now we’re almost done! On to part 3!

-

3.フェイスブックのボタンとキレイに並ぶ

3. To line it up nicely with the facebook button

フェイスブックの「いいね!」ボタンと同じ行に並べたかったら、ちょっと工夫しないと出来ない場合が多い。

まずはフェイスブックのボタンの幅を300pxなどに編集する必要がある。じゃないと、ボタンは行の見えないところまで伸びて、ツイートボタンを置きたい場所がなくなってしまう。インストールによって、フェイスブックボタンのプラグインの設定、またはコードに直接変えられる。フェイスブックボタンの幅は普通450pxだと思う。

それが出来たら、次のステップはツイートボタンを右端に付ける。iframeのコードにちょっと加えれば出来る。

<div style=”float:right; margin-top:2px;”>

をコードの前に付けて、

</div>

をコードの後に付ける。

上にあるツイートボタンのコードのイメージには、出来上がった例がある。このコードは、iframeのコードを全部見えないボックスに置いて、ボックスを右寄せにして、上に2pxの余白を付ける。

上の余白の理由は、小さいツイートボタンとフェイスブックのサイズは若干違うから、付けたらキレイに見えることです。そして大きいボタンの場合に、2pxを0pxにすればいい!

If you’re looking to line up the tweet button on same row as a facebook like button, like on my site on the main page, you actually have to do a little adjusting to get it to work properly.

The first step is to change the width of the facebook button to something like 300px. By default, the width is 450px, which makes the button invisibly extend way to the right and can take up all the space on the line, which leaves no space for the tweet button! Depending on how you installed the facebook button, you can change the width in the plugin settings or directly in the code.

Once you’ve done that, all that needs to be done is to add a little bit more code to the iframe code! What you want to do is add the following code:

<div style=”float:right; margin-top:2px;”>

before the iframe code, and then the code below:

</div>

after the iframe code.

What this does is put the iframe into an invisible box, align it to the right side, and add a 2px margin to the top of it.

Why the margin? Because the facebook button is slightly larger than the small tweet button, and if both of them are aligned to the top of the post, the difference is a little jarring. If you move the button down the 2px, though, it looks a lot cleaner!

And in the case where you’re using the larger tweet button, just change the 2px to 0px and you’re all set!

-

最後に、参考のために、このプロジェクトに役に立ったサイト:

http://twitter.com/goodies/tweetbutton
http://dev.twitter.com/pages/tweet_button
http://dev.twitter.com/pages/tweet_button_faq

Finally, the sites above are what I used for reference in getting all this done!

-

もっと質問があれば、是非コメントで聞いてください!

If you have any comments or questions, feel free to share them!

-

Oh and last but not least, props to all of the people who left tons of helpful comments on the tweet button post at mashable.com! Sorting through all the comments there helped inspire me to create this =D

DesignMe/デザインミー

12 8月

DesignMe/デザインミー

デザインミー

多分、似顔の下にあるDesignMeというテキストに気づいたんだろう。そこに置いとく必要がないけど、俺はその会社にすごく誇りを持っている。自分の会社じゃないくせに誇りを持つというのはちょっと偉そうかもしれないけど、友達の会社で、作ること自体が本当にすごいと思っている。

You probably noticed the text under my personal logo saying “designed by DesignMe.” I actually didn’t have to put it there, but the company is actually something that I’m really proud of. I might be getting ahead of myself in taking credit for a company I didn’t make, but it’s my friend’s company, and I think it’s amazing that he was able to create it.

デザインミーは、CI(コーポレートアイデンティティ)を作る会社だけど、サービスの一つはパーソナルブランドのための顔のロゴの作成です。ロゴを使えば、たくさんの人と会うときに、もっと強い印象を作ることが出来る。起業家でも、サラリーマンでも、大事なツールだと思う。

よくある経験だと思うけど、もらった名刺のコレクションを見れば、誰かが誰で、さっぱり分からなくなっちゃう。

DesignMe is a company that specializes in creating Corporate Identities, in other words does branding for businesses. But one of their products is the face logo, which is a form of personal branding. And when used in business communication, I think it becomes a powerful tool in setting a stronger, lasting impression with the people you meet.

The image below is probably something familiar if you’ve gone to big events and did your share of networking. How many of the owners of the business cards do you remember?

だからよくあるアドバイスは名刺に写真を入れることだけど、プロの写真家に任せないと、使える写真を見つけるのがなかなか難しい。そして写真の背景によって、上手くデザインで使うのも簡単じゃない。

写真じゃなければ似顔のオプションもある。似てるというなら似てるかもしれないけど、本人をよく知らないと、本当の顔のイメージは普通、よく思い浮かばない。しかもあまりプロフェッショナルな感じもしない。

そこでデザインミーのフェイスロゴが入る。写真じゃないけど、間違えなく本人に見えて、簡単なデザインだから楽に使える。フェイスロゴは、写真から生まれるものだから!デザインミーはアーティストのセンスを使って、写真の重要なラインをなぞって、パソコンのイメージに変えるものです。そのため、プロセスは数日間かかる。

So it’s fairly common advice to put your photo on your business card, but unless you’re having your photo professionally taken, sometimes it’s tough to find a suitable photo. And not only that, because of the background color in photos, it can be difficult to integrate it into designs.

As for options other than photos, you have cartoons of yourself, but usually they’re a bit unprofessional for business. And not only that, if you don’t know the person well in the first place, what they actually look like doesn’t really come to mind.

That’s where DesignMe comes in. It’s not as realistic as a photo, but it’s unmistakeably the person. And with it’s simple design it works well with a lot of different designs and has a professional feel to it, oftentimes even more than a photo.

The secret to the close similarity to the person is because it’s created from a photo by hand. The artist at DesignMe actually uses his judgment to trace the important lines from the photo, transfers it to a computer, and then finally adds shading and touches of color.

Twitter profile pic/ツイッターのプロファイルイメージ


Email signature/メールの著名


Cards that don’t get you forgotten/印象を付ける名刺


A website that’s unmistakably yours/間違えられない本人のウェブサイト


フェイスロゴを多く使うほど、印象が強くなる。実はこの間、友達と一緒にイベントに行って、あるとネットワーキングをした。俺はその人と2,3分ぐらい話して、友達がその人と5分以上会話をした。

そして数日後、またその人と会って、覚えてくれたのが俺だけだった!

デザインミーのフェイスロゴだけのためじゃないかもしれないけど、一応、そういうことにして置く!

The more you use your face logo, the more powerful the impression you set.

In fact, I recently attended an event with a friend and we both met a certain person there as we networked our way around. I spoke to him for maybe 2 or 3 minutes while my friend spoke to him for over 5.

A few days later we meet, and turns out the guy remembered only me and not my friend!

Ok, so it might have been because of factors other than the DesignMe, I’ll just say it is. You get the point!

—————————–

デザインミーのフェイスロゴサービスは今月(8月2010年)の15日まで無料です!欲しければ早くサイトへ

The free version of DesignMe will only be free until the 15th of the month (August, 2010), so if you’re interested head over so the site and sign up for one now!