花了點時間, 把 MyBlogLog Cache 做了些小修改:
下載: [download#3#nohits]
Change Log:
1. 在產生的 HTML 裡, 會把名字加到 title. 也就是說, 當滑鼠移到 avatar 上面 (還沒有 click 時), 會顯示名字.
2. 增加一些彈性, 可以選擇 avatar 的個數以及簡單的 layout, 把參數改成 6 個.
新增的參數說明如下:
$count 指的是希望顯示的 avatar 總個數
$dis_col 表示每列顯示幾個 avatar
$img_size 代表 avatar 的大小
因為 MyBlogLog 是用寬度, 列數以及影像大小來組成的, 所以不太容易直接給一個 avatar 的總數然後倒推回去. 我用比較偷懶的方法, 固定設成 half size 及寬度固定成 180px, 這樣一列就是 5 個, 所以上面也提到最多 50 個. 然後以上面例子來講, 實際上是不能只抓 16 個的 (因為一列 5 個), 因此我會抓 20 個, 然後最後取 16 個.
又, 原來 Image Size 不是影像大小, 只是用來計算個數的, 不論你設定 F (Full) 或是 H (Half), 抓到的都一樣是 48x48.
What's Next ?
我覺得好像已經差不多了耶 ... 不知道是不是有人有興趣, 可以給些 feedback 嗎?
|
|
|
Comments
昨天晚上睡覺前剛看
昨天晚上睡覺前剛看到丹尼老大寫好的0.1版,
正想說今天來寫篇文章推一下,
沒想到0.2版立刻就推出了.
而且0.2版新增的部份正是我想要建議丹尼老大寫的部份,
感謝丹尼老大寫出這麼棒的工具
[部落格加速]
[部落格加速] 優化MyBlogLog 最新進度 - 0.2版釋出...
丹尼老大在今天發表了 MyBlogLog Cache 0.2
這次的更新版本讓使用上的便利性提高了.....
小弟改寫了一份PHP版
小弟改寫了一份PHP版的,不過還沒有很完整.....
效能部份的話,我加上了兩段 expire time 的檢查...
分別可以設定 mybloglog.php 的 expire time跟所以個人圖示的過期時間..
預設 mybloglog.php 的過期時間為 5 分鐘.
圖示則為一天的過期檢查...
完成了,我先放在我
完成了,我先放在我的網頁上了....
http://blog.darkhero.net/articles/view/235
程式部份我加上了 Origin 標注了原始perl版本來自於您,且留下網址連結回本篇..
[部落格加速] MyBlogLog
[部落格加速] MyBlogLog Cache 0.2 PHP版本...
丹尼老大寫的 MyBlogLog Cache 0.2需要Crontab才能夠執行,
但是現在越來越多的虛擬主機商,.....
哇,
哇, ㄚ凱真是太厲害了, 才幾個小時就寫出來了. 之前我也想過應該要寫一個 php 版本的, 還大概看了一下模擬 cronjob 的方式該怎麼做, 看來不需要了, 好棒 ^^
Oh MY God !! This could be
Oh MY God !! This could be verrrryyy useful imho
!
I don't know how to use it on my server. My website is on 1&1 servers (shared, "mutualised"). Is it possible to transform your .pl in php ? That could be verry verry cool for my website because MyBlogLog is too sloowww
!
ps : I am french ^_^.
Hi Yazerty, You can
Hi Yazerty,
You can download the PHP version at http://blog.darkhero.net/articles/view/237
You should make a WordPress
You should make a WordPress plugin, that 'd be a great one
!
Hi, Yazerty You can get
Hi, Yazerty
You can get ㄚ凱's php version here:
http://blog.darkhero.net/articles/view/237
btw, you are French ? So, you can read Chinese or how do you find this page ?
About the Wordpress plugin, yes, I have a plan. I just read the cronjob mechanism of Wordpress 2.2 and some plugin related documents. But I cannot promise it
Yes I am french. I do not
Yes I am french. I do not read Chinese at all
. I found this page with Google (in all languages). I was looking for any system to cache the MBL javascript.
To cache the avatar for comments I found http://kamajole.dk/blog/2007/01/12/mbla/ and that seems to be a great plugin. You 're using it on this blog, isn't
I don't understand how work mybloglog_cache.php :-/.
I 'm waiting for your plugin with a lot of
...
ps : your blog customization is very good : just we need
.
I found you in Google with
I found you in Google with "mybloglog cache"
!
I finally found how to
I finally found how to install mybloglog_cache.php on my website
! But how do you display 16 mybloglog avatars under "MyBlogLog (cache)" in your sidebar ? What settings in mybloglog_cache.php ? The max seems to be 9 for me :-/.
@Yazerty You can change the
@Yazerty
You can change the 2 parameters:
$dis_col = 3: means show 3 avatars every row
$c_rows = '20': the total avatars you want to show, because some reason, please use a number more you want.
Thanks for your answer
Thanks for your answer Dennys,
Whant I put that :
$mblID = '2007011309363900'; # 請填寫你的 mlbID .
$c_rows = '100'; # 取得多少圖像 請大於你實際要顯示的圖像..
$expire_time = '0'; # mybloglog.php 過期時間,以秒為準
$picture_expire_time = '604800'; # 頭像圖片過期時間
$dis_col = 3; # 每一行顯示多少圖像
I have always a "3x3 square" :-/
The example part is
The example part is forbidden..
let me write down again:
[iframe src="http://mydomain/test.jsp" width="500" height="400"][/iframe]
@Yazerty Try this: $c_rows =
@Yazerty
Try this:
$c_rows = '6'
$dis_col = 4
Find "c_sn_opt=y" and change it to "c_sn_opt=n"
You'll get 4*4 2 ... I think I need ㄚ凱's help ...
@stray2003
You're right, so we still need to include http://track3.mybloglog.com/js/jsserv.php in our system.
But I don't understand your iframe problem ? MyBlogLog Cache doesn't need to use iframe.
Maybe my question is not
Maybe my question is not about cache. hehe,
but anyway, thanks for your reply.
@stray2003 When you login to
@stray2003
When you login to mybloglog.com, it puts some cookies in your computer (mbl_xxxxx). When you visit other web site (like my dennys.tiger2.net), your browser downloads http://track3.mybloglog.com/js/jsserv.php and runs it. This JavaScript reads your cookie and communicate with mybloglog.com.
So, in this case, dennys.tiger2.net doesn't get your cookie but mybloglog.com does.
Hi Dennys, Thank you. I know
Hi Dennys, Thank you.
I know my problem now. When I used firefox, my test.jsp also could get cookie.
Just when I ran it in IE, it doesn't work.. So I guess iframe doesn't work well under IE sometimes.
@Yazerty ㄚ凱 released a
@Yazerty
ㄚ凱 released a new version, I think $dis_col should work now.
You can try it here http://blog.darkhero.net/articles/view/238
其实http://track3.mybloglog
其实http://track3.mybloglog.com/js/jsserv.php也是值得研究的。这个应该是读取cookie的,但是事实上这个script做的事情很多(比如分析广告等等),我们可以把它分解,只取读cookie那段。
Post new comment