Форумы / Cotonti / Core Labs / Archive / Icons

Icon output in the core

Ratibor
#1 14.08.2008 15:16
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."&amp;comments=1\"><img src=\"skins/".$usr['skin']."/img/system/icon-comment.gif\" alt=\"\" />";
replace with:
$res = "<a href=\"".$url."&amp;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']; }
Не задавай глупых вопросов, не услышишь вранья.
Отредактировано: Trustmaster (14.08.2008 20:18, 16 лет назад)
Trustmaster
#2 14.08.2008 15:23
The problem with icons in core code is much bigger and needs discussion.
May the Source be with you!
Отредактировано: Trustmaster (14.08.2008 20:18, 16 лет назад)
Ratibor
#3 15.08.2008 08:10
and in plug.inc.php

line 116:
"PLUGIN_TITLE" => "<a href=\"plug.php?e=$e\">".$plugin_title."</a>",

replace with:
"PLUGIN_TITLE" => $plugin_title,
Не задавай глупых вопросов, не услышишь вранья.
Trustmaster
#4 15.08.2008 09:18
Can you provide all changes for .php and .tpl files to move icons from the core to templates? That's a lot of work, but worth doing.
May the Source be with you!
Boss
#5 15.08.2008 10:36
can? :)
"PLUGIN_TITLE" => "<a href=\"plug.php?e=$e\">".$plugin_title."</a>",
"PLUGIN_SHORTTITLE" => $plugin_title,
Ratibor
#6 15.08.2008 10:57
Boss : can? :)
Need delete all html code in core
Не задавай глупых вопросов, не услышишь вранья.
Trustmaster
#7 02.09.2008 19:32
We need to create a full list of icons that should be moved off the core here. And the templates should be modified of course.
May the Source be with you!