Tags: embed, tweet, twitter widget, web
อยากมี twitter มาติดเว็บไหม เอาแบบเท่ห์ เช่น http://digg.meemarket.com
คำตอบคือ twitter widget ครับ จาก digg ตัวอย่างข้างต้น แก้ไข pligg นิดนึง ทำแบบนี้ครับ
แก้ไข
1. file index.php ของ pligg เรา (folder บนสุดของ pligg) แก้ไฟล์นี้เสีย
ประมาณบรรทัด 125 จัดการแทรก โค๊ด
$twitter = “<script src=’http://widgets.twimg.com/j/2/widget.js’></script>
<script>
new TWTR.Widget({
version: 2,
type: ‘profile’,
rpp: 5,
interval: 6000,
width: ‘auto’,
height: 300,
theme: {
shell: {
background: ‘#faf5fa’,
color: ‘#080808′
},
tweets: {
background: ‘#faf5fa’,
color: ‘#000000′,
links: ‘#70736e’
}
},
features: {
scrollbar: false,
loop: false,
live: false,
hashtags: true,
timestamp: true,
avatars: false,
behavior: ‘all’
}
}).render().setUser(’amzstore’).start();
</script>”;
$main_smarty->assign(’twitter’, “$twitter”);
2. ไปแก้ที่ template ของเรา ยกตัวอย่างของผม template season ก็ไปที่ templates/season/slidebar2.tpl
เพิ่มที่บรรทัดสุดท้าย
{$twitter}
แล้ว upload ชื่นชมผลงานของตัวเองครับ อ้ออย่าลืมเปลี่ยน user เป็นของตัวเองนะครับ amzstore ก็เปลี่ยนเป็นของตัวท่าน จากโค๊ดด้านบนน่ะ ไม่งั้นท่านจะได้แต่โฆษณาขายของ ของกระผมครับ
code ก็ปรับแต่งได้ ตัวอย่าง gen มาจาก
http://twitter.com/badges
จริงๆ แล้วมันมีเว็บที่ช่วยเยอะมากๆ ตามลิสต์เลยครับ
http://mashable.com/2009/03/30/twitter-badges/
January 13th, 2011 at 15:23
Nice news, I want say thanks to writer coz’ i’ve read here a lot exciting info. Keep it going! . Best regards
January 14th, 2011 at 14:43
You have a style of explaining things, which is really straightforward. Thank you for clear and concise details.
January 16th, 2011 at 04:38
Hello – Nice site, just browsing around some pages, it looks to be a pretty nice looking theme you are using here. I am currently using WordPress to run some of my web sites but looking to change one of these over to a platform the same as yours just for a trial run. Anything in particular you may suggest about it?
January 16th, 2011 at 05:35
Try coupon code “onecentcoupons” – HostGator hosting one month for free during ordering.
January 16th, 2011 at 07:43
Thank you! I consistently bare to address on my website something like that. Can I apparatus a allocation of your column to my blog?
January 17th, 2011 at 00:54
It will depend on how you look at it and where that you’re coming from on the subject really. Ultimately beauty is in the eye of the beholder, but Now i am with you on this one.
January 20th, 2011 at 21:56
If you’re still on the fence: grab your favorite earphones, head down to a Best Buy and ask to plug them into a Zune then an iPod and see which one sounds better to you, and which interface makes you smile more. Then you’ll know which is right for you.
January 20th, 2011 at 22:44
I found here something new and interesting. Thanks