Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: jquery mod checks fields not empty in the comment form  (Read 616 times)

adminphp

  • Full Member
  • ***
  • Karma: 4
  • Posts: 150
  • you must be a great snewser .
jquery mod checks fields not empty in the comment form
« on: March 29, 2012, 03:51:00 PM »

He everyone, i was looking at websites which using snews, I found this website of matt i think he is here with us in the forum; http://www.mdj.us and i'm attracted to the way, how to validate the required fields of his comments forms on sNews. i think he is working with jquery to occur that  action; look at any of his articles, and miss some field the message displays directely.
does there is a way or mod checks that the name field isn't empty with my snews 1.6?
the reason why i need this mod is because it will let the visitors know up front before submitting if the comment is too short or the name is missing without displaying " your comment hasn't sent" message, (because the visitor just miss some field).
 ;) thanks.
« Last Edit: March 29, 2012, 03:56:16 PM by adminphp »
Logged
“Fifty years of programming language research, and we end up with C++?”

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: jquery mod checks fields not empty in the comment form
« Reply #1 on: March 29, 2012, 06:28:51 PM »

Yes, Matt is using the JQuery Library. He doesn't have it installed on his host server... he includes it in his index.php (template) <header> section with a link to the jquery.min.js file provided by Google APIs

For the implementation script Matt is using in the comment form, you would need to contact Matt directly and see if he's willing to share it. If you browse his site some more, you might even find that he already has a mod listed somewhere for it. If not, contact him directly.
« Last Edit: March 30, 2012, 04:48:35 AM by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

adminphp

  • Full Member
  • ***
  • Karma: 4
  • Posts: 150
  • you must be a great snewser .
Re: jquery mod checks fields not empty in the comment form
« Reply #2 on: March 29, 2012, 06:48:40 PM »

Yes, Matt is using the JQuery Library. He doesn't have it installed on his host server... he includes it in his index.php (template) <header> section with a link to the jquery.min.js file provided by Google APIs

For the implementation script Matt is using in the comment form, you would need to contact Matt directly and see if he's willing to share it. If you browse his site some more, you might even find that he already has a mod listed somewhere for it. Of not, contact him directly.

You are right, I made a quick search in mod section, look what I found, validate comment fields in Snews
i sent a message to matt demanding the mod requested. i wish he will reply.
Logged
“Fifty years of programming language research, and we end up with C++?”

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: jquery mod checks fields not empty in the comment form
« Reply #3 on: March 30, 2012, 04:51:27 AM »

You are right, I made a quick search in mod section, look what I found, validate comment fields in Snews
i sent a message to matt demanding the mod requested. i wish he will reply.

Bingo! Glad you found it, and thanks for sharing it. I'll bookmark it and make use of it in my current project since I have the JQuery Library already installed in it.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

adminphp

  • Full Member
  • ***
  • Karma: 4
  • Posts: 150
  • you must be a great snewser .
Re: jquery mod checks fields not empty in the comment form
« Reply #4 on: March 30, 2012, 05:34:13 AM »

Excellent to hear that, I was during a conversation with matt the owner of that website, after we discussed many points about the mod and others, suddenly He mentioned that this mod is designed to work just With 1.7 and not 1.6.

 before the starting of sending messages to him, I was completely sure that it is impossible that that code could work in snews 1.6 and i was really confused about how?.

I tried to work this example he had given to me, jsfiddle
, but comment and contact form in snews 1.6 are different with this one which it is working in 1.7 (according to what he said).i couldn"t be able to test it in 1.7 because my website isn't running it.

We will be very glad if developers could improve this method in order to be compatible with all versions of snews. because . This plugin aims to help by adding validation to the comment form. When a visitor submits the form and something is missing, an appropiate message is displayed and individual fields are highlighted.

Everyone wants to avoid loosing visitors comments, this mod can do it. ;) but need as i said some fixes.
thanks keyrocks.
Logged
“Fifty years of programming language research, and we end up with C++?”

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: jquery mod checks fields not empty in the comment form
« Reply #5 on: March 30, 2012, 03:53:08 PM »

Well... it doesn't appear to work for me either and I am testing it with sNews 1.7 default installation. I left a comment on Matt's project page to see if he notices it and responds.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

adminphp

  • Full Member
  • ***
  • Karma: 4
  • Posts: 150
  • you must be a great snewser .
Re: jquery mod checks fields not empty in the comment form
« Reply #6 on: March 30, 2012, 06:49:09 PM »

Well... it doesn't appear to work for me either and I am testing it with sNews 1.7 default installation. I left a comment on Matt's project page to see if he notices it and responds.

@keyrocks,
ok good, take a look at the matt's page he responded to your comment. I think the problem should be fixed in // comment form; Exactly the last echos on it (function).
if some one could find the solution we completely be able to present that plugin in a good way.
Logged
“Fifty years of programming language research, and we end up with C++?”