我有這樣的:修改一塊PHP代碼
<?php echo $this->htmlLink($this->viewer()->getHref(), $this->itemPhoto($this->viewer(), 'thumb.icon')); ?>
,其產生的HTML代碼,如:
<a href="http://www.domain.com/john">
<img src="http://www.domain.com/thumb_0205.jpg" alt="" class="thumb_icon item_photo_user thumb_icon">
</a>
現在,我所要做的,就是加:
<?php echo $this->viewer()->getTitle(); ?> //This will generate the member's name, like "John Doe"
到上面的代碼,生成一個HTML代碼,如:
<a href="http://www.domain.com/john">
<img src="http://www.domain.com/thumb_0205.jpg" alt="" class="thumb_icon item_photo_user thumb_icon">
<span>John Doe</span>
</a>
無論如何,我能做到嗎?
感謝
確定你可以檢查'htmlLink'的文檔或源代碼,看看你是否可以傳入其他參數;或創建您自己的版本,添加您想要的額外信息。 –