- Posts: 6
- Thank you received: 0
Kunena 6.2.5 & module Kunena Latest 6.0.7 released
The Kunena team has announce the arrival of Kunena 6.2.5 [K 6.2.5] which is now available for download as a native Joomla extension for J! 4.3.x/4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2
Question Sort of Anti-spam - preventing posts with banned word
I'm trying to prevent posts uploading if the post contain sort of words.
When I looked the HTML source code of sending new post's page, I found this JavaScript lines:
function submitForm() {
submitme=1;
formname=document.postform.fb_authorname.value;
if ((formname.length<1)) {
alert("You've forgot enter the name.");
submitme=0;
}
formmail=document.postform.email.value;
if ((formmail.length<1)) {
alert("You've forgot enter mail address.");
submitme=0;
}
formsubject=document.postform.subject.value;
if ((formsubject.length<1)) {
alert("You've forgot enter the subject.");
submitme=0;
}
if (submitme>0) {
// var message = document.postform.message.value;
// message = message.replace(/</g,"<");
// message = message.replace(/>/g,">");
// document.postform.message.value = message;
//change the following line to true to submit form
return true;
}else{
return false;
Like the conditions above, I want to add this condition:
myRegExp = /Alex/;
formmail=document.postform.email.value;
matchPos1 = formmail.search(myRegExp);
if (matchPos1 == -1) {
alert("we don't want any Alex.");
submitme=0;
But I didn't find the exact page which contains the code lines above.
So please:
Can you help me find the location of the code lines above?
And do you think It will do the job...
Please Log in or Create an account to join the conversation.
but because it is PHP file the source code is:
Can you please help me get this JS code lines into the PHP code above? :
Thanks!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
C0n wrote: Do you have the locations of the files your trying to edit for example
/components/com_kunena/lib/kunena.bbcode.js.php
yes. this is the exact location.
do you know how to put the JS code into this PHP page?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.