I want to show certain lines of code within code tags as coloured or bold.
Is this possible at all? Example shows what displays:
if (periphery>119) then
override="4xI,M-M,F-F"
elseif (periphery>60) then
override="2xL"
[color=green][b] elseif (periphery>0) and (upper(item.insulation.status)="INSIDE") then
override="2xL"
else
override="1 PART STRAIGHT"[/b][/color]
[color=red][s]item.update()[/s][/color]
endif
You mean like this ?
<?php
if (periphery>119) then
override="4xI,M-M,F-F"
elseif (periphery>60) then
override="2xL"
elseif (periphery>0) and (upper(item.insulation.status)="INSIDE") then
override="2xL"
else
override="1 PART STRAIGHT"[/b][/color]
item.update()
endif
just add <?php at the beginning
No, that is not what I am trying to achieve. I am trying to identify added lines of code as color green, and code no longer required as red and strikeout. I want it to display as below:
if (periphery>119) then
override="4xI,M-M,F-F"
elseif (periphery>60) then
override="2xL"
elseif (periphery>0) and (upper(item.insulation.status)="INSIDE") then
override="2xL"
else
override="1 PART STRAIGHT"
item.update()
endif
the code bbc by default does not support any other bbc within it. you would need a mod, I don't know if any exists to do this.
Maybe the 1.1.2 version of Use Color Tags For Code (https://custom.simplemachines.org/mods/index.php?mod=510) could be upgraded to provide support for 2.0.*
You can use the personalized bbc mod to create another code tag.
You will have to name it code2 or something similar but different from the default "code" tag.
example...
name: code2
description: code#2
type: [tag]{content}[/tag]
parsing: content only
trim whitespace: both
HTML:
<div style="width: 40em;padding: 1em 0em 0em 1em;">
<div class="codeheader" style="padding: 0;">
<span class="code floatleft" style="padding: 0em 0em 0em 0.5em;">Code</span>
</div>
<div style="padding: 0;margin: 0;font-size: 2em;clear:both;">
<blockquote style="margin: 0;padding: 0.5em;border: 0;">
<code class="bbc_code">{content}</code>
</blockquote>
</div>
</div>
icon/image: code.png
Then you can use code2 bbcode instead of code.
Does that also deal with things like not permitting smileys inside the section (because code tags do so much more than just being formatting and not parsing bbc inside them)?
No I forgot about smileys.
If parsing is enabled it will show both bbcodes & smileys.