Icon output in the core
Ratibor |
|
---|---|
Let's discuss icon output in the core.
For example, look at {PAGE_ROW_COMMENTS} tag It outputs an image and number of comments. What if someone doesn't need the image? He needs to hack the core. We'd better make it output number of comments only, and if someone needed the image, he would do it with TPL without touching the core. Requires editing functions.php line 635 $res = "<a href=\"".$url."&comments=1\"><img src=\"skins/".$usr['skin']."/img/system/icon-comment.gif\" alt=\"\" />";replace with: $res = "<a href=\"".$url."&comments=1\">"; line 640 $res .= " (".$nbcomment.")";replace with: $res .= $nbcomment; Now about {PAGE_ROW_CATICON} It should output image path from database rather than complete HTML. So let's change functions.php line 1962 { $row['structure_icon'] = "<img src=\"".$row['structure_icon']."\" alt=\"\" />"; }replace with: { $row['structure_icon'] = $row['structure_icon']; } Не задавай глупых вопросов, не услышишь вранья.
|
|
This post was edited by Trustmaster (2008-08-14 20:18, 16 years ago) |