Skip to main content
Topic: 2.0: move HTML used in /sources/subs/... (Read 1954 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

2.0: move HTML used in /sources/subs/...

I'm currently experimenting with a bootstrap 4 theme for 1.1 and found a bunch of html (<a>, <i> and <img> tags) code inside the sources/subs/... files. an expample from BoardList.class.php.

Code: [Select]
$this->_categories[$row_board['id_cat']]['link'] = '<a id="c' . $row_board['id_cat'] . '"></a>' . (!$this->_user['is_guest']
? '<a href="' . $this->_scripturl . '?action=unread;c=' . $row_board['id_cat'] . '" title="' . sprintf($txt['new_posts_in_category'], strip_tags($row_board['cat_name'])) . '">' . $cat_name . '</a>'
: $cat_name);
The problem here: I can't add custom css classes to those links (except I'd use javascript). There are lot's of those inside the sources files and I feel this should be moved to the templates in 2.0..
Last Edit: November 13, 2017, 07:22:18 am by emanuele
Thorsten "TE" Eurich
------------------------

Re: 2.0: move HTML used in /sources/subs/...

Reply #1

They probably should be, but are there many that are actually a problem for anyone with even a modest knowledge of CSS? ;)

Re: 2.0: move HTML used in /sources/subs/...

Reply #2

As far as I remember, some of them are actually quite nasty to move out from where they are (i.e. it would require almost a complete overhaul of the way the thing works).
I can say that in general is indeed better not to have html in the "source", but at the same time, I would also say that in certain cases move out a tiny bit could make things less easy for both themers and developers.
In other words: I would judge on a case-by-case basis.
Bugs creator.
Features destroyer.
Template killer.