Customizing SMF > SMF Coding Discussion
Modifying BBC Code
Kays:
Hi, take a look in Subs.php. That's where the BBC code is defined.
Rather than changing the existing tag. Create a new tag named colour so that both color= and colour= will work.
And you shouldn't be messing with the css as the members don't see that.
ChalkCat:
Thanks Kays, I think this will keep me busy for a while... ;)
Marcus Forsberg:
Subs.php where the code is defined as well as Subs-Editor.php where the button is added to the editor should be enough, the other files shouldn't need any edits at all. Just copy all code related to the color BBC and paste it, then edit the pasted code to use the UK spelling.
ChalkCat:
Thanks Marcus :) I must admit I'm struggling. I seem to have done all that in both files, but when I test it, although my UK spelling is recognised as a tag, because the tags don't show in the post, the colour of the text remains unchanged :(
I think a little break and a little glass of wine is called for then I'll look through it again with refreshed eyes ;)
Marcus Forsberg:
Indeed, it's always a good thing to take a break from coding when you run into trouble! :)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version