Forums / Cotonti / Core Labs / Archive / Icons

Icon output in the core

Ratibor
#1 2008-08-14 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']; }
Не задавай глупых вопросов, не услышишь вранья.

Dit bericht is bewerkt door Trustmaster (2008-08-14 20:18, 15 jaren ago)
Trustmaster
#2 2008-08-14 15:23
The problem with icons in core code is much bigger and needs discussion.
May the Source be with you!

Dit bericht is bewerkt door Trustmaster (2008-08-14 20:18, 15 jaren ago)
Ratibor
#3 2008-08-15 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 2008-08-15 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 2008-08-15 10:36
can? :)
"PLUGIN_TITLE" => "<a href=\"plug.php?e=$e\">".$plugin_title."</a>",
"PLUGIN_SHORTTITLE" => $plugin_title,
Ratibor
#6 2008-08-15 10:57
Boss : can? :)
Need delete all html code in core
Не задавай глупых вопросов, не услышишь вранья.
Trustmaster
#7 2008-09-02 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!