MyBB Community Forums
bb div tags - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Resources (https://community.mybb.com/forum-8.html)
+--- Forum: MyCodes (https://community.mybb.com/forum-117.html)
+--- Thread: bb div tags (/thread-238751.html)



bb div tags - southpacific - 2023-07-10

hello! i am migrating my site from smf to mybb and a major aspect of our forum is coding cool templates in user posts! we did this by using a mod to enable advanced bb code using [div style=“styling here;”]this[/div]

i’ve tried googling for a solution, but have yet to find one. i’ve downloaded the plugin “yourcode” and entered a div style code with the following:

regular expression:
\[div (.*?)="(.*?)"\](.*?)\[/div\]

replacement:
<div $1="$2">$3</div>

unfortunately this is not working, and divs still show up as text. if someone could help me find a solution or let me know if this is already a plug-in or a plug-in i’d need to request that would be great! Smile


RE: bb div tags - Taylor M - 2023-09-19

reg:
\[div (style|class|id)="(.*?)"\](.*?)\[/div\]
rep:
<div $1="$2">$3</div>

^ I'm currently using the above with MyCode, I assume it would work with YourCode.