Topic RSS
I had previously posted about a 4.1.2 install and now I need to figure out how to remove all post filtering of HTML tags from a 4.0.4 install (which is setup with wordpress mu). So here's a rundown of what I need to figure out.
First: I need the background="", bgcolor="", and bordercolor="" attributes to be allowed for tables. I know simplepress does a lot of filtering of the post content and I'd like to remove as much of that as possible.
Second: I need to add some tools to the tinyMCE tools, I can get the tools showing up on the toolbar, the dialogs will also popup and display relevant data, they just simple won't update when changed and saved. The tools I need to add are full table support, and the ability to change the face and size of fonts.
I'm sure it won't be an easy fix, and I'm willing to do whatever changes need to be done, no matter how much work is involved to change it.
Well – first off a word on the toolbar. I did it the way it is now because so many people run a forum in a tight horizontal space – so many Wp themes are ridiculously narrow – and they needed a way to remove buttons to get it to fit. The alternative was getting people to edit the tinyMCE init file which scares many users.
Adding a base button to TinyMCE:
By 'base button' I mean one of the built in TinyMCE options as opposed to a plugin. To be honest the easiest and best way to do this is add items as a second row of buttons. Open the sf-tinyinit.php file and add buttins to the 'theme_advanced_buttons2' config item. The first row is generated from code and data held in the sfmeta table – the second row is not touched.
Adding a Plugin to TinyMCE:
if it's a plugin you want to add then things are a little different. That WILL need to go on the first button row. And this means changing serialised data in the sfmeta table – not a pleasant prospect. I have a small plugin I can supply that would enable you to do this. Never been tried in 4.0.4 as it was written for 4.1 but should work.
Removing Filters:
In 4.0.4 all filters are defined in the sf-includes.php file. Look for all of the filter defintions called either 'sf_save_post_content' or 'sf_show_post_content'. The names are self-explanatory. Some of the filters used are WordPress filters. Those that are not can be found in the sf-filters.php code file.
I do need to add plugins to tinyMCE, if you could supply that plugin to do so it would help me a lot. if you need an email webmaster@cpnexus.com is the one i'd like it to be sent to.
Also, i've found the filters but i'm getting nowhere allowing the table tag attributes to be rendered in the forum. I've edited the base wordpress kses so i don't think it could be that (backgrounds show fine when used in normal wordpress pages and posts) and none of the sf filters appear to restrict the use of background attributes. I'm assuming it has something to do with tinyMCE but even then, backgrounds show in the editor before it's saved, but once it's saved they are gone.
I'm hoping getting the table plugins working will correct that.
Yes – I wil email it to you.
You can also remove the 'invalid_elements' line in sf-tinyinit.php. Niot that I have ever found that to work!
TinyMCE will only strip what it is told to and in my experience it doesn't even always do that!
Just be aware that remving some filters will open up your site to easier hacking, XSS etc…
Thanks a lot for the help, the plugin worked fine and I got all the plugins I needed added. I also managed to get the backgrounds working with the help of the table plugin.
Most Users Ever Online: 444
Currently Online: Mr Papa, chucktho, SPQC
55 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
-Radio-: 1251
Lee H: 606
Luffer: 535
Conrad_Farlow: 485
jim: 478
neon: 263
ovizii: 240
Tal: 240
Member Stats:
Guest Posters: 2616
Members: 7328
Moderators: 1
Admins: 2
Forum Stats:
Groups: 5
Forums: 16
Topics: 10839
Posts: 79118
Newest Members: ordie69, mutha66, jawaulk, mastergalen, ikkiamonrah, OlafKS, js, Anne Wayman, vinzMtl, VikingBrent
Moderators: Brandon C (158)
Administrators: Yellow Swordfish (22131), Mr Papa (23580)
Log In
Register
Home
Add Reply
Add Topic
Offline
Quote



Privacy Policy
Mr Papa


