On these pages are my WordPress plugins, the odd article and my Support Forum.

For my random rantings on everything else please visit my blog at Yellow Swordfish

WP Plugins


Articles

If you find any of my plugins useful, please comsider a donation towards my running costs.

Thank you

In preparation for the release of Simple:Press Version 4.0, the Support Forum has moved to a new site dedicated to the plugin. This will also be the future home for Simple:Press Forum.


Version 3.1.4 will still be available for download here in the short term.


For the support forum - and to visit our new site and to get details of version 4.0, click on the logo to take you to simplepressforum.com

This forum is currently locked - access is read only
Current User: Guest
Please consider registering

 
Search Forums:


 




How to force text in port to be in plain-text format?

UserPost

1:30 pm
16 Aug 2008


Miko York

Member

posts 9

1

When user pastes the text from webpage, the formatting remains as well. Sometimes it makes text width to be bigger than mail forum's width and post breaks the style. Is there way to forbid using of HTML or automatically reformat any copied text into plain text?


Thank you.

2:25 pm
16 Aug 2008


Yellow Swordfish

Admin

Peterborough, England

posts 5252

2

it really is annoying isn't it! Even worse are those that write a post is MS Word and then copy that in!

It'ss not as easy as it sounds but we are looking into it. I want this too after all!

5:16 pm
16 Aug 2008


Miko York

Member

posts 9

3

I've noticed that phpBB and Innovision forums have no such problem. They just kill the format of the copied message and you can add formatting manually later. It's better, because my forum members aren't good with HTML coding and formatting. It's better if I could turn off for them the original text formatting.

5:26 pm
16 Aug 2008


Mr Papa

Moderator

Arizona, USA

posts 1602

4

I guess its a question of whether or not you want to support html in post content… we do…  phpbb, for example uses bbcode, so yes they can kill all html…

in the next version 3.2, we will have four editors (assuming testing and everything continues on the path it is now):  richtext wysiwg (tinymce), html (quicktags), bbcode and a plain textarea…  you as admin will be able to control the editors users are allowed to choose from…   so if you only enable bbcode, you wont have html issues just like phpbb…

5:40 pm
16 Aug 2008


Yellow Swordfish

Admin

Peterborough, England

posts 5252

5

But you lose a lot of you strip all HTML. No Links. No Images. No Videos. No Bold/Italic… Not even proper paragraphs…

6:19 pm
16 Aug 2008


Mr Papa

Moderator

Arizona, USA

posts 1602

6

I will keep this in our nice little email traffic we have going…

12:06 pm
17 Aug 2008


Miko York

Member

posts 9

7

My users aren't good with HTML coding and they don't understand what to do when the text they've entered breaks the page style. I prefer to kill all HTML formatting and them format text manually, insert pictures, etc. It is better, that screwed page.

When the new form version going to be out? Please-please ^^

Thank you.


12:51 pm
17 Aug 2008


Yellow Swordfish

Admin

Peterborough, England

posts 5252

8

Really not sure yet but not for a while yet.

You can always add your own filter. See the 'Filters' section in the online help. There is a predefined filter avalable you could use called 'sf_filter_nohtml_kses' which should strip the content..

2:18 pm
15 Sep 2008


Miko York

Member

posts 9

9

I've read online help, but could you please explain how to use sf_filter_nohtml_kses filter step-by-step? 

Thank you very much.

5:31 pm
15 Sep 2008


Yellow Swordfish

Admin

Peterborough, England

posts 5252

10

Well, assuming the content you want to filter is loaded into a variable called $content then you just perform a

$content = sf_filter_nohtml_kses($content);

if, however you want to set it up as a permanent filter on SAVING the post then you can add:

add_filter('sf_save_post_content', 'sf_filter_nohtml_kses');

You should be able to out that in the sf-hook-template.php file. I see no reason why not anyway and it should work from there.

7:41 pm
15 Sep 2008


Miko York

Member

posts 9

11

I've added string add_filter('sf_save_post_content', 'sf_filter_nohtml_kses'); before the ewnd of file sf-hook-template.php and it worked. Thank you very much!

8:21 pm
15 Sep 2008


Yellow Swordfish

Admin

Peterborough, England

posts 5252

12

You're welcome.



Reply to Topic: How to force text in port to be in plain-text format?

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 7 + 9        (Required)

Topic Reply:


 
 

About the Stuff at Yellow Swordfish forum

Currently Online:

18 Guests

Maximum Online: 71

Forums:

Groups: 3

Forums: 16

Topics: 2068

Posts: 14091

Members:

There are 1003 members

There are 837 guests


Yellow Swordfish has made 5252 posts

Top Posters:

Mr Papa - 1602

-Radio- - 558

ovizii - 114

jfv - 82

angelic007 - 72

Administrator: Yellow Swordfish | Moderators: Yellow Swordfish, Mr Papa, -Radio-


© Simple:Press Forum - Version 3.1.4 (Build 357)