close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Restrict Content Import

Thread began 8/16/2012 3:18 pm by tpellison430660 | Last modified 5/21/2014 9:26 am by Jason Byrnes | 2735 views | 5 replies |

tpellison430660

Restrict Content Import

I'm using the Restrict Content validation. If I click on Import I see one file (or option) of Swear Words. Is there any info or threads on exactly how this works. I'd like to maintain my own file of offensive words and use this validation type. If it works the way I hope it works, I can maintain my own list and have it apply site wide to any validation that uses the restrict content.

Sign in to reply to this post

Jason ByrnesWebAssist

this is not how the import feature works.


the import feature allows you to set your own list of restricted words in the validation behaviors, then export it as a preset that can be used the next time you add validation to a page.

if you edit the preset when adding it to another page, the changes do not apply site wide.


It is posible to create your own master file of restricted content to use site wide, but it will require some hand coding to accomplish.

first off, the restrictions that you add to the list follow a specific format based on type. They are added to a comma separated list, the restricted word first, then a pipe and the replacement word. In server validations, the replacement word is not really important though, since nothing will be returned if the validation fails. the type of restriction is determined by the way the spaces are arranged around the restricted word and replacement word.

here is an example that shows the format of each:
" exact | exact "
" includes|includes"
" begins| begins"
" ends |ends "

in the code, each would be strung together as a comma separated list:
" exact | exact , includes|includes, begins| begins, ends |ends "


to create your own master list, you could create a new php file that is completely empty, and add a variable that is set to the restricted content string:

php:
<?php

$notCool 
" exact | exact , includes|includes,  begins| begins, ends |ends "
?>



save the file as restricted.php. add a require once line to the form php file:

php:
<?php require_once("restricted.php"); ?>



when you add the restricted content validation, the code will look similar to this:
[php]$WAFV_Errors .= WAValidateRT(((isset($_POST["textfield"]))?$_POST["textfield"]:"") . ""," exact | exact , includes|includes, begins| begins, ends |ends ",true,1);[php]

you can change that to use the $notCool variable defined in the restricted.php page:

php:
$WAFV_Errors .= WAValidateRT(((isset($_POST["textfield"]))?$_POST["textfield"]:"") . "","".$notCool."",true,1);



just make sure to use the correct format when adding restricted content to the $notCool string.

Sign in to reply to this post

quy355499

Is it possible to delete presets that I have created?

Sign in to reply to this post

Jason ByrnesWebAssist

use the preset manager.

WebAssist -> Preset Manager

select the Preset you wish to delete and use the delete button.

Sign in to reply to this post

quy355499

OK. Sorry I may have used the wrong terminology. I am looking for "Swear Words" list and my custom lists to manage.

Sign in to reply to this post

Jason ByrnesWebAssist

no, there is not a way to delete one of the import presets.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...