XF 1.5 Adding Custom BB Code

Thank you, that helped. I got this to save, but it is not working.

upload_2016-6-30_17-56-42.png

Page source. The message stops with the <sup>
Code:
<div class="messageContent">
<article>
<blockquote class="messageText SelectQuoteContainer ugc baseHtml">
just a test<br />
1.4507x10<sup>
<div class="messageTextEndMarker">&nbsp;</div>
</blockquote>
</article>
</div>
[/code/

[ATTACH=full]136929[/ATTACH]

[ATTACH=full]136928[/ATTACH]
 

Attachments

  • upload_2016-6-30_17-45-7.png
    upload_2016-6-30_17-45-7.png
    80.8 KB · Views: 20
  • upload_2016-6-30_17-45-27.png
    upload_2016-6-30_17-45-27.png
    39.2 KB · Views: 21
You HTML replacement needs to be the HTML that you're replacing the contents of the tag with. In this case, probably:
Code:
<sup>{text}</sup>
 
Thank you, the custom bbcode now is behaving the way I need it. There is a complication for enabling superscript text that might be worth having in these notes.

Once the substitution was fixed, the display of superscript <sup> was not in accord with normal css.
It was like this in the Xenforo BBCode help.
upload_2016-7-2_9-27-55.png

This is the page source for that help display showing the <sup> tag substituted for [sup]:
upload_2016-7-2_9-14-55.png


Disabling CSS shows superscript displayed in html default position
upload_2016-7-2_9-30-20.png


This is the CSS governing the vertical alignment of <sup>
in the default xenforo style.
upload_2016-7-2_8-54-33.png
That rule is in the template xenforo_reset.css.

Adding this to EXTRA.css got the result I was looking for:
upload_2016-7-2_8-59-5.png


Result:
upload_2016-7-2_9-33-43.png
 

Attachments

  • upload_2016-7-2_8-46-6.png
    upload_2016-7-2_8-46-6.png
    11.9 KB · Views: 15
  • upload_2016-7-2_8-49-11.png
    upload_2016-7-2_8-49-11.png
    13.8 KB · Views: 10
  • upload_2016-7-2_9-14-23.png
    upload_2016-7-2_9-14-23.png
    11.4 KB · Views: 9
  • upload_2016-7-2_9-26-4.png
    upload_2016-7-2_9-26-4.png
    24.6 KB · Views: 11
This was very helpful in creating a custom bb code for paragraphs, but there really needs to be a tutorial on what to put in the boxes for creating custom bb code so that it's easy to find the information.
 
Back
Top Bottom