ElkArte Community

Elk Development => Feature Discussion => Topic started by: TE on November 12, 2017, 06:52:48 am

Title: 2.0: move HTML used in /sources/subs/...
Post by: TE on November 12, 2017, 06:52:48 am
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..
Title: Re: 2.0: move HTML used in /sources/subs/...
Post by: Frenzie on November 12, 2017, 02:25:01 pm
They probably should be, but are there many that are actually a problem for anyone with even a modest knowledge of CSS? ;)
Title: Re: 2.0: move HTML used in /sources/subs/...
Post by: emanuele on November 12, 2017, 03:58:31 pm
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.