Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Kellers on March 10, 2024, 07:47:52 PM

Title: HTML in posts.
Post by: Kellers on March 10, 2024, 07:47:52 PM
After another member Kindly told me the file im looking for of subs-post.php

Can someone tell me what I need to modify to allow my moderators to be able to use "{html}" in posts. As is only admins can use them in posts. I have modified it and failed to make it do what im trying so I have since put the stock file back in place.

BTW im well aware of the cautions in doing this, I have been running boards for over 35 years well before the internet was around. So just an answer the question will do please.
Title: Re: HTML in posts.
Post by: Sesquipedalian on March 10, 2024, 09:01:59 PM
The restriction is actually hard-coded in a few different places. It is absolutely not intended to be changed, and trying to do so is a terrible idea.

If you trust your moderators enough to allow them to use the html BBCode, you would do better to simply add them to the administrator group. This would be both much easier and much safer than hacking up the code.

In all likelihood, however, the best solution for whatever exactly you are trying to do would be to use custom BBCodes in order to provide the functionality you need. If none of the existing BBCode mods provide what you need, there are also a couple of mods that allow admins to create their own custom BBCodes for themselves.
Title: Re: HTML in posts.
Post by: Kellers on March 10, 2024, 11:56:39 PM
Makes sense why its not taking my changes, Thanks will try bbc custom codes though I have not had much luck with these in past.

Update, when installing Custom mod. Error message during install.
Can anyone translate this?
"BLOB/TEXT column 'name' can't have a default value
File: E:\xxx\Packages\temp\install.php
Line: 123"

Line 123 of is following

"$smcFunc['db_create_table']('{db_prefix}custom_actions', $columns, $indexes, array(), 'update_remove');"


Title: Re: HTML in posts.
Post by: Steve on March 11, 2024, 07:17:58 AM
Which custom bbc mod?
Title: Re: HTML in posts.
Post by: Kellers on March 11, 2024, 01:05:44 PM
@ Steve, Its the "Custom action Mod" v3.2.
Title: Re: HTML in posts.
Post by: Steve on March 12, 2024, 09:14:34 AM
That mod hasn't been updated to work on 2.1.x ... https://www.simplemachines.org/community/index.php?msg=4116583
Title: Re: HTML in posts.
Post by: Arantor on March 12, 2024, 11:45:07 AM
It also doesn't make custom bbcode for posts.
Title: Re: HTML in posts.
Post by: Sesquipedalian on March 12, 2024, 07:51:45 PM
You would want this mod: https://custom.simplemachines.org/index.php?mod=3864
Title: Re: HTML in posts.
Post by: Kellers on March 12, 2024, 10:06:55 PM
@ The mad doctor, Im sorry I stated incorrectly. the mod you recommended "Personalized BBC v1.94" IS the mod im having the errors with.
The "Custom action Mod" v3.2. was one I was looking at as an alternative. My bad, I mixed the names up.

I should add as well, reading through the other comments people have left.
Im running SMF version 2.0.14 and getting this error:

"BLOB/TEXT column 'name' can't have a default value
File: E:\xxx\Packages\temp\install.php
Line: 123"

Line 123 of is following

"$smcFunc['db_create_table']('{db_prefix}custom_actions', $columns, $indexes, array(), 'update_remove');"

when trying to install "Personalized BBC v1.94"
Title: Re: HTML in posts.
Post by: Sesquipedalian on March 13, 2024, 12:27:59 AM
In that case, you can ask for solutions in the support topic for that mod.