Hi,
running latest EE 5.3.0.
I can see that \system\ee\EllisLab\Addons\forum\mod.forum_core.php defines the topic marker images used by the discussion forum in an array, but I don’t want to edit a system file.
How can I modify/edit which topic marker images are used by the discussion forum, for example change “marker_old_topic.gif” to “marker_old_topic.png” ?
Thanks !
It’s been a while since I played with forums but various icons seem to be referenced in the templates, for instance in the default theme:
Folder forum_legends, both templates reference .gif icons directly.
However something like /forum_topics/topic_rows.html references stuff in the array!
I think your solution would be to hard code your marker images in the templates, rather than pulling them from the array.
Not sure if you could write an addon that overwrites them but have a look in templates, for instance:
/forum_topics/topic_rows.html about line 12
gives you
{topic_marker}
Note the use of the {topic_marker}
tag, all I’m suggesting is replacing that with your image href.
From what I can see marker images are only used in a few templates so they should be easy to replace, and if you use your own theme it won’t get overwritten when upgrading.
Hi Mark,
as you know one of the principles of programming is obviously code centralization. The code is centralized in the array, where we can easily, globally change the images. Problem is, it seems I cannot easily change the data, other than editing a system file or writing my own addon, which is very cumbersome for the task at hand here.
Don’t wanna edit all templates and take the topic_marker var out of it, to then hardcode in strings… next time we wanna change images I have to find all occurrences again and edit them.. amateur stuff, hence why it is centralized in the array, but one way of getting it done giving that we cannot easily override the array…
Another way is to simply change the file extensions of the new images to .gif… it works, but another unnecessary workaround.
Thanks for your help !
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.