SMF Development > Applied or Declined Requests
BBC code in the "Subject:"
Srinib:
Can't we use BBC code in the Subject line?
I may want to use the subject line for this topic as,
BBC code in the Subject:
or
BBC code in the Subject:
or
BBC code in the Subject:
I think it is not a standard feature. Do we have any MOD for that?
nend:
I don't know about a mod but you can find all instances of the subject in your template and edit them like so.
Say you have
--- Code: ---context['subject']
--- End code ---
Change it to this
--- Code: ---parse_bbc($context['subject'], false, false, array('b','i','u'))
--- End code ---
Now you have BBC in your title.
However this may break your page title, you can use strip_tags for this though.
In your template index.template.php find
Find
--- Code: ---', $context['page_title_html_safe'], '
--- End code ---
--- Code: ---'. strip_tags(parse_bbc($context['page_title_html_safe'], false, false, array('b','i','u'))). '
--- End code ---
There is allot more to do on it though, mainly finding all the subject areas in the template and editing them. This is the simple way though, you can also do it within the source which might be a little advance.
Sorry though I don't have enough time to explain in more detail right now, search though the modifications there might be a mod already that does this.
Arantor:
The biggest reason not to do it is performance. The bbc parser is an absolute monster of code and running it many many more times than necessary is a really bad idea.
(There's a reason it takes up 40% of Subs.php)
Srinib:
--- Quote from: Arantor on July 06, 2012, 10:32:50 AM ---The biggest reason not to do it is performance. The bbc parser is an absolute monster of code and running it many many more times than necessary is a really bad idea.
(There's a reason it takes up 40% of Subs.php)
--- End quote ---
If performance is the reason behind that, then i really don't want to incorporate this feature for my forums.
Arantor, can you please tell me what MOD(or an existing SMF feature) you have used to get that small Facebook icon beneath your avatar?
live627:
http://www.simplemachines.org/community/index.php?topic=475020.0
Navigation
[0] Message Index
[#] Next page
Go to full version