Info
- 22 posts
- 7 voices
- Started 1 year ago by minervaa
- Latest reply from nuesha
- This topic is not resolved
How to disable html on the posts?
-
- Posted 1 year ago #
Hi all,
I have been searching on this forum and on the plugins to find a way to disable html on the posts(by members). Although I found this post but it was not resolved -
http://bbpress.org/forums/topic/how-can-i-disable-html-in-posts
The best would be admin can use html or lets say preferred members/senior members (which can be decided by admin, perhaps through post count plus control panel)
Is there any plugins to do these or is there any solution?
I would appreciate your input.
Thanks
-
- Posted 1 year ago #
Hi _ck_ any input on the above post?
Any other takers?
-
- Posted 1 year ago #
I have written a plugin that does what you want but isn't released to the public.
The code that follow deactivate all HTML tags. Keep in mind that it's not tested at all.
<?php /* Plugin Name: zaerl No HTML Plugin URI: http://www.zaerl.com Description: no HTML tags in posts Author: zaerl Author URI: http://www.zaerl.com Version: 0.1 */ function za_nh_allow_tag($tags) { return array(); } function za_nh_initialize() { add_filter('bb_allowed_tags', 'za_nh_allow_tag'); } add_action('bb_init', 'za_nh_initialize'); ?>If you are interested contact me.
-
- Posted 1 year ago #
Thanks zaerl, where would you paste this?
-
- Posted 1 year ago #
Create a php file, paste the text and save it in the plugin folder.
-
- Posted 1 year ago #
Keep in mind that, obviously, it is not retroactive. Preexisting posts aren't affected.
-
- Posted 1 year ago #
**Keep in mind that, obviously, it is not retroactive. Preexisting posts aren't affected.**
Yap I know that, I posted few new posts (by non admin member) just to test it
I am not a professional programmer but I think if we can change the code (maybe on post.php file?) where it says "make" http:// and www. texts to hyperlink, maybe it will work?
Just a thought by the way
-
- Posted 1 year ago #
Ciao Amico
Hai trovato una soluzione?
Grazie
-
- Posted 1 year ago #
I am not a professional programmer but I think if we can change the code (maybe on post.php file?) where it says "make" http:// and www. texts to hyperlink, maybe it will work?
One question, one topic.
-
- Posted 1 year ago #
Unfortunately that plugin isn't working in my bbPress 0.9.0.6
Does any one else have any other solutions?
You need to post far more details about what you are trying to do and what exactly is "not working".
In theory that plugin should work fine and you can even make it conditional so admin can post html code but not members.
Not sure why he does it after bb_init, so try it plain like this.
<?php /* Plugin Name: zaerl No HTML */ function za_nh_allow_tag($tags) {return array();} add_filter('bb_allowed_tags', 'za_nh_allow_tag',999); ?>Should be all you need.
-
- Posted 1 year ago #
Hi _CK_,
I am trying to make the forum as users can't post html links i.e if they post a site link on their topic, it will become non click able plain text but only admin can post a html link on the topic.
After implementing Zaerl's plugin it is still allowing html links on the post. I tested vigorously - all of the posts were made by different non admins (basic members)
I just tested your plugin as well but it is still the same. It is not converting the html links to plain text I'm afraid.
-
- Posted 1 year ago #
<?php /* Plugin Name: zaerl No HTML */ function za_nh_allow_tag($tags) {return array();} add_filter('bb_allowed_tags', 'za_nh_allow_tag',999); remove_filter('post_text', 'make_clickable'); ?>Happy?
-
- Posted 1 year ago #
Ah, see that was your problem we didn't know about because of how you weren't explaining it - bbpress makes plain text links clickable.
Thanks for following up on that zaerl.
-
- Posted 1 year ago #
*Happy?*
Yap ! this time it's working perfectly! :) Thanks a ton to both of you.
That means using this plugin, no html is supported at all on the topics?
Is it possible to improve this plugin a little bit as -
1. It will allow admin to post any clickable links(including outgoing) on the the topics
2. It will allow anyone to post clickable links ONLY when the link is from the same domain as the forum? (internal links)
To give an example, lets say this plugin is activated in bbpress.org.
A member post a topic saying
"Buy cheap Viagra from http://www.cheapest-vira-xyz.info" <-- this link would be plain text.
"A member post a topic saying "Has any one got this working? http://bbpress.org/forums/topic/cant-switch-themes-in-081" <-- this link would be clickable
again if any member post a topic saying "have you read this bbPress blog here ? http://www.bbpress.org/blog/latest/bla-bla-bla-bla" <-- this link would be clickable as they are from the same domain as the forum
If the above functions can be implemented on this plugin, that would be a brilliant tool to put off most of the spammers.
-
- Posted 1 year ago #
minervaa, your post was blocked as spam because it looked ... spammy. Rescued now
-
- Posted 1 year ago #
My last post also disappeared! It was a thank you to Chrishajer by the way
-
- Posted 1 year ago #
Is it possible to improve this plugin a little bit
Yes but it's a personal request. Contact me if you need those changes. za AT zaerl.com.
-
- Posted 1 year ago #
@zaerl
another email sent. -
- Posted 1 year ago #
Thanks zaerl, where would you paste this?
-
- Posted 1 year ago #
@Michaelia
You need to copy paste those code in a text file then rename it as .php.After that it will become a plugin and you can opload it on your plugin folder.
If you want, you can download the same file from this link. I put some extra information (i.e. description, url etc) on the plugin.
http://www.mediafire.com/file/kx0ir4p71tmalpz/Zaerl-no-html.php
-
- Posted 1 year ago #
*****************************************************
Is it possible to improve this plugin a little bit as -
1. It will allow admin to post any clickable links(including outgoing) on the the topics
2. It will allow anyone to post clickable links ONLY when the link is from the same domain as the forum? (internal links)
To give an example, lets say this plugin is activated in bbpress.org.
A member post a topic saying
"Buy cheap Viagra from http://www.cheapest-vira-xyz.info" <-- this link would be plain text.
"A member post a topic saying "Has any one got this working? http://bbpress.org/forums/topic/cant-switch-themes-in-081" <-- this link would be clickable
again if any member post a topic saying "have you read this bbPress blog here ? http://www.bbpress.org/blog/latest/bla-bla-bla-bla" <-- this link would be clickable as they are from the same domain as the forum
If the above functions can be implemented on this plugin, that would be a brilliant tool to put off most of the spammers.
******************************************************************
Any tips from anyone?
-
- Posted 1 year ago #
(You need to copy paste those code in a text file then rename it as .php.After that it will become a plugin and you can opload it on your plugin folder.
If you want, you can download the same file from this link. I put some extra information (i.e. description, url etc) on the plugin.)
thanks minervaa..
-
You must log in to post.